I'm still pulling my hair out trying to figure out why Squid 3.5.2 with SSL caching enabled will only start after the /var/spool/squid/cache is emptied. This is the debug info I am getting when starting Squid when the cache is not emptied.
2015/03/29 10:27:56.896| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.900| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.900| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.900| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.900| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56 kid1| Current Directory is /2015/03/29 10:27:56 kid1| Creating missing swap directories2015/03/29 10:27:56 kid1| /var/spool/squid/cache exists2015/03/29 10:27:56 kid1| /var/spool/squid/cache/00 exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/002015/03/29 10:27:56 kid1| /var/spool/squid/cache/01 exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/012015/03/29 10:27:56 kid1| /var/spool/squid/cache/02 exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/022015/03/29 10:27:56 kid1| /var/spool/squid/cache/03 exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/032015/03/29 10:27:56 kid1| /var/spool/squid/cache/04 exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/042015/03/29 10:27:56 kid1| /var/spool/squid/cache/05 exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/052015/03/29 10:27:56.928| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.928| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.929| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56 kid1| /var/spool/squid/cache/06 exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/062015/03/29 10:27:56 kid1| /var/spool/squid/cache/07 exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/072015/03/29 10:27:56 kid1| /var/spool/squid/cache/08 exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/082015/03/29 10:27:56 kid1| /var/spool/squid/cache/09 exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/092015/03/29 10:27:56 kid1| /var/spool/squid/cache/0A exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/0A2015/03/29 10:27:56 kid1| /var/spool/squid/cache/0B exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/0B2015/03/29 10:27:56 kid1| /var/spool/squid/cache/0C exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/0C2015/03/29 10:27:56 kid1| /var/spool/squid/cache/0D exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/0D2015/03/29 10:27:56 kid1| /var/spool/squid/cache/0E exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/0E2015/03/29 10:27:56 kid1| /var/spool/squid/cache/0F exists2015/03/29 10:27:56 kid1| Making directories in /var/spool/squid/cache/0F2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.954 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.955 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.955 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.955 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.955 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.955 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.955 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.955 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.955 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.955 kid1| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56.956| Acl.cc(380) ~ACL: freeing ACL2015/03/29 10:27:56 kid1| Current Directory is /2015/03/29 10:27:56 kid1| Starting Squid Cache version 3.5.2 for i586-pc-linux-gnu...2015/03/29 10:27:56 kid1| Service Name: squid2015/03/29 10:27:56 kid1| Process ID 13492015/03/29 10:27:56 kid1| Process Roles: worker2015/03/29 10:27:56 kid1| With 1024 file descriptors available2015/03/29 10:27:56 kid1| Initializing IP Cache...2015/03/29 10:27:56 kid1| DNS Socket created at 0.0.0.0, FD 82015/03/29 10:27:56 kid1| Adding nameserver 127.0.0.1 from /etc/resolv.conf2015/03/29 10:27:56 kid1| helperOpenServers: Starting 5/5 'ssl_crtd' processesFATAL: Ipc::Mem::Segment::open failed to shm_open(/squid-ssl_session_cache.shm): (2) No such file or directorySquid Cache (Version 3.5.2): Terminated abnormally.CPU Usage: 0.010 seconds = 0.003 user + 0.007 sysMaximum Resident Size: 26720 KBPage faults with physical i/o: 0
This snippet of the debug messages is repeated 5 times, one for each of the five ssl_crtd processes (kids?) that are trying to start.
I have patched the "src/main.cc" file using a modified version of the patch file found here <http://www.squid-cache.org/Versions/v4/changesets/squid-4-13984.patch>. However, the patch file at this link no longer matches the main.cc file for 3.5.2 so I had to make my best guess what that patch file should be.
--- squid-3.5.2/src/main.cc.orig 2015-03-19 20:27:40.092678987 -0500+++ squid-3.5.2/src/main.cc 2015-03-19 15:42:26.000000000 -0500@@ -871,6 +871,7 @@}writePidFile(); /* write PID file */+ enter_suid(); // writePidFile() uses leave_suid()reconfiguring = 0;}@@ -1123,11 +1124,19 @@if (!configured_once)writePidFile(); /* write PID file */+ enter_suid(); // writePidFile() uses leave_suid()#if defined(_SQUID_LINUX_THREADS_)squid_signal(SIGQUIT, rotate_logs, SA_RESTART);+ removePidFile();+ enter_suid(); // removePidFile() uses leave_suid()+ if (TheKids.someSignaled(SIGINT) || TheKids.someSignaled(SIGTERM)) {+ syslog(LOG_ALERT, "Exiting due to unexpected forced shutdown");+ exit(1);+ }+squid_signal(SIGTRAP, sigusr2_handle, SA_RESTART);#else
The patch did nothing to fix the issue I am having with the errors I am getting above with the five ssl_crtd kids failing to start giving that error message :
FATAL: Ipc::Mem::Segment::open failed to shm_open(/squid-ssl_session_cache.shm): (2) No such file or directory
Here are my squid 3.5.2 compile options
CONFIG_OPTS += --enable-storeio="diskd,ufs,aufs" --enable-linux-netfilter \--enable-removal-policies="heap,lru" --enable-delay-pools --libdir=/usr/lib/ \--localstatedir=/var --with-dl --with-openssl --enable-http-violations \--with-large-files --with-libcap --disable-ipv6 --with-swapdir=/var/spool/squid \--enable-ssl-crtd --enable-follow-x-forwarded-for
And here is my squid.conf file with SSL caching enabled
I think I am about ready to give up on trying to get Squid 3.5.2 working and just fall back to Squid 3.4.10 which was the last version that worked correctly and didn't give me these startup issues.visible_hostname smoothwall# Uncomment the following to send debug info to /var/log/squid/cache.logdebug_options ALL,1 33,2 28,9# ACCESS CONTROLS# ----------------------------------------------------------------acl localhostgreen src 192.168.100.1acl localnetgreen src 192.168.100.0/24acl SSL_ports port 445 443 441 563acl Safe_ports port 80 # httpacl Safe_ports port 81 # smoothwall httpacl Safe_ports port 21 # ftpacl Safe_ports port 445 443 441 563 # https, snewsacl Safe_ports port 70 # gopheracl Safe_ports port 210 # waisacl Safe_ports port 1025-65535 # unregistered portsacl Safe_ports port 280 # http-mgmtacl Safe_ports port 488 # gss-httpacl Safe_ports port 591 # filemakeracl Safe_ports port 777 # multiling httpacl CONNECT method CONNECT# TAG: http_access# ----------------------------------------------------------------http_access deny !Safe_portshttp_access deny CONNECT !SSL_portshttp_access allow localnetgreenhttp_access allow CONNECT localnetgreenhttp_access allow localhostgreenhttp_access allow CONNECT localhostgreen# http_port and https_port#----------------------------------------------------------------------------# A random port for forward-proxy port needed for SSLhttp_port 8081http_port 192.168.100.1:800 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/var/smoothwall/mods/proxy/ssl_cert/squidCA.pemhttps_port 192.168.100.1:808 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/var/smoothwall/mods/proxy/ssl_cert/squidCA.pemsslproxy_cert_error allow allsslproxy_flags DONT_VERIFY_PEERssl_bump server-first allssl_bump none localhostgreensslcrtd_program /var/smoothwall/mods/proxy/libexec/ssl_crtd -s /var/smoothwall/mods/proxy/lib/ssl_db -M 4MBsslcrtd_children 5sslproxy_session_cache_size 4 MBhttp_access deny allcache_replacement_policy heap GDSFmemory_replacement_policy heap GDSF# CACHE OPTIONS# ----------------------------------------------------------------------------cache_effective_user squidcache_effective_group squidcache_swap_high 100cache_swap_low 80cache_mem 8 MBmaximum_object_size_in_memory 512 KBcache_access_log /var/log/squid/access.logcache_log /var/log/squid/cache.logcache_dir diskd /var/spool/squid/cache 1024 16 256 Q1=64 Q2=72maximum_object_size 33 MBminimum_object_size 0 KBrequest_body_max_size 0 KB# OTHER OPTIONS# ----------------------------------------------------------------------------forwarded_for offpid_filename /var/run/squid.pidshutdown_lifetime 30 secondsicp_port 3130half_closed_clients offumask 022logfile_rotate 0strip_query_terms off
_______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users