My Oracle Support Banner

squid Service Failed to Start on Spacewalk Proxy due to WARNING: Cannot write log file: /var/log/squid/cache.log (Doc ID 2552027.1)

Last updated on JULY 28, 2020

Applies to:

Linux OS - Version Oracle Linux 7.6 and later
Linux x86-64

Symptoms

squid service failed to start on Spacewalk Proxy due to 'WARNING: Cannot write log file: /var/log/squid/cache.log', which is shown in File: /var/log/messages

Jun 6 09:55:17 <spacewalk_proxy> systemd[1]: Starting Squid caching proxy...
Jun 6 09:55:17 <spacewalk_proxy> squid[15333]: 2019/06/06 09:55:17| WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
Jun 6 09:55:17 <spacewalk_proxy> squid[15333]: 2019/06/06 09:55:17| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
Jun 6 09:55:17 <spacewalk_proxy> squid[15333]: 2019/06/06 09:55:17| WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
Jun 6 09:55:17 <spacewalk_proxy> squid[15333]: 2019/06/06 09:55:17| WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
Jun 6 09:55:17 <spacewalk_proxy> squid[15333]: 2019/06/06 09:55:17| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
Jun 6 09:55:17 <spacewalk_proxy> squid[15333]: 2019/06/06 09:55:17| WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
Jun 6 09:55:17 <spacewalk_proxy> squid[15333]: WARNING: Cannot write log file: /var/log/squid/cache.log <<<-------
Jun 6 09:55:17 <spacewalk_proxy> squid[15333]: /var/log/squid/cache.log: Permission denied
Jun 6 09:55:17 <spacewalk_proxy> squid[15333]: messages will be sent to 'stderr'.
Jun 6 09:55:17 <spacewalk_proxy> squid[15338]: Squid Parent: will start 1 kids
Jun 6 09:55:17 <spacewalk_proxy> squid[15338]: Squid Parent: (squid-1) process 15340 started
Jun 6 09:55:17 <spacewalk_proxy> systemd[1]: Started Squid caching proxy.
Jun 6 09:55:17 <spacewalk_proxy> (squid-1): Cannot open '/var/log/squid/access.log' for writing.#012#011The parent directory must be writeable by the#012#011user 'squid', which is the cache_effective_user#012#011set in squid.conf. <<<------
Jun 6 09:55:17 <spacewalk_proxy> squid[15338]: Squid Parent: (squid-1) process 15340 exited with status 1
Jun 6 09:55:20 <spacewalk_proxy> squid[15338]: Squid Parent: (squid-1) process 15348 started
Jun 6 09:55:20 <spacewalk_proxy> (squid-1): Cannot open '/var/log/squid/access.log' for writing.#012#011The parent directory must be writeable by the#012#011user 'squid', which is the cache_effective_user#012#011set in squid.conf.
Jun 6 09:55:20 <spacewalk_proxy> squid[15338]: Squid Parent: (squid-1) process 15348 exited with status 1
Jun 6 09:55:23 <spacewalk_proxy> squid[15338]: Squid Parent: (squid-1) process 15355 started
Jun 6 09:55:23 <spacewalk_proxy> (squid-1): Cannot open '/var/log/squid/access.log' for writing.#012#011The parent directory must be writeable by the#012#011user 'squid', which is the cache_effective_user#012#011set in squid.conf.
Jun 6 09:55:23 <spacewalk_proxy> squid[15338]: Squid Parent: (squid-1) process 15355 exited with status 1
Jun 6 09:55:26 <spacewalk_proxy> squid[15338]: Squid Parent: (squid-1) process 15362 started
Jun 6 09:55:26 <spacewalk_proxy> (squid-1): Cannot open '/var/log/squid/access.log' for writing.#012#011The parent directory must be writeable by the#012#011user 'squid', which is the cache_effective_user#012#011set in squid.conf.
Jun 6 09:55:26 <spacewalk_proxy> squid[15338]: Squid Parent: (squid-1) process 15362 exited with status 1
Jun 6 09:55:29 <spacewalk_proxy> squid[15338]: Squid Parent: (squid-1) process 15368 started
Jun 6 09:55:29 <spacewalk_proxy> (squid-1): Cannot open '/var/log/squid/access.log' for writing.#012#011The parent directory must be writeable by the#012#011user 'squid', which is the cache_effective_user#012#011set in squid.conf.
Jun 6 09:55:29 <spacewalk_proxy> squid[15338]: Squid Parent: (squid-1) process 15368 exited with status 1
Jun 6 09:55:29 <spacewalk_proxy> squid[15338]: Squid Parent: (squid-1) process 15368 will not be restarted due to repeated, frequent failures
Jun 6 09:55:29 <spacewalk_proxy> squid[15338]: Exiting due to repeated, frequent failures
Jun 6 09:55:29 <spacewalk_proxy> systemd[1]: squid.service: main process exited, code=exited, status=1/FAILURE

File:/var/log/squid/cache.log shows following alert.

2019/06/03 10:05:43| ALERT: initgroups: unable to set groups for User root and Group 0 <-----
2019/06/03 10:05:43 kid1| ALERT: initgroups: unable to set groups for User root and Group 0
2019/06/03 10:05:43 kid1| Current Directory is /
2019/06/03 10:05:43 kid1| ALERT: initgroups: unable to set groups for User root and Group 0
2019/06/03 10:05:43 kid1| Squid is not safe to run as root! If you must
2019/06/03 10:05:43 kid1| start Squid as root, then you must configure
2019/06/03 10:05:43 kid1| it to run as a non-priveledged user with the
2019/06/03 10:05:43 kid1| 'cache_effective_user' option in the config file.
2019/06/03 10:05:43 kid1| ALERT: initgroups: unable to set groups for User root and Group 0
FATAL: Don't run Squid as root, set 'cache_effective_user'!
Squid Cache (Version 3.5.20): Terminated abnormally.
CPU Usage: 0.036 seconds = 0.026 user + 0.010 sys
Maximum Resident Size: 45712 KB
Page faults with physical i/o: 0

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.