Unable to Connect “The Squid Error “

So today i had a strange problem when i was only able to access google.com and not other sites. I was able to browse gmail, but not mail ru. Everything was working fine but out of no where this error “Unable to Connect” appeared on my Browsers. It was kinda strange, since i made no changes to my system” Also i was not sure if it’s the system or the Gateway.
Observation on System:
1) Both Firefox and Chrome giving the same problem.
2) I was able to browse with Chrome if Ultrasuf Extension was enabled.
3) Firebug reported “Aborted” in the Net tab

Steps taken:

Restarted the System
Changed the IP address
Result:
System Not Fixed

The above made me thing that i should take a look at the gateway since i was able to browse via Ultrasurf “Which by passes the Proxy”

Observation on Server:

[root@ITpings ~]# service squid status
 squid dead but pid file exists
 squid: ERROR: Could not send signal 0 to process 3217: (3) No such process
 [root@ITpings ~]# service squid restart
 Stopping squid:                                            [FAILED]
 Starting squid:                                            [  OK  ]
 [root@ITpings ~]# service squid status
 squid (pid 3318 3300 3280) is running...
 [root@ITpings~]# service squid stop
 Stopping squid:                                         [FAILED]

The above is very suspicious and clearly explaining that there is something wrong with squid.

More Tests:

[root@ITpings~]# squid -k parse
 [root@ITpings~]#
 [root@ITpings ~]# squid -k check
 squid: ERROR: Could not send signal 0 to process 3463: (3) No such process
[root@ITpings ~]# tail /var/log/messages
 Oct 1 02:29:41 ITpings squid[3491]: Squid Parent: child process 3516 exited with status 1
 Oct 1 02:29:41 ITpings squid[3491]: Exiting due to repeated, frequent failures
 Oct 1 02:29:42 ITpings squid[3508]: Squid Parent: child process 3513 exited due to signal 25

Now from above log we can see “Signal 25” which means that there is something wrong with the size of log files, therefore i started checking the size of logs for access.log, cache.log and store.log

[root@ITpings squid]# du -sh access.log
 1.4G    access.log
 [root@ITpings squid]# du -sh cache.log
 20M    cache.log
 [root@ITpings squid]# du -sh store.log
 2.1G    store.log

We found our Culprit, You can see that the log files are greater than 1 GB in case of access.log and store.log

Solution:

Copy the log files to external media and then delete the big log files. Once done stop the squid service and restart.

root@ITpings squid]# service squid stop
 Stopping squid: .                                          [  OK  ]
 [root@ITpings squid]# service squid start
 Starting squid: .                                          [  OK  ]

Hurray ! The System is up and Running !!

Conclusion:

Always check the size of log files in older red hat system, make sure they don’t exceed 2GB.  Change logrotate from monthly to weekly and from 4 to 8 in /etc/logrotate.conf and lastly Follow the troubleshooting steps and make your life easier.

I hope this article will be helpful for many

Thanks,

Salman A.Francis