VideoCache
Videocache is no longer in development.

Access Denied

by Anonymous on 18 Nov 2008

ERROR
The requested URL could not be retrieved

While trying to retrieve the URL: http://youtube.com/

The following error was encountered:

Access Denied.

Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.

It appears to be an ACL problem
How do I allow the following range through Squid
10.1.128.1-10.1.131.254

8 Answers

by josgan on 18 Nov 2008

Ok I've changed the "all" ACL to 10.1.128.0 with a subnet of 255.255.252.0

Squid/cache.log
  File "httplib.py", line 798, in endheaders
    self._send_output()
  File "httplib.py", line 679, in _send_output
    self.send(msg)
  File "httplib.py", line 646, in send
    self.connect()
  File "httplib.py", line 630, in connect
    raise socket.error, msg
error: (111, 'Connection refused')

/squid/access.log

1226949325.143    118 10.1.130.133 TCP_DENIED/403 1442 GET http://youtube.com/ - DIRECT/208.65.153.251 text/html
1226949582.955      1 10.1.130.133 TCP_DENIED/403 1442 GET http://youtube.com/ - NONE/- text/html
1226949583.906      0 10.1.130.133 TCP_DENIED/403 1442 GET http://youtube.com/ - NONE/- text/html
1226949584.640      0 10.1.130.133 TCP_DENIED/403 1442 GET http://youtube.com/ - NONE/- text/html
1226949586.025      0 10.1.130.133 TCP_DENIED/403 1442 GET http://youtube.com/ - NONE/- text/html
1226950307.556      0 10.1.130.133 TCP_DENIED/403 1442 GET http://youtube.com/ - NONE/- text/html
1226950377.922      0 10.1.130.133 TCP_DENIED/403 1442 GET http://youtube.com/ - NONE/- text/html
1226950379.488      0 10.1.130.133 TCP_DENIED/403 1442 GET http://youtube.com/ - NONE/- text/html
1226950380.505      0 10.1.130.133 TCP_DENIED/403 1442 GET http://youtube.com/ - NONE/- text/html
1226950381.345      0 10.1.130.133 TCP_DENIED/403 1442 GET http://youtube.com/ - NONE/- text/html
by Kulbir Saini on 18 Nov 2008

Add the following acl to squid.conf.

acl my_machines src 10.1.128.1-10.1.131.254
http_access allow my_machines

Don't change the "all" acl. No one will be able to access anything. Revert back the all acl and add the above two lines in squid.conf . For more information check How to configure squid proxy server?

by josgan on 18 Nov 2008

Ok, the squid is working now, but youtube cache isn't working.

The last line in my youtube_cache.log

2008-11-17 13:14:31,492 INFO - - SCHEDULEDER - Download Scheduler starting.

I've been to youtube 5 times for the same video now.

by josgan on 18 Nov 2008

Now I'm getting an error parsing URL's

2008-11-17 13:37:30,035 INFO 10.1.129.62 - NEW_URL YOUTUBE Error in parsing the url http://v22.cache.googlevideo.com/get_video?origin=chi-v149.chi.youtube.com&video_id=684OLRsTrrs&ip=74.39.188.254&signature=CE0C56C752D72DD8EB56E5F5D29003257C718850.A0EEBAE2E134A5B301ACA123D0EC2958050DE5E0&sver=2&expire=1227068798&key=yt4&ipbits=0
by Kulbir Saini on 18 Nov 2008

Which version of youtube cache are you using? Because I am not getting any errors with version 1.4 while browsing the link you pasted above. And youtube cache is caching that url.

by head on 20 Nov 2008

hi,i have error with youtube_Cache.
use centos 5.2
youtube_Cache 1.5
already config youtube and httpd.squid 2.6

