Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print a helpful message re: duplicate addresses #1910

Merged
merged 2 commits into from
Apr 1, 2016
Merged

Commits on Apr 1, 2016

  1. 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
    ```
    sean- committed Apr 1, 2016
    Configuration menu
    Copy the full SHA
    7a814fc View commit details
    Browse the repository at this point in the history
  2. Rely exclusively on error to signal failure

    Pointed out by: slackpad
    sean- committed Apr 1, 2016
    Configuration menu
    Copy the full SHA
    45bd128 View commit details
    Browse the repository at this point in the history