LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-04-2009, 07:00 AM   #1
perfectpol7
Member
 
Registered: Feb 2009
Posts: 84

Rep: Reputation: 15
Squid cannot start after powerfailure


I am running fedora 10 and webmin squid proxy server, after power failure the squid fails to start. i have tried to start it from command line but failed

[root@ ~]# /etc/init.d/squid start
Starting squid: .................... [FAILED]
[root@ ~]# /etc/init.d/squid reload
squid: ERROR: No running copy
[root@~]# /etc/init.d/squid stop
Stopping squid: [FAILED]

how can i start squid again and what is fault or what file had been corrupted by powerfailure
 
Old 03-04-2009, 07:12 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can run:
Code:
/usr/sbin/squid -Nd1
to see debug messages when squid tries to start
 
Old 03-04-2009, 07:58 AM   #3
perfectpol7
Member
 
Registered: Feb 2009
Posts: 84

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
You can run:
Code:
/usr/sbin/squid -Nd1
to see debug messages when squid tries to start
the results are:

the output results for code
[root@goodheavens ~]# /usr/sbin/squid -Nd1
2009/03/04 15:54:13| Starting Squid Cache version 3.0.STABLE13 for i386-redhat-linux-gnu...
2009/03/04 15:54:13| Process ID 6427
2009/03/04 15:54:13| With 1024 file descriptors available
2009/03/04 15:54:13| Performing DNS Tests...
2009/03/04 15:54:13| Successful DNS name lookup tests...
2009/03/04 15:54:13| DNS Socket created at 0.0.0.0, port 52630, FD 5
2009/03/04 15:54:13| Adding domain Goodheavens2.local from /etc/resolv.conf
2009/03/04 15:54:13| Adding domain Goodheavens2.local from /etc/resolv.conf
2009/03/04 15:54:13| Adding nameserver 10.0.0.3 from /etc/resolv.conf
2009/03/04 15:54:13| User-Agent logging is disabled.
2009/03/04 15:54:13| Referer logging is disabled.
2009/03/04 15:54:13| Unlinkd pipe opened on FD 10
2009/03/04 15:54:13| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2009/03/04 15:54:13| Swap maxSize 102400 KB, estimated 7876 objects
2009/03/04 15:54:13| Target number of buckets: 393
2009/03/04 15:54:13| Using 8192 Store buckets
2009/03/04 15:54:13| Max Mem size: 8192 KB
2009/03/04 15:54:13| Max Swap size: 102400 KB
2009/03/04 15:54:13| Rebuilding storage in /var/spool/squid (DIRTY)
2009/03/04 15:54:13| Using Least Load store dir selection
2009/03/04 15:54:13| Set Current Directory to /var/spool/squid
2009/03/04 15:54:13| Loaded Icons.
2009/03/04 15:54:13| commBind: Cannot bind socket FD 11 to 10.0.0.5:3128: (99) Cannot assign requested address
FATAL: Cannot open HTTP Port
[root@goodheavens ~]#

what need to be done then.
 
Old 03-04-2009, 08:18 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
2009/03/04 15:54:13| commBind: Cannot bind socket FD 11 to 10.0.0.5:3128: (99) Cannot assign requested address
What is the output of the following commands:
Code:
netstat -tan|grep 3128
ifconfig
 
Old 03-04-2009, 08:47 AM   #5
perfectpol7
Member
 
Registered: Feb 2009
Posts: 84

Original Poster
Rep: Reputation: 15
rootgoodheavens~]# ifconfig
eth2 Link encap:Ethernet HWaddr 00:19:CB:53D:5B
inet addr:10.0.0.41 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::219:cbff:fe53:dd5b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:24810 errors:0 dropped:0 overruns:0 frame:0
TX packets:19054 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8853977 (8.4 MiB) TX bytes:3446667 (3.2 MiB)
Interrupt:19 Base address:0xe000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:26113 errors:0 dropped:0 overruns:0 frame:0
TX packets:26113 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6580073 (6.2 MiB) TX bytes:6580073 (6.2 MiB)

[root@goodheavens ~]#
root@goodheavens~]# netstat -tan|grep 3128
returns nothing
 
Old 03-04-2009, 09:06 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
rootgoodheavens~]# ifconfig
eth2 Link encap:Ethernet HWaddr 00:19:CB:53D:5B
inet addr:10.0.0.41 Bcast:10.0.0.255 Mask:255.255.255.0
Your IP is 10.0.0.41 and squid is configured to listen on 10.0.0.5. That's why it's not starting.
Change the http_port in squid.conf accordingly and try to restart squid.
 
Old 03-04-2009, 09:35 AM   #7
perfectpol7
Member
 
Registered: Feb 2009
Posts: 84

Original Poster
Rep: Reputation: 15
changed now squid is running. thanks
 
Old 03-04-2009, 05:28 PM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Glad to see it worked.
Now if you're on a dynamic IP you should use just the port number for http_prot in squid.conf, to avoid similar problems in the future.

Regards
 
Old 03-04-2009, 05:54 PM   #9
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
hmm, wouldn't it simply be easier to have the squid server use a static ip (or ip reservation in the dhcp server)?
squid is afterall a proxy, which means that something has to statically point at it, be it your web browser for outbound proxying, or your router for inbound (reverse) proxying
just a thought
 
  


Reply



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
installing squid : service squid start --> error jonaskellens Linux - Software 2 09-05-2008 03:06 AM
CRC error after powerfailure Koetsier Linux - Software 2 04-26-2006 02:25 AM
Firewire powerfailure - device not recognised - what files to flush? redness Linux - Hardware 0 01-28-2005 04:23 AM
Firewire powerfailure - device no recognised - what files to flush? redness Linux - Networking 0 01-28-2005 01:39 AM
I can't "service squid start" , and chkconfig squid on not working Niceman2005 Linux - Software 0 11-10-2004 08:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:00 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration