Hi,
I installed and configured videocache as guided but when i pasted the code and restart/reload the squid service i found this error and squid stop to work.
# service squid reload
FATAL: Bungled squid.conf line 4573: url_rewrite_program /usr/bin/python-2.4 /usr/share/videocache/videocache.py
Squid Cache (Version 2.6.STABLE21): Terminated abnormally.
#squid -k parse
FATAL: Bungled squid.conf line 4573: url_rewrite_program /usr/bin/python-2.4 /usr/share/videocache/videocache.py
Squid Cache (Version 2.6.STABLE21): Terminated abnormally.
Please help to resolve this problem, code is given below.
# --BEGIN-- videocache config for squid
url_rewrite_program /usr/bin/python-2.4 /usr/share/videocache/videocache.py
url_rewrite_children 10
acl videocache_allow_url url_regex -i \\.youtube\\.com\\/get_video\\?
acl videocache_allow_url url_regex -i \\.googlevideo\\.com\\/videoplayback \\.googlevideo\\.com\\/videoplay \\.googlevideo\\.com\\/get_video\\
?
acl videocache_allow_url url_regex -i \\.google\\.com\\/videoplayback \\.google\\.com\\/videoplay \\.google\\.com\\/get_video\\?
acl videocache_allow_url url_regex -i \\.google\\.[a-z][a-z]\\/videoplayback \\.google\\.[a-z][a-z]\\/videoplay \\.google\\.[a-z][a-z]\\/get_
video\\?
acl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4
][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\/videoplayback\\?
acl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4
][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\/videoplay\\?
acl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4
][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\/get_video\\?
acl videocache_allow_url url_regex -i proxy[a-z0-9\\-][a-z0-9][a-z0-9][a-z0-9]?\\.dailymotion\\.com\\/
acl videocache_allow_url url_regex -i vid\\.akm\\.dailymotion\\.com\\/
acl videocache_allow_url url_regex -i [a-z0-9][0-9a-z][0-9a-z]?[0-9a-z]?[0-9a-z]?\\.xtube\\.com\\/(.*)flv
acl videocache_allow_url url_regex -i bitcast\\.vimeo\\.com\\/vimeo\\/videos\\/
acl videocache_allow_url url_regex -i va\\.wrzuta\\.pl\\/wa[0-9][0-9][0-9][0-9]?
acl videocache_allow_url url_regex -i \\.files\\.youporn\\.com\\/(.*)\\/flv\\/
acl videocache_allow_url url_regex -i \\.msn\\.com\\.edgesuite\\.net\\/(.*)\\.flv
acl videocache_allow_url url_regex -i media[a-z0-9]?[a-z0-9]?[a-z0-9]?\\.tube8\\.com\\/ mobile[a-z0-9]?[a-z0-9]?[a-z0-9]?\\.tube8\\.com\\/
acl videocache_allow_url url_regex -i \\.mais\\.uol\\.com\\.br\\/(.*)\\.flv
acl videocache_allow_url url_regex -i \\.video[a-z0-9]?[a-z0-9]?\\.blip\\.tv\\/(.*)\\.(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram)
acl videocache_allow_url url_regex -i video\\.break\\.com\\/(.*)\\.(flv|mp4)
acl videocache_allow_dom dstdomain .mccont.com dl.redtube.com .cdn.dailymotion.com
acl videocache_deny_url url_regex -i http:\\/\\/[a-z][a-z]\\.youtube\\.com http:\\/\\/www\\.youtube\\.com
url_rewrite_access deny videocache_deny_url
url_rewrite_access allow videocache_allow_url
url_rewrite_access allow videocache_allow_dom
redirector_bypass on
# --END-- videocache config for squid
9 Answers
Hi!
You are using old version of squid. Back then url_rewrite_program was known as url_redirect_program. Please try replacing the line
url_rewrite_program /usr/bin/python-2.4 /usr/share/videocache/videocache.py
with
url_redirect_program /usr/bin/python-2.4 /usr/share/videocache/videocache.py
Let me know if that works.
Thanks!
Hello,
Thanks Admin for valuable response.
Now my vc is working fine but url_redirect_program for squidGaurd is not working as known that squid allow one url_redirect_program by default. So I have installed adzap for multiple redirection but couldn't work. My wrapzap lines are
#squidclamav=/usr/local/bin/squidclamav
zapper=/usr/local/bin/squid_redirect
videocache=/usr/share/videocache/videocache.py
exec /usr/local/bin/zapchain "$zapper" "$squidclamav" "$videocache"
#My Squid.conf line is....
url_rewrite_program /usr/local/libexec/zapchain "/usr/local/bin/squidGuard -c /usr/local/squidGuard/squidGuard.conf"
It is giving me the same error as mentioned. one thing more when i try to give url_redirect_program instead of url_rewrite_program, squid didn't recognized this.
Waiting your valuable response.
Regards
Hi!
Please check this link for some hint on Squid + SquidGaurd + Videocache configuration.
Thank You!
Hello Admin,
I followed your instructions, and my squid+squidGuard+videocache seems like working but i am not getting result as i wanted. Although my squidGuard and videocache not giving me any more result but still squidGurad not blocking porno sites and video cache not caching... Here are some outputs...
# ps -aux | grep squid
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root 2495 0.0 0.1 8124 1344 ? Ss 07:34 0:00 squid -D
squid 2497 0.1 7.4 70988 67016 ? S 07:34 0:13 (squid) -D
squid 2504 0.0 0.0 1612 232 ? Ss 07:34 0:00 (unlinkd)
squid 3689 0.0 0.7 12996 7108 ? Ss 08:40 0:00 (python2.4) /usr/share/videocache/videocache.py
squid 3690 0.0 0.7 12996 7104 ? Ss 08:40 0:00 (python2.4) /usr/share/videocache/videocache.py
squid 3691 0.0 0.8 43988 7252 ? Ssl 08:40 0:01 (python2.4) /usr/share/videocache/videocache.py
squid 3692 0.0 0.7 12996 7104 ? Ss 08:40 0:00 (python2.4) /usr/share/videocache/videocache.py
squid 3694 0.0 0.7 12996 7104 ? Ss 08:40 0:00 (python2.4) /usr/share/videocache/videocache.py
root 15618 0.0 0.0 4012 692 pts/1 R+ 11:05 0:00 grep squid
#tail -f /var/log/videocache/videocache.log
2010-07-26 07:34:39,515 2502 - - SCHEDULEDER - Download Scheduler starting.
2010-07-26 07:34:41,457 2595 - - UPDATE_SIZE - Size of all caching directories updated successfully.
2010-07-26 08:40:05,589 2503 - - RELOAD - videocache plugin was reloaded.
2010-07-26 08:40:05,816 2499 - - RELOAD - videocache plugin was reloaded.
2010-07-26 08:40:05,818 2500 - - RELOAD - videocache plugin was reloaded.
2010-07-26 08:40:05,820 2501 - - RELOAD - videocache plugin was reloaded.
2010-07-26 08:40:05,821 2502 - - RELOAD - videocache plugin was reloaded.
2010-07-26 08:40:07,522 3691 - - XMLRPCSERVER - Starting XMLRPCServer on port 9100.
2010-07-26 08:40:07,523 3691 - - SCHEDULEDER - Download Scheduler starting.
2010-07-26 08:40:09,017 3699 - - UPDATE_SIZE - Size of all caching directories updated successfully.
#tail -f /var/log/httpd/access_log
It is not showing any result
# watch du -sh /var/spool/videocache/
2.0s: du -sh /var/spool/videocache/ Mon Jul 26 11:12:31 2010
68K /var/spool/videocache/
####Every time showing these 68K /var/spool/videocace
#squid -k reconfigure
#squid -k parse
#### Both working fine
#### wrapzap path....
zapper=/usr/local/adzap/scripts/squid_redirect
videocache/usr/share/videocache/videocache.py
exec /usr/local/bin/zapchain "$zapper" "$squidclamav" "$videocache"
Squid.conf
redirect_program /usr/local/adzap/scripts/wrapzap "/usr/local/bin/squidGuard -c /usr/local/squidGuard/squidGuard.conf"
Hi!
Videocache 1.9.1 is not supported anymore. Please purchase the latest version.
Thank You!
Hola Administracion videocache
he instalado la version 1.9.2 de videocache la integro com mk,
pero no funciona como esperaba, sobre todo con youtube hasta ahora no he podido ver ni un video de youtube cachado, ami red acceden unos 60 usuarios.- mi pregunta es si esa version esta andando para los videos de youtube o tendria q comprar la 1.9.5 y si cache todos los videos de youtube a los q accedo o solo agunos???
¡Muchas Gracias!
Hi!
Videocache version 1.9.2 doesn't work anymore. Please buy version 1.9.5 which works perfectly.
Thank You!