VideoCache
Videocache is no longer in development.

Query

by Anonymous on 19 Feb 2009

Config debian + squid stable 2.6.5 + videcache 1.9

Your package "IntelligentMirro" are usefull for Debian ?.
It's installation is possible ?
I have installed in a Debian with Squid V 2.6, but when i tried restart squid (with the lines modified for your article), apper this error"

FATAL: Bungled squid.conf line 110: url_rewrite_program /usr/bin/python /etc/squid/intelligentmirror/intelligentmirror.py

Other

#python setup.py install
Traceback (most recent call last):
  File "setup.py", line 21, in ?
    from intelligentmirror.config import readMainConfig, readStartupConfig
  File "/usr/src/mirror/intelligentmirror-0.5/intelligentmirror/config.py", line 27, in ?
    import rpm
ImportError: No module named rpm

3 Answers

by Kulbir Saini on 20 Feb 2009

Anon,

IntelligentMirror works for both rpm and deb caching, so its equally useful for Debian.

Please apply the following patch to config.py file after downloading the source and then run setup.py .

diff --git a/intelligentmirror/config.py b/intelligentmirror/config.py
index a6d0518..9b6429d 100755
--- a/intelligentmirror/config.py
+++ b/intelligentmirror/config.py
@@ -24,14 +24,11 @@ Configuration parser and default values for yum.

 import os
 import warnings
-import rpm
 import copy
 import urlparse
 from parser import ConfigPreProcessor
 from iniparse.compat import NoSectionError, NoOptionError, ConfigParser
 from iniparse.compat import ParsingError
-import rpmUtils.transaction
-import rpmUtils.arch
 import Errors

 class Option(object):

Now try restarting your squid.

If the problem persists, let us know.

Thank you!

by Anonymous on 20 Feb 2009
root#nano setup.py

squid_user = 'proxy'
squid_group = 'proxy'
apache_conf_dir = '/etc/apache2/conf.d/'
root#nano config.py

"""
Configuration parser and default values for yum.
"""

import os
import warnings
#import rpm
import copy
import urlparse
from parser import ConfigPreProcessor
from iniparse.compat import NoSectionError, NoOptionError, ConfigParser
from iniparse.compat import ParsingError
#import rpmUtils.transaction
#-import rpmUtils.arch
import Errors

class Option(object):
root#python setup.py install

IntelligentMirror setup has completed successfully.
Now you must reload httpd service on your machine by using the following command
[root@localhost ~]# service httpd reload [ENTER]
Also, you need to configure squid so that it can use intelligentmirror as a url rewritor plugin.
Check README file for further configurations of squid, httpd and intelligentmirror.
In case of any bugs or problems, check http://fedora.co.in/intelligentmirror .
root# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)... waiting .
root# /etc/init.d/squid restart
Restarting Squid HTTP proxy: squid Waiting.....................done.
FATAL: Bungled squid.conf line 112: url_rewrite_program /usr/bin/python /etc/squid/intelligentmirror/intelligentmirror.py
Squid Cache (Version 2.6.STABLE5): Terminated abnormally.
 failed!
by Kulbir Saini on 20 Feb 2009

Anon,

If squid is failing, it'll try to write logs/python tracebacks to either /var/log/squid/cache.log or /var/log/squid/squid.out . Can you please look into those files and let us know the errors? If you don't understand the errors, paste them on http://pastebin.com and give us the link.

Thank You!