niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
· nixdoc.net · man pages · Linux HOWTOs · FreeBSD Tips · Forums
navigation Forum index » Apps » Squid
Squid won't debug
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
Author Message
John Oliver
*nix forums beginner


Joined: 11 Apr 2005
Posts: 33

PostPosted: Wed Jul 05, 2006 9:14 pm    Post subject: Squid won't debug Reply with 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/ *
* *
***********************************************************************
Back to top
Visolve Squid Development
*nix forums addict


Joined: 11 Mar 2005
Posts: 76

PostPosted: Thu Jul 06, 2006 4:22 am    Post subject: Re: Squid won't debug Reply with quote

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

PostPosted: Thu Jul 06, 2006 4:33 am    Post subject: Re: Squid won't debug Reply with quote

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

PostPosted: Thu Jul 06, 2006 11:33 am    Post subject: Re: Squid won't debug Reply with quote

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

PostPosted: Thu Jul 06, 2006 4:53 pm    Post subject: Re: Squid won't debug Reply with quote

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

PostPosted: Thu Jul 06, 2006 4:55 pm    Post subject: Re: Squid won't debug Reply with quote

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 Smile 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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
The time now is Thu Sep 09, 2010 5:54 am | All times are GMT
navigation Forum index » Apps » Squid
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Insert header and footer in every page served by squid ehmedk Squid 0 Tue Apr 22, 2008 6:16 pm
No new posts Urgent and imp. Making Squid 2.6 stable as tranpsarent proxy SHERDIL Squid 0 Thu Aug 03, 2006 11:18 am
No new posts Help required for making squid 2.6 stable 2 transparent SHERDIL Squid 0 Tue Aug 01, 2006 6:55 am
No new posts Help required for making squid 2.6 stable 2 transparent SHERDIL Squid 0 Tue Aug 01, 2006 6:52 am
No new posts Shortening URLs passing through a squid hierarchy Irvine, Doug - Resources Squid 0 Fri Jul 21, 2006 10:15 am

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum |  email marketing service
 
Sponsors: Cheap Home Insurance | Debt Consolidation | DVD rental | Iphone 3g | Canon G11
Privacy Policy
[ Time: 0.3672s ][ Queries: 17 (0.3290s) ][ GZIP on - Debug on ]