Memcached / Shib SP / 502 Bad gateway errors

Shweta Kautia skautia at northcarolina.edu
Tue May 22 08:33:24 EDT 2018


Hello,

We've recently upgraded to Shib SP 2.6, with PHP7 for our dev sites with Apache 2.4, and finding that we get a 502 bad gateway for these reasons

  *   User inactivity for long period of time. don't know exactly what duration but overnight also seems to trigger it.
  *   Logged in to more than 1 site, but logout from 1 and then visiting another site - does Not result in redirect to IdP (expected behavior) for a new session.

Some of the settings from shibboleth2.xml below. cleanupInterval is new in this version - have you had to change change to a higher/lower value?
snippets from native_warn.log and shibd.log below. We can't figure out why Shib SP not redirecting to the IdP if it can't find the session.

Let me know if you need more info.

<StorageService type="MEMCACHE" id="mc" prefix="ONSRVDEV:" retryTimeout="1" cleanupInterval="604800">
      <Hosts>
        (servername):11211
      </Hosts>
    </StorageService>

    <StorageService type="MEMCACHE" id="mc-ctx" prefix="ONSRVDEV:" buildMap="1" retryTimeout="1" cleanupInterval="604800">
      <Hosts>
        (servername):11211
      </Hosts>
    </StorageService>

    <SessionCache type="StorageService" cacheAllowance="3600" StorageService="mc-ctx" StorageServiceLite="mc" cleanupInterval="604800" outboundHeader="true" />

    <ReplayCache StorageService="mc"/>

    <ArtifactMap StorageService="mc" artifactTTL="180"/>


<Sessions lifetime="28800" timeout="3600" relayState="cookie"
                  checkAddress="false" handlerSSL="true" cookieProps="https" >



