Consul-template: connection refused

217 views
Skip to first unread message

Robert Cross

unread,
Sep 26, 2016, 10:16:56 AM9/26/16
to Consul
Got a system here that's got a viable Consul agent (it's registered it's services and service checks to the central servers), but I just can't get consul-template to play ball. Any attempt to use it comes back with a "getsockopt: connection refused" message.

Central Consul setup has the SSL options (ca_file, cert_file, key_file and encrypt) values and I've duplicated those in the consul-template configuration file (ca_cert, cert and key respectively, couldn't find an equivalent for "encrypt"). I've also got the appropriate ACL token set in the consul-template configuration file (the same one that the service I want to use consul-template with), but all I get is:

2016/09/26 15:11:22 [ERR] (view) "service(test-delphi.elasticsearch)" health services: error fetching: Get https://zm1300:8500/v1/health/service/elasticsearch?passing=1&stale=&tag=test-delphi&token=[removed]&wait=60000ms: dial tcp 100.239.250.110:8500: getsockopt: connection refused

I'm pretty sure that it's a mismatch somewhere in the security setup I've used, mainly because a test Consul master that I used which wasn't ACL etc protected worked fine.

All help gratefully received!

Regards, Bob.

Robert Cross

unread,
Sep 26, 2016, 11:02:51 AM9/26/16
to Consul
Forget this - I'd been stupid and bound the local agent to an address that wasn't localhost. Doh!

Bob
Reply all
Reply to author
Forward
0 new messages