Setting both the bind and advertise addresses to the same address causes erroneous logging
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
#### Overview of the Issue
Setting both the bind and advertise addresses to the same address causes erroneous logging.
I realize its redundant but im curious as to why this would cause errors in the logs, i.e.:
#### Reproduction Steps
Run Consul with this configuration:
```{"bootstrap_expect":1,"client_addr":"0.0.0.0","datacenter":"datacenter1","data_dir":"/some/dir","domain":"consul","enable_script_checks":true,"enable_syslog":true,"leave_on_terminate":true,"log_rotate_duration":"24h","log_rotate_max_files":30,"log_level":"INFO","rejoin_after_leave":true,"server":true,"ui":true,"bind_addr":"240.0.0.3","advertise_addr":"240.0.0.3"}```
### Consul info for both Client and Server
Consul 1.6.2-dev
### Log Fragments
```Jan 30 16:38:58 node-0 consul[7398]: consul: error getting server health from "node-0": context deadline exceeded
Jan 30 16:38:58 node-0 consul[7398]: 2020/01/30 16:38:58 [WARN] consul: error getting server health from "node-0": context deadline exceeded
Jan 30 16:38:59 node-0 consul[7398]: 2020/01/30 16:38:59 [WARN] consul: error getting server health from "node-0": rpc error getting client: failed to get conn: dial tcp 127.0.0.1:0->240.0.0.3:8300: connect: connection refused
Jan 30 16:38:59 node-0 consul[7398]: consul: error getting server health from "node-0": rpc error getting client: failed to get conn: dial tcp 127.0.0.1:0->240.0.0.3:8300: connect: connection refused
Jan 30 16:39:00 node-0 consul[7398]: consul: error getting server health from "node-0": context deadline exceeded
Jan 30 16:39:00 node-0 consul[7398]: 2020/01/30 16:39:00 [WARN] consul: error getting server health from "node-0": context deadline exceeded
Jan 30 16:39:01 node-0 consul[7398]: consul: error getting server health from "node-0": rpc error getting client: failed to get conn: dial tcp 127.0.0.1:0->240.0.0.3:8300: connect: connection refused```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported Consul 1.6.2-dev configuration with identical bind_addr and advertise_addr values, then trace the server-health RPC and logging path that produces the connection-refused and deadline-exceeded messages. Done means the cause is identified and the erroneous logging behavior is corrected or explicitly clarified for this configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100