How to find out why squid proxy exited due to signal 9 with status 0
I am getting an error that read as “The proxy server is refusing connections.” I am using Squid 3 with Ubuntu Linux 16.04 LTS server and how can I find out why my squid proxy server died unexpectedly?
Squid is a caching and open source proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing. Squid can die due to any number of reasons. Let us see some basic steps to find out what caused such errors on Ubuntu Linux server.
You or user might see an error as follows on browser screen:
Squid proxy server attached to the network and provided the proxy server. So let us start digging into the problem.
Check list #1: Client or server problem
Go to another client browser or computer and try to access the internet via squid proxy. If this computer also can’t access squid server, then you know the problem is more likely on squid server itself. Next, you need to focus troubleshooting on squid server itself. Login using ssh: $ ssh firstname.lastname@example.org
Check list #2: Is server port open?
Type the following command on Ubuntu Linux server to verify that the TCP port 3128 (default) is open: $ netstat -tulpn $ ss -tulpn $ netstat -tulpn | grep 3128 If no output means squid is not running. Try to start it, run: $ sudo systemctl start squid
Check list #3: Is squid proxy server running?
Use the ps command along with the grep command as follows: $ ps aux | grep -i squid OR use the pgrep command: $ pgrep squid If squid still not starting or running, check for other errors.
Check list 4: Check squid log file or status of squid server
Type the following command: $ sudo systemctl status squid Bingo, I found the error:
Feb 04 04:09:01 nixcraft-squid-do-0001 squid: Squid Parent: (squid-1) process 1661 exited due to signal 9 with status 0
Random killing of the process indicates out of memory (OOM) situation. It is an often undesired state of computer operation where no additional memory can be allocated for use by programs or the operating system.
So now you know exact reasons why our squid died. To fix this problem, you might need to stop the unwanted process. Another option is to add additional ram. In my case, I had more than enough RAM. It turns out it was a kernel bug – “Out of memory” errors after upgrade to kernel version 4.4.0-59 on Ubuntu 16.04 LTS: $ uname -mrs Linux 4.4.0-59-generic x86_64 The ultimate solution is to apply kernel fix by typing the apt-get command or apt command as follows: $ sudo apt-get update $ sudo apt-get upgrade ## force upgrade ## $ sudo apt-get dist-upgrade Reboot the Linux server, enter: $ sudo reboot $ uname -mrs Linux 4.4.0-62-generic x86_64
And, there you have it solution to find and fix the problem. I strongly suggest that you subscribe to bug tracking mailing list or feed.
The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.