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

Nil dereference in CheckServers/getServerList #7955

Closed
dynajoe opened this issue May 26, 2020 · 0 comments · Fixed by #7957
Closed

Nil dereference in CheckServers/getServerList #7955

dynajoe opened this issue May 26, 2020 · 0 comments · Fixed by #7957
Labels
type/bug Feature does not function as expected

Comments

@dynajoe
Copy link

dynajoe commented May 26, 2020

I was starting a consul agent for the first time minutes after being created and ran into a nil dereference here:

return m.listValue.Load().(serverList)

The stack trace included:

func (m *Manager) CheckServers(fn func(srv *metadata.Server) bool) {

==> Starting Consul agent...
           Version: 'v1.7.3'
           Node ID: 'xxxx'
         Node name: 'xxxx'
        Datacenter: 'dc1' (Segment: '')
            Server: false (Bootstrap: false)
       Client Addr: [127.0.0.1] (HTTP: 8500, HTTPS: -1, gRPC: -1, DNS: 8600)
      Cluster Addr: xxx.xxxx.xxx.xxx (LAN: 8301, WAN: 8302)
           Encrypt: Gossip: true, TLS-Outgoing: true, TLS-Incoming: false, Auto-Encrypt-TLS: true

==> Log data will now stream in as it occurs:

... missing stack trace here ...

Unfortunately, my scroll back isn’t long enough and I lost the actual stack trace.

Launching the agent again did not present the issue.

consul agent version: 1.7.3
command: ./consul agent -config-file config.json -data-dir=/tmp/consul
config:

{
    "acl": {
        "enabled": true,
        "down_policy": "async-cache",
        "default_policy": "deny"
    },
    "ca_file": "./ca.pem",
    "verify_outgoing": true,
    "datacenter": "dc1",
    "encrypt": "xxxx",
    "server": false,
    "log_level": "INFO",
    "ui": true,
    "retry_join": [
        "xxxxx"
    ],
    "auto_encrypt": {
        "tls": true
    }
}

OS: Linux 4.4.0-1105-aws #116-Ubuntu SMP Wed Mar 18 05:11:57 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Feature does not function as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants