further analysis indicated that master process created 
quid-ssl_session_cache.shm.

In other words, it needs a https_port or http_port with ssl-bump in outside any 
process number to create this shared memeory segment.

Furthermore, the code  should be simplied like this:

diff --git a/squid-3.5.6/src/ssl/support.cc b/squid-3.5.6/src/ssl/support.cc
index 85305ce..0ce95f9 100644
--- a/squid-3.5.6/src/ssl/support.cc
+++ b/squid-3.5.6/src/ssl/support.cc
@@ -2084,9 +2084,6 @@ SharedSessionCacheRr::useConfig()
 void
 SharedSessionCacheRr::create()
 {
-    if (!isSslServer()) //no need to configure ssl session cache.
-        return;
-
     int items;
     items = Config.SSL.sessionCacheSize / sizeof(Ipc::MemMap::Slot);
     if (items)



This code is called in master that may not have configuration to ensure 
isSsslServer return true.

Alex
From: alex_wu2...@hotmail.com
To: squ...@treenet.co.nz; squid-users@lists.squid-cache.org
Date: Fri, 24 Jul 2015 15:28:06 -0700
Subject: Re: [squid-users] cannot leave empty workers




There is a problem

The code isSslServer looks for https configuration. If no one found, it will 
not create /run/shm/ssl_session_cache.shm.

Late, the code somewhere else can not find it, so the process would not start 
it self.

I am not clear which worker is called first to initialize_session_cache.

We see master and coordinator start properly. so I suspect coordinator might be 
one to initialze ssl_session_cache?

Or since all my http_port are listed in worker process 4, so isSllServer cannot 
find https_port, so it will not initialize ssl_session_cache.shm.

Somewhere, something is odd.

THX

Alex


> To: squid-users@lists.squid-cache.org
> From: squ...@treenet.co.nz
> Date: Sat, 25 Jul 2015 10:07:18 +1200
> Subject: Re: [squid-users] cannot leave empty workers
> 
> On 25/07/2015 7:24 a.m., Alex Wu wrote:
> > If I define 4 workers, and use the following way to allocate workers:
> > 
> > if ${process_number} = 4
> > //do something
> > else
> > endif
> 
> The "else" means the wrapped config bit applies to *all* workers and
> processes of Squid except the one in the if-condition (process #4). It
> is optional.
> 
> if ${process_number} = 4
>  # do something
> endif
> 
> It does not even do anything in the code except invert a bitmask. An
> "endif" then erases that bitmask. So an empty "else" is effectively
> doing nothing at all.
>  Just like one would expect reading that config.
> 
> The bug is elsewhere (sorry for the pun).
> 
> > 
> > I leave other workers as empty after else, then we encounter this error:
> > 
> > FATAL: Ipc::Mem::Segment::open failed to 
> > shm_open(/squid-ssl_session_cache.shm): (2) No such file or directory
> > 
> > If I fill one more workers,especially ${process_number} = 1, then squid can 
> > launch workers now,
> > 
> 
> Was that really the full config?
> 
> I dont see "workers 4" in there at all and something must have been
> configured to use the shared memory TLS/SSL session cache.
> 
> Amos
> 
> _______________________________________________
> squid-users mailing list
> squid-users@lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
                                          

_______________________________________________
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users                               
          
_______________________________________________
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users

Reply via email to