I am trying to install consul using the idealista/consul_role via ansible and I am running into an error:
Timeout when waiting for 127.0.0.1:8500
When I ssh into the server and run:curl localhost:8500 I get: curl: (7) Failed to connect to localhost port 8500: Connection refused
Somehow port 8500 is not allowed. Is it possible that Digital Ocean is blocking this? I looked at my firewall rules and my droplet allows all TCP ports for inbound and outbound (FYI I have other droplets using the same firewall rules and they don’t have the issue)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi, firewalls would not normally block localhost connections as it is the node connecting to itself.
Are you sure the service is running and listening on port 8500? To find out, try this command on the console / SSH terminal:
netstat -tnlp
That should list all active TCP listeners as well as the process id (pid) and process name.
If you do not see 8500 in that output then your problem probably lies elsewhere.
Hope this helps and let us know how it is going.
Yes, in order to connect to port 8500 something has to be listening. This happens after install AND starting the service (maybe ansible doesn’t start it?)
You could try checking syslog or other logs for errors. Maybe try starting the service manually, as it might display the problem right there on the screen.
If ansible experiences an issue it should report an error too as well so double-check that - might be something straightforward.
Thanks @baraboom for your help.
I think your original suggestion was correct to start the service and see the errors.I was able to figure out the issue. It was failing because of the invalid config key log_file. I ended up removing “log_file”: “{{ consul_logfile }}”, from consul.json.j2 and it all reinstalled perfectly.
Not sure if it is because I am using 1.2.1.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.