LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-07-2010, 01:13 PM   #1
txlombardi
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Rep: Reputation: 0
Squid Redirect


I'm having some problems with a Squid redirect. The system:
Fedora 12 - fully updated as of April 6, 2010
Squid installed
SquidGuard installed
Transparent-Proxying installed (runs as a service)
IPTABLES running
Server has 2 NIC's
Server is configured as a bridge
Transparent proxy configured and working
Trying to setup a Captive Portal as detailed on the following site:

http://www.alexvanherwijnen.nl/blog/...ortal-for-free

All components for the Captive Portal are installed.
Here is the problem. The last item to do for the Captive Portal was modify squid.conf, which was done. Immediately, when restarting the Squid service, I got the following error (several errors shown, but each instance is from one attempt to stop and start the squid service):
squid: ERROR: Could not send signal 0 to process 2983: (3) No such process
squid: ERROR: Could not send signal 0 to process 3457: (3) No such process
squid: ERROR: Could not send signal 0 to process 7763: (3) No such process
squid: ERROR: Could not send signal 0 to process 7867: (3) No such process
Terminal window shows the following:
[root@pns-linux admin]# service squid stop
Stopping squid: [FAILED]
[root@pns-linux admin]# service squid status
squid dead but pid file exists
[root@pns-linux admin]#
What is causing the failure and errors is the following lines in the squid.conf file:
url_rewrite_program /var/www/html/scripts/redirect.php
url_rewrite_children 4
If I comment the two lines out, Squid and the transparent proxy works fine, but then there is no redirection for the Captive Portal. The redirect.php is there and it is set to allow execution. It is almost as if the url_rewrite_program is not there. I have looked in the file system for it, but found nothing. My guess is it is probably a procedure in a configuration file.

Any help would be appreciated. This has been dogging me for three days now.

Tony

Last edited by txlombardi; 04-07-2010 at 01:16 PM.
 
Old 04-07-2010, 02:01 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,134

Rep: Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456Reputation: 2456
Quote:
Originally Posted by txlombardi View Post
I'm having some problems with a Squid redirect. The system:
Fedora 12 - fully updated as of April 6, 2010
Squid installed
SquidGuard installed
Transparent-Proxying installed (runs as a service)
IPTABLES running
Server has 2 NIC's
Server is configured as a bridge
Transparent proxy configured and working
Trying to setup a Captive Portal as detailed on the following site:

http://www.alexvanherwijnen.nl/blog/...ortal-for-free

All components for the Captive Portal are installed.
Here is the problem. The last item to do for the Captive Portal was modify squid.conf, which was done. Immediately, when restarting the Squid service, I got the following error (several errors shown, but each instance is from one attempt to stop and start the squid service):
squid: ERROR: Could not send signal 0 to process 2983: (3) No such process
squid: ERROR: Could not send signal 0 to process 3457: (3) No such process
squid: ERROR: Could not send signal 0 to process 7763: (3) No such process
squid: ERROR: Could not send signal 0 to process 7867: (3) No such process
Terminal window shows the following:
[root@pns-linux admin]# service squid stop
Stopping squid: [FAILED]
[root@pns-linux admin]# service squid status
squid dead but pid file exists
[root@pns-linux admin]#
What is causing the failure and errors is the following lines in the squid.conf file:
url_rewrite_program /var/www/html/scripts/redirect.php
url_rewrite_children 4
If I comment the two lines out, Squid and the transparent proxy works fine, but then there is no redirection for the Captive Portal. The redirect.php is there and it is set to allow execution. It is almost as if the url_rewrite_program is not there. I have looked in the file system for it, but found nothing. My guess is it is probably a procedure in a configuration file.
Well, the:
Quote:
squid dead but pid file exists
line jumps out. How did you stop squid the first time?? If you just killed it, the PID file is still there. Check in /var/lock (or look in the squid startup script), for where the squid PID file is kept. Delete it, then try to restart.

Looks like something has an old pid lockfile out there, that references the pids that don't exist anymore.
 
Old 04-07-2010, 07:05 PM   #3
txlombardi
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you for the reply TB0ne.

As you can see from the lines I placed in my email, the service was stopped using "service squid stop" command. If the service was started with the url_rewrite_program uncommented in the squid.conf file, when stopping the service the error occurred. If the service was started with the url_rewrite_program commented out, there was no problem starting or stopping the service without error. The process was not killed.

Something is going on with the url_rewrite_program. Are you familiar with it?

Tony
 
  


Reply

Tags
proxy, redirect, squid, transparent


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect Squid to another gateway wazh Linux - Networking 3 04-04-2010 05:37 AM
Squid how to redirect url gubak Linux - Networking 3 03-04-2010 02:06 PM
Squid NTLM and Redirect help InEeDhElPlInUx Linux - Server 0 10-31-2007 11:18 AM
Squid redirect butchybro Linux - Networking 0 06-04-2005 05:06 AM
Redirect ICQ to Squid Padre Linux - Software 0 12-18-2003 07:29 AM


All times are GMT -5. The time now is 09:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration