| Author |
Message |
John Oliver *nix forums beginner
Joined: 11 Apr 2005
Posts: 33
|
Posted: Wed Jul 05, 2006 9:14 pm Post subject:
Squid won't debug
|
|
|
[root@kira squid-2.5.STABLE14]# /usr/local/squid/sbin/squid -k debug
squid: ERROR: No running copy
I was trying to find out why I always get:
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://localhost:81/
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.
I tried "http_access allow all" since I'm using Squid as an accelerator,
but that didn't work.
My squid.conf:
http_port 80
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_dir ufs /var/spool/squid/cache 100 16 256
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st
"%{Referer}>h" %Ss:%Sh
access_log /var/log/squid/access_log combined
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
emulate_httpd_log on
pid_filename /var/run/squid.pid
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow all
http_reply_access allow all
httpd_accel_host localhost
httpd_accel_port 81
coredump_dir /usr/local/squid/var/cache
--
***********************************************************************
* John Oliver http://www.john-oliver.net/ *
* *
*********************************************************************** |
|
| Back to top |
|
 |
Visolve Squid Development *nix forums addict
Joined: 11 Mar 2005
Posts: 76
|
Posted: Thu Jul 06, 2006 4:22 am Post subject:
Re: Squid won't debug
|
|
|
John Oliver wrote:
| Quote: | [root@kira squid-2.5.STABLE14]# /usr/local/squid/sbin/squid -k debug
squid: ERROR: No running copy
Squid is not running.... |
Start Squid first then debug it
#/usr/local/squid/sbin/squid
#/usr/local/squid/sbin/squid -k debug
See the outputs in cache.log
| Quote: | I was trying to find out why I always get:
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://localhost:81/
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.
I tried "http_access allow all" since I'm using Squid as an accelerator,
but that didn't work.
Check your iptables setting. |
#iptables -L
If there is any rule set for denying port 81,remove it and then try it
again.
Also you can check to know whether the port 81 is opened.
#telnet localhost 81
--
Thanks,
Visolve Squid Team,
http://squid.visolve.com |
|
| Back to top |
|
 |
nima sadeghian *nix forums beginner
Joined: 31 Mar 2005
Posts: 15
|
Posted: Thu Jul 06, 2006 4:33 am Post subject:
Re: Squid won't debug
|
|
|
iptables dennying donot crash squid. I suggest you to check squid log
file, send complete conf of ur box plz...
On 7/6/06, John Oliver <joliver@john-oliver.net> wrote:
| Quote: | [root@kira squid-2.5.STABLE14]# /usr/local/squid/sbin/squid -k debug
squid: ERROR: No running copy
I was trying to find out why I always get:
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://localhost:81/
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.
I tried "http_access allow all" since I'm using Squid as an accelerator,
but that didn't work.
My squid.conf:
http_port 80
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_dir ufs /var/spool/squid/cache 100 16 256
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st
"%{Referer}>h" %Ss:%Sh
access_log /var/log/squid/access_log combined
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
emulate_httpd_log on
pid_filename /var/run/squid.pid
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow all
http_reply_access allow all
httpd_accel_host localhost
httpd_accel_port 81
coredump_dir /usr/local/squid/var/cache
--
***********************************************************************
* John Oliver http://www.john-oliver.net/ *
* *
***********************************************************************
|
--
Best Regards
NIMA SADEGHIAN |
|
| Back to top |
|
 |
Joost de Heer *nix forums Guru
Joined: 30 Mar 2005
Posts: 339
|
Posted: Thu Jul 06, 2006 11:33 am Post subject:
Re: Squid won't debug
|
|
|
| Quote: | ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://localhost:81/
The following error was encountered:
* Access Denied.
My squid.conf:
|
I doubt it is your complete squid.conf, as an ACL is used that's not present:
| Quote: | http_access deny !Safe_ports
|
This ACL is probably also the cause for the error: 81 isn't usually in a
list of 'safe ports'.
The 'No running copy' error might come from this:
| Quote: | pid_filename /var/run/squid.pid
|
Does the user that squid runs as have write access to this file? When you
startup the server, is an error printed in /var/log/squid/cache.log?
Joost |
|
| Back to top |
|
 |
John Oliver *nix forums beginner
Joined: 11 Apr 2005
Posts: 33
|
Posted: Thu Jul 06, 2006 4:53 pm Post subject:
Re: Squid won't debug
|
|
|
On Thu, Jul 06, 2006 at 09:44:10AM +0530, Visolve Squid wrote:
| Quote: | John Oliver wrote:
[root@kira squid-2.5.STABLE14]# /usr/local/squid/sbin/squid -k debug
squid: ERROR: No running copy
Squid is not running....
Start Squid first then debug it
#/usr/local/squid/sbin/squid
#/usr/local/squid/sbin/squid -k debug
|
Huh! That's... counterintuitive :-)
| Quote: | ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://localhost:81/
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.
I tried "http_access allow all" since I'm using Squid as an accelerator,
but that didn't work.
Check your iptables setting.
#iptables -L
If there is any rule set for denying port 81,remove it and then try it
again.
|
I do not use iptables, or any other firewall software on this host.
But the message I get (above) is from Squid.
| Quote: | Also you can check to know whether the port 81 is opened.
#telnet localhost 81
|
Yes, that was the first thing I verified :-)
--
***********************************************************************
* John Oliver http://www.john-oliver.net/ *
* *
*********************************************************************** |
|
| Back to top |
|
 |
John Oliver *nix forums beginner
Joined: 11 Apr 2005
Posts: 33
|
Posted: Thu Jul 06, 2006 4:55 pm Post subject:
Re: Squid won't debug
|
|
|
On Thu, Jul 06, 2006 at 01:33:21PM +0200, Joost de Heer wrote:
| Quote: | ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://localhost:81/
The following error was encountered:
* Access Denied.
My squid.conf:
I doubt it is your complete squid.conf, as an ACL is used that's not present:
http_access deny !Safe_ports
This ACL is probably also the cause for the error: 81 isn't usually in a
list of 'safe ports'.
|
AHHHHHH CRIMINY!! That's it The first time I set this up, I was
bright enough to add an ACL for 81 before I even started monkeying
around. This time, though...
Thanks, Joost!
--
***********************************************************************
* John Oliver http://www.john-oliver.net/ *
* *
*********************************************************************** |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|