shibd.log:
2018-05-21 14:39:56 DEBUG Shibboleth.Listener [2]: dispatching message (APP__DEV_SOMETHING::getHeaders::Application)
2018-05-21 14:39:56 DEBUG Shibboleth.Listener [2]: dispatching message (find::StorageService::SessionCache)
2018-05-21 14:39:56 DEBUG XMLTooling.StorageService.MEMCACHE [2]: readString ctx: _3a12432718957bc047b80185a037e6f2 - key: session
2018-05-21 14:39:56 DEBUG XMLTooling.StorageService.MEMCACHE [2]: Checking context
2018-05-21 14:39:56 DEBUG XMLTooling.StorageService.MEMCACHE [2]: Key _3a12432718957bc047b80185a037e6f2 not found in memcache...
2018-05-21 14:39:56 DEBUG Shibboleth.SessionCache [2]: session not found in cache (_3a12432718957bc047b80185a037e6f2)
2018-05-21 14:39:56 INFO Shibboleth.Listener [2]: detected socket closure, shutting down worker thread
2018-05-21 14:39:56 DEBUG Shibboleth.Listener [1]: dispatching message (touch::StorageService::SessionCache)
2018-05-21 14:39:56 DEBUG XMLTooling.StorageService.MEMCACHE [1]: readString ctx: _3a12432718957bc047b80185a037e6f2 - key: session
2018-05-21 14:39:56 DEBUG XMLTooling.StorageService.MEMCACHE [1]: Checking context
2018-05-21 14:39:56 DEBUG XMLTooling.StorageService.MEMCACHE [1]: Key _3a12432718957bc047b80185a037e6f2 not found in memcache...
2018-05-21 14:39:56 INFO Shibboleth.SessionCache [1]: session (ID: _3a12432718957bc047b80185a037e6f2) no longer in storage
2018-05-21 14:39:56 DEBUG Shibboleth.Listener [1]: dispatching message (remove::StorageService::SessionCache)
2018-05-21 14:39:56 DEBUG XMLTooling.StorageService.MEMCACHE [1]: deleteContext ctx: _3a12432718957bc047b80185a037e6f2
2018-05-21 14:39:56 DEBUG XMLTooling.StorageService.MEMCACHE [1]: Key _3a12432718957bc047b80185a037e6f2 not found in memcache...
2018-05-21 14:39:56 INFO Shibboleth.SessionCache [1]: removed session (_3a12432718957bc047b80185a037e6f2)
2018-05-21 14:39:56 INFO Shibboleth.Listener [1]: detected socket closure, shutting down worker thread
2018-05-21 14:39:57 DEBUG Shibboleth.Listener [3]: dispatching message (APP__DEV_SOMETHING::getHeaders::Application)
2018-05-21 14:39:57 DEBUG Shibboleth.Listener [3]: dispatching message (find::StorageService::SessionCache)
2018-05-21 14:39:57 DEBUG XMLTooling.StorageService.MEMCACHE [3]: readString ctx: _3a12432718957bc047b80185a037e6f2 - key: session
2018-05-21 14:39:57 DEBUG XMLTooling.StorageService.MEMCACHE [3]: Checking context
2018-05-21 14:39:57 DEBUG XMLTooling.StorageService.MEMCACHE [3]: Key _3a12432718957bc047b80185a037e6f2 not found in memcache...
2018-05-21 14:39:57 DEBUG Shibboleth.SessionCache [3]: session not found in cache (_3a12432718957bc047b80185a037e6f2)
2018-05-21 14:39:57 INFO Shibboleth.Listener [3]: detected socket closure, shutting down worker thread
2018-05-21 14:39:58 DEBUG Shibboleth.Listener [4]: dispatching message (APP__DEV_SOMETHING::getHeaders::Application)
2018-05-21 14:39:58 DEBUG Shibboleth.Listener [4]: dispatching message (find::StorageService::SessionCache)
2018-05-21 14:39:58 DEBUG XMLTooling.StorageService.MEMCACHE [4]: readString ctx: _3a12432718957bc047b80185a037e6f2 - key: session
2018-05-21 14:39:58 DEBUG XMLTooling.StorageService.MEMCACHE [4]: Checking context
2018-05-21 14:39:58 DEBUG XMLTooling.StorageService.MEMCACHE [4]: Key _3a12432718957bc047b80185a037e6f2 not found in memcache...
2018-05-21 14:39:58 DEBUG Shibboleth.SessionCache [4]: session not found in cache (_3a12432718957bc047b80185a037e6f2)
2018-05-21 14:39:58 INFO Shibboleth.Listener [4]: detected socket closure, shutting down worker thread
2018-05-21 14:39:59 DEBUG Shibboleth.Listener [5]: dispatching message (APP__DEV_SOMETHING::getHeaders::Application)
2018-05-21 14:39:59 DEBUG Shibboleth.Listener [5]: dispatching message (find::StorageService::SessionCache)
2018-05-21 14:39:59 DEBUG XMLTooling.StorageService.MEMCACHE [5]: readString ctx: _3a12432718957bc047b80185a037e6f2 - key: session
2018-05-21 14:39:59 DEBUG XMLTooling.StorageService.MEMCACHE [5]: Checking context
2018-05-21 14:39:59 DEBUG XMLTooling.StorageService.MEMCACHE [5]: Key _3a12432718957bc047b80185a037e6f2 not found in memcache...
2018-05-21 14:39:59 DEBUG Shibboleth.SessionCache [5]: session not found in cache (_3a12432718957bc047b80185a037e6f2)
2018-05-21 14:39:59 INFO Shibboleth.Listener [5]: detected socket closure, shutting down worker thread
2018-05-21 14:40:01 DEBUG Shibboleth.Listener [6]: dispatching message (APP__DEV_SOMETHING_ELSE::getHeaders::Application)
2018-05-21 14:40:09 DEBUG Shibboleth.Listener [7]: dispatching message (APP__DEV_SOMETHING_ELSE/DS::run::SAML2SI)



native_warn.log:
2018-05-21 14:39:56 ERROR Shibboleth.Listener [4611] shib_check_user: socket call (unknown) resulted in error (32): no message
2018-05-21 14:39:56 ERROR Shibboleth.Listener [4610] shib_check_user: remoted message returned an error: Your session has expired, and you must re-authenticate.


Thanks,
Shweta


Thanks,

Shweta Kautia

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20180522/7968fdae/attachment.html>


More information about the users mailing list