Description of problem: If /var/spool/squid is enabled in the /etc/squid/squid.conf as cache_dir, squid does not start if /var/sppo/squid is empty, this is logged in /var/log/messages Oct 18 18:30:20 han squid[3094]: Squid Parent: (squid-1) process 3147 started Oct 18 18:30:20 han (squid-1): #011Failed to verify one of the swap directories, Check cache.log#012#011for details. Run 'squid -z' to create swap directories#012#011if needed, or if running Squid for the first time. Oct 18 18:30:20 han squid[3094]: Squid Parent: (squid-1) process 3147 exited with status 1 Before switching to systemd in older Fedora Releases, this was done automaticly in the init.d script. Version-Release number of selected component (if applicable): squid-3.2.0.13-1.fc16.i686 How reproducible: Allways Steps to Reproduce: 1. Enable cache_dir in /etc/squid/squid.conf 2. Make /var/spool/squid empty (i.e. "rm -r /var/spool/squid/* 3. Start squid with "systemctl start squid.service" Actual results: see above, squid does not start Expected results: Swap directories should be created and squid should start
There is missing ExecStartPre option in the squid.service file that will call script invoking squid -z as was done in sysv initscript. I'v tested it locally on F16 virtual machine. I'll commit it in next days (still watching BZ#7471{10,25})
squid-3.2.0.13-2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/squid-3.2.0.13-2.fc16
I can confirm the bug is fixed with squid-3.2.0.13-3.fc16
Package squid-3.2.0.13-3.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing squid-3.2.0.13-3.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-14951 then log in and leave karma (feedback).
Package squid-3.2.0.13-4.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing squid-3.2.0.13-4.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-14951 then log in and leave karma (feedback).
squid-3.2.0.13-4.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
I'm having this bug on F17, squid-3.2.0.16-1.fc17.x86_64. Sep 03 10:47:28 XXX (squid-1)[12203]: Failed to verify one of the swap directories, Check cache.log Sep 03 10:47:28 XXX squid[12188]: Squid Parent: (squid-1) process 12203 exited with status 1 Sep 03 10:47:28 XXX squid[12188]: Squid Parent: (squid-1) process 12203 will not be restarted due to repeated, frequent failures Sep 03 10:47:28 XXX squid[12188]: Exiting due to repeated, frequent failures Sep 03 10:47:28 XXX squid[12206]: squid: ERROR: Could not send signal 15 to process 1436: (3) No such process cache.log 2012/09/03 10:47:28 kid1| Starting Squid Cache version 3.2.0.16 for x86_64-redhat-linux-gnu... 2012/09/03 10:47:28 kid1| Process ID 12203 2012/09/03 10:47:28 kid1| Process Roles: worker 2012/09/03 10:47:28 kid1| With 16384 file descriptors available 2012/09/03 10:47:28 kid1| Initializing IP Cache... 2012/09/03 10:47:28 kid1| DNS Socket created at [::], FD 7 2012/09/03 10:47:28 kid1| DNS Socket created at 0.0.0.0, FD 8 2012/09/03 10:47:28 kid1| Adding nameserver XXX.XXX.XXX.XXX from /etc/resolv.conf 2012/09/03 10:47:28 kid1| Adding nameserver XXX.XXX.XXX.XXX from /etc/resolv.conf 2012/09/03 10:47:28 kid1| Logfile: opening log daemon:/var/log/squid/access.log 2012/09/03 10:47:28 kid1| Logfile Daemon: opening log /var/log/squid/access.log 2012/09/03 10:47:28 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec 2012/09/03 10:47:28 kid1| Store logging disabled 2012/09/03 10:47:28 kid1| Swap maxSize 20971520 + 262144 KB, estimated 1633358 objects 2012/09/03 10:47:28 kid1| Target number of buckets: 81667 2012/09/03 10:47:28 kid1| Using 131072 Store buckets 2012/09/03 10:47:28 kid1| Max Mem size: 262144 KB 2012/09/03 10:47:28 kid1| Max Swap size: 20971520 KB 2012/09/03 10:47:28 kid1| /var/spool/squid/00: (2) No such file or directory FATAL: Failed to verify one of the swap directories, Check cache.log for details. Run 'squid -z' to create swap directories if needed, or if running Squid for the first time. Squid Cache (Version 3.2.0.16): Terminated abnormally. CPU Usage: 0.056 seconds = 0.030 user + 0.026 sys Maximum Resident Size: 53408 KB Page faults with physical i/o: 0 /var/log/squid/squid.out is empty. /usr/libexec/squid/cache_swap.sh is failing (or not being executed) somehow.
OK, cache_swap.sh was failing because systemd's ExecStartPre doesn't allow forking processes. Squid needs the "-N" (no daemon mode) there.
Err, the "-N" (no daemon mode) *option* there.
Please fix cache_swap.sh adding "-N" option to squid. The current F17 package (and probably F18/rawhide) is kind of broken as it will refuse to start in a clean install. Also take a look at Bug 854356 Thanks.
(In reply to comment #10) > Please fix cache_swap.sh adding "-N" option to squid. The current F17 > package (and probably F18/rawhide) is kind of broken as it will refuse to > start in a clean install. > > Also take a look at Bug 854356 > > Thanks. First of all I believe there should be opened new bug. I went through the initial squid's code and I guess forking should be invoked after handling swap dirs. I don't see necessity forking due to this operation because the squid is terminated just after swap dirs creation. Henrik, what's your opinion?
Done: Bug 859393