You are not logged in.

#1 2012-11-19 18:06:35

TrevorBramble
Member
From: Seattle, WA, USA
Registered: 2009-11-12
Posts: 18
Website

[SOLVED]memcached only allows conn... via 127.0.0.1, refuses localhost

Applications I work on use localhost as the host for memcached, and rather than changing it for everyone else I'd rather fix it on my end.

This works on an older install of Arch (pre-systemd) but I'm trying to migrate to a new all-systemd install and getting stuck here.

Don't see any configuration file for memcached so I can control what it binds to.

Telnet to localhost 11211 fails while telnet to 127.0.0.1 11211 works.

Halp?

Last edited by TrevorBramble (2012-11-19 20:27:02)

Offline

#2 2012-11-19 18:59:17

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED]memcached only allows conn... via 127.0.0.1, refuses localhost

Do you have "127.0.0.1    localhost.localdomain localhost" in /etc/hosts?

Offline

#3 2012-11-19 19:58:21

TrevorBramble
Member
From: Seattle, WA, USA
Registered: 2009-11-12
Posts: 18
Website

Re: [SOLVED]memcached only allows conn... via 127.0.0.1, refuses localhost

Hi, lucke! Yeah, I do have loopback associated with localhost in /etc/hosts...


trevor@silverweed:~ (ruby-1.9.3-p327)
$ cat /etc/hosts
#
# /etc/hosts: static lookup table for host names
#

#<ip-address>    <hostname.domain.org>    <hostname>
127.0.0.1    silverweed        localhost
::1        silverweed.localdomain    localhost

# End of file

Offline

#4 2012-11-19 20:08:39

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED]memcached only allows conn... via 127.0.0.1, refuses localhost

What does "hostname -a" return?

Does changing it to "127.0.0.1 localhost.localdomain localhost silverweed" change anything?

Offline

#5 2012-11-19 20:26:03

TrevorBramble
Member
From: Seattle, WA, USA
Registered: 2009-11-12
Posts: 18
Website

Re: [SOLVED]memcached only allows conn... via 127.0.0.1, refuses localhost

Ah, removing the silverweed hostname from /etc/hosts clears up the issue.

Strange. But, whatever. It works.

Thanks for the assistance!

Offline

Board footer

Powered by FluxBB