0
votes

I'm trying to build sample microservice app using this tutorial Tutorial. jhipster v5.2.1 So I've created a gateway and an armory started consul using this command:

docker-compose -f src/main/docker/consul.yml up

While I've pointed into the armory folder writing this command :

./gradlew

I got this error :

2018-09-03 13:20:11.235  WARN 7224 --- [  restartedMain] o.s.c.c.c.ConsulPropertySourceLocator    : Unable to load consul config from config/armory-swagger/

com.ecwid.consul.transport.TransportException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:8600 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect

Could you please help me

2
Are you able to access consul from your browser? at localhost:8500 - Gaël Marziou
Actually I can't - Ikbel benab
I'm working with a windows machine 8.1, I've installed docker toolbox, I tried to change the port 8500, although it's not occupied, I failed to run the application too. thank you for your response - Ikbel benab
@GaëlMarziou I've enabled the port 8500 using firewall advanced settings but I still have the same issue while connecting to localhost:8500 (This site can’t be reached), and although I got this message into my console ' Newer Consul version available: 1.2.2 (currently running: 1.2.0)' I can't reach the page - Ikbel benab
Have you tried running Consul outside Docker? It's easy as it's a single binary. I suspect something specific to your environment so I guess I won't be able to help here. - Gaël Marziou

2 Answers

1
votes

If you are using the toolbox you have to replace localhost by the IP of your Docker machine vm. You will have to ajust the bootstrap.yml properties to point to this adress.

You should also be able to apply this trick : https://www.jhipster.tech/tips/020_tip_using_docker_containers_as_localhost_on_mac_and_windows.html

1
votes

I just changed fail-fast to false in bootstrap-prod.yml You can disable Spring Cloud Config this way.

    fail-fast: false

Otherwise you have to provide proper configuration as stated above.

Or you can run this command if you have already installed consul on your development machine.

    consul agent -dev