consul/command/agent
Sean Chittenden 7a814fce63 Print a helpful message re: duplicate addresses
IP sockets provide nice endpoints where the kernel will fail to bind and will error out saying socket already in use.  UNIX sockets, however, don't enjoy this nice property when cleaning up stale sockets on listen.  Given the number of addresses in Consul, provide operators with a helpful message that indicates the source of the reused address.

Before this fix, it was possible for the HTTP socket to unlink the RPC socket, leading to confusing blocked behavior when running commands like `consul info`.

```
% cat tmp.config.json
{
    "addresses": {
	"http": "unix:///tmp/.consul.sock",
	"rpc": "unix:///tmp/.consul.sock"
    },
    "unix_sockets": {
	"mode": "0700"
    }
}
% consul agent -config-file tmp.config.json -advertise=127.0.0.1 -data-dir=/tmp/
==> All listening endpoints must be unique: HTTP address already configured for RPC
Exit 1
```
2016-04-01 10:20:45 -07:00
..
acl_endpoint.go Fixes nil slices from HTTP endpoints. 2015-11-14 21:05:37 -08:00
acl_endpoint_test.go Fixes nil slices from HTTP endpoints. 2015-11-14 21:05:37 -08:00
agent.go Allow [::] as a bind address (binds to first public IPv6 address) 2016-03-18 23:59:44 +01:00
agent_endpoint.go Tweaks formatting of inline output messages. 2016-03-02 19:47:00 -08:00
agent_endpoint_test.go Adds a new PUT-based TTL check update endpoint. 2016-03-02 17:54:01 -08:00
agent_test.go Sets up config for more address tags down the road, renames struct members. 2016-02-07 10:37:34 -08:00
bindata_assetfs.go Updates to latest compiled ui assets. 2016-03-07 13:49:08 -08:00
catalog_endpoint.go Fixes nil slices from HTTP endpoints. 2015-11-14 21:05:37 -08:00
catalog_endpoint_test.go Widens coordinate update sleeps in unit tests. 2016-03-21 18:23:11 -07:00
check.go Merge pull request #1819 from hashicorp/f-check-accept 2016-03-09 21:12:25 -08:00
check_test.go Retains the last output when a TTL check times out. 2016-03-02 17:58:01 -08:00
command.go Print a helpful message re: duplicate addresses 2016-04-01 10:20:45 -07:00
command_test.go skip_leave_on_int's default changes based on agent mode 2016-03-31 17:45:14 -07:00
config.go skip_leave_on_int's default changes based on agent mode 2016-03-31 17:45:14 -07:00
config_test.go Print a helpful message re: duplicate addresses 2016-04-01 10:20:45 -07:00
coordinate_endpoint.go Fixes nil slices from HTTP endpoints. 2015-11-14 21:05:37 -08:00
coordinate_endpoint_test.go Widens coordinate update sleeps in unit tests. 2016-03-21 18:23:11 -07:00
dns.go Correctly detect that an answer has been truncated 2016-03-29 19:52:31 -07:00
dns_test.go Change tests to accept an "at least this many" answers semantic 2016-03-30 11:48:32 -07:00
event_endpoint.go agent: avoid masking errors when ACLs deny a request 2015-06-18 18:13:29 -07:00
event_endpoint_test.go agent: testing user event endpoint ACLs 2015-06-18 18:13:29 -07:00
flag_slice_value.go Working on the agent 2013-12-20 16:39:32 -08:00
flag_slice_value_test.go Working on the agent 2013-12-20 16:39:32 -08:00
gated_writer.go Working on the agent 2013-12-20 16:39:32 -08:00
gated_writer_test.go Working on the agent 2013-12-20 16:39:32 -08:00
health_endpoint.go Fixes nil slices from HTTP endpoints. 2015-11-14 21:05:37 -08:00
health_endpoint_test.go Widens coordinate update sleeps in unit tests. 2016-03-21 18:23:11 -07:00
http.go Adds a new PUT-based TTL check update endpoint. 2016-03-02 17:54:01 -08:00
http_api.md Add `/v1/agent/self` and return local agent config 2014-05-27 01:15:33 +02:00
http_test.go agent: static UI is configurable 2015-12-24 22:21:34 -05:00
keyring.go agent: write-level keyring ACLs work 2015-07-07 10:36:51 -06:00
keyring_test.go agent: testing keyring ACLs 2015-07-07 15:14:06 -06:00
kvs_endpoint.go remove various typos 2015-09-11 12:29:54 -07:00
kvs_endpoint_test.go agent: error from KVS endpoint if incompatible flags are passed. Fixes #432 2015-01-23 12:48:39 -08:00
local.go Adds a sanity check to the local node info compare. 2016-02-07 15:07:23 -08:00
local_test.go Increases wait to account for random stagger. 2016-02-07 13:56:45 -08:00
log_levels.go Working on the agent 2013-12-20 16:39:32 -08:00
log_writer.go typofixes - https://github.com/vlajos/misspell_fixer 2014-12-04 23:25:06 +00:00
log_writer_test.go Working on the agent 2013-12-20 16:39:32 -08:00
prepared_query_endpoint.go Renames "debug" endpoint and structures to "explain". 2016-03-07 10:45:39 -08:00
prepared_query_endpoint_test.go Renames "debug" endpoint and structures to "explain". 2016-03-07 10:45:39 -08:00
remote_exec.go Adds support for the reap lock. 2016-01-12 21:10:25 -08:00
remote_exec_test.go Use panic instead of returning a sentinel UUID values in unit tests 2016-02-01 16:42:04 -08:00
rpc.go agent: write-level keyring ACLs work 2015-07-07 10:36:51 -06:00
rpc_client.go agent: write-level keyring ACLs work 2015-07-07 10:36:51 -06:00
rpc_client_test.go agent: disable ACLs for RPC client tests 2015-07-23 17:09:33 -07:00
rpc_log_stream.go Fix a bunch of typos. 2015-09-15 13:22:08 +01:00
rpc_log_stream_test.go Pulling in the RPC framework from serf 2013-12-30 14:42:41 -08:00
scada.go Fix a bunch of typos. 2015-09-15 13:22:08 +01:00
scada_test.go agent: atlas_endpoint is configurable 2015-08-27 11:08:01 -07:00
session_endpoint.go Fixes nil slices from HTTP endpoints. 2015-11-14 21:05:37 -08:00
session_endpoint_test.go Fixes nil slices from HTTP endpoints. 2015-11-14 21:05:37 -08:00
status_endpoint.go More HTTP endpoints 2013-12-23 16:20:51 -08:00
status_endpoint_test.go gofmt 2014-05-20 16:25:29 -07:00
structs.go Rename EnableTagOverride and update formatting 2015-09-11 08:35:29 -07:00
structs_test.go agent: http checks work inside of service definitions 2015-01-29 12:11:42 -08:00
syslog.go Fix a bunch of typos. 2015-09-15 13:22:08 +01:00
syslog_test.go travis-ci: skip syslog tests for container-based travis infra 2015-07-28 09:58:43 -07:00
ui_endpoint.go Fixes nil slices from HTTP endpoints. 2015-11-14 21:05:37 -08:00
ui_endpoint_test.go agent: initial web assets 2015-12-24 22:21:34 -05:00
user_event.go Factor out duplicate functions into a lib package 2016-01-29 16:57:45 -08:00
user_event_test.go agent: enforce event policy during event fire 2015-06-18 18:13:29 -07:00
util.go Factor out duplicate functions into a lib package 2016-01-29 16:57:45 -08:00
util_test.go Factor out duplicate functions into a lib package 2016-01-29 16:57:45 -08:00
watch_handler.go Adds support for the reap lock. 2016-01-12 21:10:25 -08:00
watch_handler_test.go Adds support for the reap lock. 2016-01-12 21:10:25 -08:00