Nomad: Nomad panic when starting in dev mode with consul and vault on same host

Created on 5 Oct 2017  路  4Comments  路  Source: hashicorp/nomad

Nomad version

root@precision-5520:~# nomad version
Nomad v0.7.0-beta1

Operating system and Environment details

root@precision-5520:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux unstable (sid)
Release:    unstable
Codename:   sid
root@precision-5520:~# uname -a
Linux precision-5520 4.13.0-1-amd64 #1 SMP Debian 4.13.4-1 (2017-10-01) x86_64 GNU/Linux

Issue

root@precision-5520:~# nomad agent -dev
    No configuration files loaded
==> Starting Nomad agent...
panic: interface conversion: interface {} is nil, not bool

goroutine 1 [running]:
github.com/hashicorp/nomad/client/fingerprint.(*ConsulFingerprint).Fingerprint(0xc4202e8680, 0xc420090000, 0xc4204d8000, 0x1eeac20, 0xc4202e8680, 0x0)
    /opt/gopath/src/github.com/hashicorp/nomad/client/fingerprint/consul.go:68 +0xddd
github.com/hashicorp/nomad/client.(*Client).fingerprint(0xc420090160, 0x0, 0x0)
    /opt/gopath/src/github.com/hashicorp/nomad/client/client.go:899 +0x56d
github.com/hashicorp/nomad/client.NewClient(0xc420090000, 0x1eeb560, 0xc42000e040, 0x1ef36e0, 0xc4205520c0, 0xc4201bd400, 0xc4201e0018, 0xc420436180, 0xc4201e0010)
    /opt/gopath/src/github.com/hashicorp/nomad/client/client.go:229 +0x7a9
github.com/hashicorp/nomad/command/agent.(*Agent).setupClient(0xc4201ef030, 0x0, 0x0)
    /opt/gopath/src/github.com/hashicorp/nomad/command/agent/agent.go:503 +0x14a
github.com/hashicorp/nomad/command/agent.NewAgent(0xc4201feb40, 0x1ee6860, 0xc42044e8e0, 0xc4201bd360, 0x0, 0x0, 0x0)
    /opt/gopath/src/github.com/hashicorp/nomad/command/agent/agent.go:90 +0x227
github.com/hashicorp/nomad/command/agent.(*Command).setupAgent(0xc4201da380, 0xc4201feb40, 0x1ee6860, 0xc42044e8e0, 0xc4201bd360, 0xc42044e8e0, 0xc42001d300)
    /opt/gopath/src/github.com/hashicorp/nomad/command/agent/command.go:337 +0x96
github.com/hashicorp/nomad/command/agent.(*Command).Run(0xc4201da380, 0xc4200100b0, 0x1, 0x1, 0x0)
    /opt/gopath/src/github.com/hashicorp/nomad/command/agent/command.go:455 +0x3ea
github.com/hashicorp/nomad/vendor/github.com/mitchellh/cli.(*CLI).Run(0xc4201fe140, 0xc4201fe140, 0x3d, 0x1573178)
    /opt/gopath/src/github.com/hashicorp/nomad/vendor/github.com/mitchellh/cli/cli.go:255 +0x1eb
main.RunCustom(0xc4200100a0, 0x2, 0x2, 0xc4201d9890, 0xc4204d9f60)
    /opt/gopath/src/github.com/hashicorp/nomad/main.go:60 +0x1245
main.Run(0xc4200100a0, 0x2, 0x2, 0x1182e26)
    /opt/gopath/src/github.com/hashicorp/nomad/main.go:24 +0x56
main.main()
    /opt/gopath/src/github.com/hashicorp/nomad/main.go:20 +0x63

Reproduction steps

I am going on a blitz here and running a consul server agent in dev mode, a vault server in dev mode and attempting to get nomad running in dev mode on my workstation.

I downloaded the nomad 0.6.3 binary as well and got the same result.

matthew@precision-5520:~/Workspace/vault-tutorial$ vault version
Vault v0.8.3 ('6b29fb2b7f70ed538ee2b3c057335d706b6d4e36')
matthew@precision-5520:~/Workspace/vault-tutorial$ consul version
Consul v1.0.0-beta1-beta1 (82f312d)
Protocol 2 spoken by default, understands 2 to 3 (agent will automatically use protocol >2 when speaking to compatible agents)
matthew@precision-5520:~/Workspace/vault-tutorial$ nomad version
Nomad v0.7.0-beta1

Nomad Server logs (if appropriate)

Couldn't find any of note.

Nomad Client logs (if appropriate)

Couldn't find any of note.

Job file (if appropriate)

N/A

Any other questions or items needed, let me know!
Matthew

themconsul typbug

All 4 comments

Hi this is a duplicate of https://github.com/hashicorp/nomad/issues/3324 - we are working on a fix to Consul (-beta2) that should be released tomorrow.

Here's the Consul beta2 release which fixes this behavior - https://groups.google.com/d/msg/consul-tool/qrdTkFVEBFQ/3hIunM91AAAJ.

@slackpad Updating to the beta 2 of Consul 1.0 worked. Cheers!

Thanks for the update! I'll leave this open to see if the Nomad folks want to change that panic to an error on that side, just to harden that side.

Was this page helpful?
0 / 5 - 0 ratings