Proxy / Squid doesn't start after reboot

I installed a clean install 179 turned on the proxy and enabled the proxy on port 3128 on the green interface. Transparent proxy is not enabled. I did not make any other configuration changes in the proxy settings. After the start or reboot, the proxy does not turn on, it is necessary via Network - Web proxy to run Save and restart.
After that it works normally until next reboot.
What could be the problem ?
Thanks.

1 Like

To help identify the issue, please reboot your system to trigger the problematic behavior. Once rebooted, access the console and provide the output of the following commands:

  1. cat /var/log/bootlog or alternatively, the output of dmesg
  2. grep -a 'squid' /var/log/messages

This information will give us clues about why the proxy isn’t starting as expected upon reboot.

1 Like

Here is it
logs.zip (19.3 KB)

I didn’t find relevant information in the bootlog, and the kernel logs don’t provide useful details on why Squid is crashing. I recommend you consult the IPFire wiki page on Squid logs as a starting point for your investigation. Follow the guidance there, and don’t hesitate to ask further questions if needed.

How should be proxy started ?
What should I check if is really there attempt to start ?

Because if after restart I run /etc/init.d/squid start
proxy started without problem.

Are you running out of ram?
What hardware are you using?
Are those memory errors normal?

I have the same problem since a couple of days. Don’t know what triggered it. Maybe it came up with a update to core 179.

Squid is a bad parent again. Child dies at startup.

1 Like

I just grab some old PC with working Windows 7 and installed ipfire and added network card. When I start proxy manuly then it works stable.

This will be squid related… again… squid is updated with core 180. Atm I don’t have that issue with core 180 testing.

Maybe I’m wrong, but there is no symlink in rc3.d to start squid.

Without checking, you must be wrong :stuck_out_tongue_winking_eye: because that issue occurs randomly with my core 179 installation.

You are correct.

There are symlinks in rc0.d and rc6.d to stop squid when you reboot or shutdown the system.

squid is not started directly via symlinks. It is started via other code at the appropriate time, using the squidctrl program
https://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=src/misc-progs/squidctrl.c;h=b1b9067319ad9929d1ab56f3c794047b2104bc7f;hb=HEAD

which calls the squid initscript
https://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=src/initscripts/system/squid;h=b7cb30b7c92e43277ea00b0ceb9e13cb262532da;hb=HEAD

To find where in the code the web proxy is started during the startup you would need to go through the git code.
https://git.ipfire.org/?p=ipfire-2.x.git;a=tree;h=refs/heads/core179;hb=refs/heads/core179

I am also running Core Update 179 in my production machine and I don’t see any restarts of squid in my logs and when I rebooted after the core update to 179 my web proxy started and has stayed running.

In the update.sh script for the upgrade there is a section that restarts squid if it has been enabled.

# Start services
/etc/init.d/udev restart
if [ -f /var/ipfire/proxy/enable ]; then
	/etc/init.d/squid restart
fi
if grep -q "ENABLED=on" /var/ipfire/ovpn/settings; then
	/usr/local/bin/openvpnctrl -s
fi
/usr/local/bin/openvpnctrl -sn2n

So it is not clear what would be causing the problem without more detail in the logs. I didn’t find anything obvious in your logs at first glance.

I just noticed that you said that you did not enable the transparent so you presumably just enabled it on green. However you have selected the port that is normally used for the transparent proxy. Normally the proxy port for the conventional mode is 800.

Could you show a screen shot of the top section of your web proxy WUI page.

I would also suggest following the link provided by @cfusco in post 4 above. The wiki page on logging for the proxy provides info on how to get more logging detail provided for debug purposes.

Definitely worth having a read through.

Problem still valid with core 180 testing.

10:57:02 squid[9410]: Squid Parent: will start 1 kids
10:57:02 squid[9410]: Squid Parent: (squid-1) process 9420 started
10:57:02 squid[9410]: Squid Parent: squid-1 process 9420 exited with status 0

After Save+Restart.

10:58:19 squid[9832]: Squid Parent: will start 1 kids
10:58:19 squid[9832]: Squid Parent: (squid-1) process 9835 started
10:58:19 squid[9832]: Squid Parent: squid-1 process 9835 exited with status 0
10:58:20 squid[9845]: Squid Parent: will start 1 kids
10:58:20 squid[9845]: Squid Parent: (squid-1) process 9848 started

Edit: I don’t have additional (recent) logs:

Never touched this:

I don’t understand why you have no cache.log files.

There should be 4 logs in there, which get rotated round every week. I have four on my system.

-rw-r–r-- 1 squid squid 22K Oct 2 12:07 cache.log
-rw-r–r-- 1 squid squid 2.8K Sep 28 13:48 cache.log.1.gz
-rw-r–r-- 1 squid squid 146 Sep 18 20:45 cache.log.2.gz
-rw-r–r-- 1 squid squid 336 Sep 13 22:35 cache.log.3.gz

Have you turned off the logging on your web proxy WUI page. I also see that all of your access logs are either 0 bits for the uncompressed one or 20 bits for the compressed ones. They should have all the proxy requests stored.

Mine looks like

-rw-r–r-- 1 squid squid 17K Oct 2 12:06 access.log
-rw-r–r-- 1 squid squid 150K Jul 29 23:30 access.log.10.gz
-rw-r–r-- 1 squid squid 124K Jul 22 23:26 access.log.11.gz
-rw-r–r-- 1 squid squid 123K Jul 15 16:51 access.log.12.gz
-rw-r–r-- 1 squid squid 100K Jul 8 18:14 access.log.13.gz
-rw-r–r-- 1 squid squid 238K Jul 1 23:59 access.log.14.gz
-rw-r–r-- 1 squid squid 80K Sep 29 23:51 access.log.1.gz
-rw-r–r-- 1 squid squid 22K Sep 19 17:55 access.log.2.gz
-rw-r–r-- 1 squid squid 83K Sep 16 16:33 access.log.3.gz
-rw-r–r-- 1 squid squid 163K Sep 9 22:54 access.log.4.gz
-rw-r–r-- 1 squid squid 110K Sep 2 20:20 access.log.5.gz
-rw-r–r-- 1 squid squid 109K Aug 26 22:20 access.log.6.gz
-rw-r–r-- 1 squid squid 77K Aug 19 16:29 access.log.7.gz
-rw-r–r-- 1 squid squid 103K Aug 12 10:20 access.log.8.gz
-rw-r–r-- 1 squid squid 11K Aug 5 23:32 access.log.9.gz

Yours look to all be empty.

The only logging I have disable is the firewall log for massive dropped and ignored inbound. How do I check if the logging is disabled or not?

Edit: got you and found that checkbox. It was unchecked. I enabled it for further investigations.

On the web proxy page, the fourth section down is labelled Log settings.

The default for the Web Proxy page is that the Log enabled: checkbox is not checked.

??? It’s enabled by an uncheck checkbox for “Log enabled”?

It’s enabled by checking the checkbox but the default is that it is not checked.

ie default for the Web Proxy is that logging is not enabled.

yes your “:” makes the difference. Without it it makes sense to me. So it’s enabled now. The next time I have that issue I will have a look into the cache log.