hashicorp / hashicorp/consul

HTTP error code from Consul: 0 error

Open
#14,706 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

I am trying to install Consul servers namely consul-server1, consul-server2, and consul-server3 and Consul agent clients namely consul-client1, consul-client2, and consul-client3 on docker-swarm nodes.

I have tried both consul:latest and progrium/consul:latest image to set up the aforementioned containers but i keep having

HTTP error code from Consul: 0 error

This is an error page for the Consul web UI. You may have visited a URL that is loading an unknown resource, so you can try going back to the [root](http://192.168.205.10:8500/ui/#).

Otherwise, please report any unexpected issues on the [GitHub page](https://github.com/hashicorp/consul).

Below is my docker run command

docker run -di \
--net host \
--restart always \
--name consul-server1 \
--env 'CONSUL_ALLOW_PRIVILEGED_PORTS=true' \
--env "SERVICE_IGNORE=true" \
--env "CONSUL_CLIENT_INTERFACE=eth0" \
--env "CONSUL_BIND_INTERFACE=eth1" \
--volume consul_data:/consul/data \
consul:latest \
consul agent -server -ui \
-dns-port=53 \
-bootstrap-expect=3 \
-client=0.0.0.0 \
-advertise='192.168.205.10' \
-bind='192.168.205.10' \
-retry-join="192.168.205.11" \
-retry-join="192.168.205.12" \
-data-dir="/consul/data"

docker run -di \
--net host \
--restart always \
--name consul-server2 \
--env 'CONSUL_ALLOW_PRIVILEGED_PORTS=true' \
--env "SERVICE_IGNORE=true" \
--env "CONSUL_CLIENT_INTERFACE=eth0" \
--env "CONSUL_BIND_INTERFACE=eth1" \
--volume consul_data:/consul/data \
consul:latest \
consul agent -server -ui \
-dns-port=53 \
-bootstrap-expect=3 \
-client=0.0.0.0 \
-advertise='192.168.205.11' \
-bind='192.168.205.11' \
-retry-join="192.168.205.10" \
-retry-join="192.168.205.12" \
-data-dir="/consul/data"

docker run -di \
--net host \
--restart always \
--name consul-server3 \
--env 'CONSUL_ALLOW_PRIVILEGED_PORTS=true' \
--env "SERVICE_IGNORE=true" \
--env "CONSUL_CLIENT_INTERFACE=eth0" \
--env "CONSUL_BIND_INTERFACE=eth1" \
--volume consul_data:/consul/data \
consul:latest \
consul agent -server -ui \
-dns-port=53 \
-bootstrap-expect=3 \
-client=0.0.0.0 \
-advertise='192.168.205.12' \
-bind='192.168.205.12' \
-retry-join='192.168.205.10' \
-retry-join='192.168.205.11' \
-data-dir="/consul/data"

docker run -di \
--net host \
--restart always \
--name consul-client1 \
--env 'CONSUL_ALLOW_PRIVILEGED_PORTS=true' \
--env "SERVICE_IGNORE=true" \
--env "CONSUL_CLIENT_INTERFACE=eth0" \
--env "CONSUL_BIND_INTERFACE=eth1" \
--volume consul_data:/consul/data \
consul:latest \
consul agent -client=0.0.0.0 \
-dns-port=53 \
-advertise='192.168.205.13' \
-bind='192.168.205.13' \
-retry-join='192.168.205.10' \
-retry-join='192.168.205.11' \
-retry-join='192.168.205.12' \
-data-dir="/consul/data"

docker run -di \
--net host \
--restart always \
--name consul-client2 \
--env 'CONSUL_ALLOW_PRIVILEGED_PORTS=true' \
--env "SERVICE_IGNORE=true" \
--env "CONSUL_CLIENT_INTERFACE=eth0" \
--env "CONSUL_BIND_INTERFACE=eth1" \
--volume consul_data:/consul/data \
consul:latest \
consul agent -client=0.0.0.0 \
-dns-port=53 \
-advertise='192.168.205.14' \
-bind='192.168.205.14' \
-retry-join='192.168.205.10' \
-retry-join='192.168.205.11' \
-retry-join='192.168.205.12' \
-data-dir="/consul/data"

docker run -di \
--net host \
--restart always \
--name consul-client3 \
--env 'CONSUL_ALLOW_PRIVILEGED_PORTS=true' \
--env "SERVICE_IGNORE=true" \
--env "CONSUL_CLIENT_INTERFACE=eth0" \
--env "CONSUL_BIND_INTERFACE=eth1" \
--volume consul_data:/consul/data \
consul:latest \
consul agent -client=0.0.0.0 \
-dns-port=53 \
-advertise='192.168.205.15' \
-bind='192.168.205.15' \
-retry-join='192.168.205.10' \
-retry-join='192.168.205.11' \
-retry-join='192.168.205.12' \
-data-dir="/consul/data"

With consul:latest image i use consul agent -server -ui and with progrium/consul:latest image i use -ui-dir /ui

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the supplied docker run commands with the stated Consul images and checking the container and agent logs alongside the web UI response. Compare server and client startup behavior, network bindings, and join configuration. Done means the reported HTTP error is reproduced with a documented cause and a verified configuration or code change resolves it.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
devops, distributed-systems, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.