1

I am starting a Spring Boot Application with Consul.

I am getting the following error

2019-08-30 12:34:22.650 ERROR 23428 --- [           main] o.s.boot.SpringApplication               : Application run failed
com.ecwid.consul.transport.TransportException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:8090 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect`
  1. I changed the default port in bootstrap.properties file.
  2. I also used another non-Consul Spring Boot Application and it worked fine for that use-case with same port.
Ayman Arif
  • 1,456
  • 3
  • 16
  • 40

1 Answers1

0

8090 is not the default port for Consul. You didn't say if your other successful app was on the same host or not, but make sure Consul is actually listening on that port with netstat or ss.

By default, Consul listens for API requests on port 8500.