1

I created an EC2 instance with Apache HTTPD 2.4 with mod_ssl version 2.4.34. I've created a Memcached cluster on AWS ElastiCache version 1.6.17 with encryption in transit.

The goal is to have HTTPD use MemCached with TLS for the SSLSessionCache. However, whenever a request is received, the server logs the following:

vhosts.conf

...
SSLSessionCache memcache:test-memcache.2dr943.cfg.use1.cache.amazonaws.com:11322
...

ssl_error_log

Could not find specified socket in poll list.: AH00790: scache_mc: error setting key 'mod_ssl-session:162534f25cf4152836459039d4c99263a346345e9366230f9a00394f593abcab' with 1447 bytes of data

I can verify the Memcached cluster is accessible and functional by using openssl s_client -connect test-memcache.2dr943.cfg.use1.cache.amazonaws.com:11322.

It seems HTTPD is unable to connect to the Memcache service with encryption in-transit. Any ideas how to address the issue?

Byob
  • 111
  • 3

1 Answers1

0

You can use stunnel to serve as a proxy to encrypt traffic for tools that do not support it by default.

You can configure stunnel like so:

/etc/stunnel/stunnel.conf

foreground = no
[memcache]
client = yes
accept = 127.0.0.1:11322
connect = test-memcache.2dr943.cfg.use1.cache.amazonaws.com:11322
CAfile = /etc/pki/tls/certs/ca-certs-bundle.crt
sslVersion = TLS1.2

Then you can update your httpd memcache configuration as follows:

vhosts.conf

SSLSessionCache memcache:localhost:11322
Byob
  • 111
  • 3