I'm trying to connect the application server to the memcache server.

App Server
Memcache Server
Memcache Port 11211

I've tried the following.

Ping from to works
telnet 80 works
telnet 11211 doesn't work: No route to host found. 

Memcache is listening to and therefore the UFW on is set to:

To                         Action      From
--                         ------      ----
11211/tcp                  ALLOW       Anywhere
22                         ALLOW       Anywhere
Anywhere                   ALLOW 11211/tcp        ALLOW

Still the server is not responding and result is No route or host found.

UFW logging is enabled but the ufw log can't be found at /var/log/ufw.log

No I'm at the point of being clueless...

[UPDATE] Output of netstat -tunlp | grep 11211

tcp        0      0*               LISTEN      14378/memcached
udp        0      0*                           14378/memcached

ps aux | grep memcache

memcache 14378  0.0  0.0 335580  1440 ?        Sl   15:56   0:00 /usr/bin/memcached -m 3584 -p 11211 -u memcache -l
  • Have you verified that memcache is running? Can you telnet to it from the server itself? – Bert Jul 5 '16 at 19:32
  • Disable firewall to check if port issue? – Jason Jul 5 '16 at 20:25
  • @FrankThornton than it gives me no route to host – Peter Fox Jul 5 '16 at 20:31

Memcache is listening to

Well that's your problem. It's listening on a localhost address and as such, will not be available to other hosts on the network. You should have it listen on (all addresses) or the specific non-localhost address required for your application.

  • Based on your comment, tried this: chanced memcached.conf to listen to -l and added [ 11211 ALLOW] to the UFW. Doesn't work. Still no route to host. BTW ufw restarted, and memcached restarted – Peter Fox Jul 5 '16 at 19:51
  • Tried to have it listen to its own ip adres ( but that doesn't work either. – Peter Fox Jul 5 '16 at 19:55
  • memcached.log is empty btw. – Peter Fox Jul 5 '16 at 19:55
  • Are you even sure that memcached is running at all? Please update your question with the output of $ netstat -tunlp | grep 11211 and $ ps aux | grep memcache. – EEAA Jul 5 '16 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.