2008-11-20 18:05:57,984 INFO 10.0.0.104 - NEW_URL YOUTUBE Error in parsing the url http://www.youtube.com/get_video?video_id=FXY-HZy3Olg&t=OEgsToPDskLlUhHQV6JGuv4PtickeojO&el=detailpage&ps=
2008-11-20 18:06:00,494 INFO 10.0.0.104 - REQUEST - http://lax-v254.lax.youtube.com/get_video?video_id=FXY-HZy3Olg&ip=190.232.244.219&signature=BFCBBC6B56ED8588752D4A9BA7F70F7A4FAB6CDF.7BBCCD66A6214FC530F76024B0C865BBD2D20772&sver=2&expire=1227243500&key=yt4&ipbits=0
2008-11-20 18:06:00,495 INFO 10.0.0.104 - NEW_URL YOUTUBE Error in parsing the url http://lax-v254.lax.youtube.com/get_video?video_id=FXY-HZy3Olg&ip=190.232.244.219&signature=BFCBBC6B56ED8588752D4A9BA7F70F7A4FAB6CDF.7BBCCD66A6214FC530F76024B0C865BBD2D20772&sver=2&expire=1227243500&key=yt4&ipbits=0
2008-11-20 18:06:04,729 INFO 10.0.0.204 - REQUEST - http://www.youtube.com/get_video?video_id=CI6QZc4w23Y&t=OEgsToPDskJPU8No7Pi5Q9TDMdQeX9Sm&el=detailpage&ps=
2008-11-20 18:06:04,730 INFO 10.0.0.204 - NEW_URL YOUTUBE Error in parsing the url http://www.youtube.com/get_video?video_id=CI6QZc4w23Y&t=OEgsToPDskJPU8No7Pi5Q9TDMdQeX9Sm&el=detailpage&ps=
2008-11-20 18:06:07,653 INFO 10.0.0.204 - REQUEST - http://nyc-v145.nyc.youtube.com/get_video?video_id=CI6QZc4w23Y&ip=190.232.244.219&signature=4CA3A5593CAC3E8A19B898381691795956FB9FFB.52AD2F8BEA01CF62C4A34A206839DABA687FE99E&sver=2&expire=1227243507&key=yt4&ipbits=0
2008-11-20 18:06:07,654 INFO 10.0.0.204 - NEW_URL YOUTUBE Error in parsing the url http://nyc-v145.nyc.youtube.com/get_video?video_id=CI6QZc4w23Y&ip=190.232.244.219&signature=4CA3A5593CAC3E8A19B898381691795956FB9FFB.52AD2F8BEA01CF62C4A34A206839DABA687FE99E&sver=
by Kulbir Saini on 21 Nov 2008

Please don't paste your config files in forum, it becomes difficult to read the posts. Use pastebin service.

Most probably your XMLRPC Server is not running or it has exited abnormally. Can you give me the output of command

[root@localhost ~]# netstat -atpn |grep python [ENTER]

If no app is listening on port 9100, then check /var/log/squid/cache.log for any error related to python tracebacks. Get back with whatever result you get.

by head on 26 Nov 2008

hi.

[root@ns ~]#  netstat -atpn |grep python
[root@ns ~]#  netstat -atpn |grep python
[root@ns ~]# 

[root@ns ~]# tail -f /var/log/squid/cache.log
2008/11/25 19:57:15| parseHttpRequest: Unsupported method '�k%����v��KR��|���[�jE
��{�'
2008/11/25 19:57:15| clientReadRequest: FD 48 (10.0.0.154:2582) Invalid Request
2008/11/25 20:01:45| parseHttpRequest: Unsupported method 'recipientid=113&sessionid=2726'
2008/11/25 20:01:45| clientReadRequest: FD 121 (10.0.0.155:1394) Invalid Request
2008/11/25 20:01:45| parseHttpRequest: Unsupported method 'recipientid=113&sessionid=2726'
2008/11/25 20:01:45| clientReadRequest: FD 31 (10.0.0.155:1396) Invalid Request
2008/11/25 20:06:54| httpReadReply: Excess data from "GET http://www.cbox.ws/box/jsv4_1.php?r=10"
2008/11/25 21:25:04| httpReadReply: Excess data from "GET http://www.cbox.ws/box/jsv4_1.php?r=10"
2008/11/25 21:28:48| httpReadReply: Excess data from "GET http://www.cbox.ws/box/jsv4_1.php?r=10"