Cannot restart puppetserver: Could not request certificate: Failed to open TCP connection to puppet:8140 (Connection refused - connect(2) for "puppet" port 8140)

asked 2018-05-20 23:29:38 -0600

SSD gravatar image

I have installed puppetserver on a machine named "puppet". "service puppetserver restart" gives me this error:

Could not request certificate: Failed to open TCP connection to puppet:8140 (Connection refused - connect(2) for "puppet" port 8140)

I do have 8140 open but that should not matter because it is the same server.

edit retag flag offensive close merge delete

Comments

name resolution working for "puppet"?

Mr_Sharma gravatar imageMr_Sharma ( 2018-05-21 01:01:58 -0600 )edit

Yes. It is the hostname of the server I am running puppetserver from. Ping: root@puppet:~# ping puppet PING puppet (127.0.1.1) 56(84) bytes of data. 64 bytes from puppet (127.0.1.1): icmp_seq=1 ttl=64 time=0.065 ms 64 bytes from puppet (127.0.1.1): icmp_seq=2 ttl=64 time=0.090 ms

SSD gravatar imageSSD ( 2018-05-21 02:08:35 -0600 )edit

127.0.1.1 is a strange ip for an host, even for localhost (I'd expect eventually 127.0.0.1). In any case, try a "telnet puppet 8140" if it doesn't connect you have a problem with host name. First check with something like "netstat -natup | grep 8140" on which address the Puppet (server) service runs

example42 gravatar imageexample42 ( 2018-05-22 03:23:44 -0600 )edit

If it's 0.0.0.0 you should be able to access it both via localhost and via the server's IP, if's it listening on your server's ip address then you won't be able to reach it via localhost. In any case it's probably better to resolv puppet with the server's ip address (if using multiple interfaces ...

example42 gravatar imageexample42 ( 2018-05-22 03:25:57 -0600 )edit

... use the ip of the interface you want to use for puppet client-server communication. Also check iptables, of course.

example42 gravatar imageexample42 ( 2018-05-22 03:26:40 -0600 )edit