{"action":"opened","issue":{"url":"https://api.github.com/repos/hashicorp/nomad/issues/1334","repository_url":"https://api.github.com/repos/hashicorp/nomad","labels_url":"https://api.github.com/repos/hashicorp/nomad/issues/1334/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/nomad/issues/1334/comments","events_url":"https://api.github.com/repos/hashicorp/nomad/issues/1334/events","html_url":"https://github.com/hashicorp/nomad/issues/1334","id":161560514,"number":1334,"title":"Null Pointer Exception on startup","user":{"login":"jshaw86","id":382292,"avatar_url":"https://avatars.githubusercontent.com/u/382292?v=3","gravatar_id":"","url":"https://api.github.com/users/jshaw86","html_url":"https://github.com/jshaw86","followers_url":"https://api.github.com/users/jshaw86/followers","following_url":"https://api.github.com/users/jshaw86/following{/other_user}","gists_url":"https://api.github.com/users/jshaw86/gists{/gist_id}","starred_url":"https://api.github.com/users/jshaw86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshaw86/subscriptions","organizations_url":"https://api.github.com/users/jshaw86/orgs","repos_url":"https://api.github.com/users/jshaw86/repos","events_url":"https://api.github.com/users/jshaw86/events{/privacy}","received_events_url":"https://api.github.com/users/jshaw86/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-21T23:09:45Z","updated_at":"2016-06-21T23:09:45Z","closed_at":null,"body":"### Nomad version\r\nNomad v0.3.2\r\n\r\n### Operating system and Environment details\r\nUbuntu 14.04.4 LTS (GNU/Linux 3.13.0-87-generic x86_64)\r\n\r\n### Issue\r\nNull pointer exception when starting nomad, and upstart/init.d can't get agent back up\r\n\r\n### Reproduction steps\r\nstart nomad client: sudo nomad agent -client -servers=nomad-sched1-priv.bronze.aws-pdx-3.ps.pn -config=/etc/nomad.d\r\n\r\n### Nomad Client logs (if appropriate)\r\n```   \r\n Loaded configuration from /etc/nomad.d/nomad_agent.json\r\n==> Starting Nomad agent...\r\npanic: runtime error: invalid memory address or nil pointer dereference\r\n[signal 0xb code=0x1 addr=0x78 pc=0x5643f8]\r\n\r\ngoroutine 1 [running]:\r\npanic(0x1124d20, 0xc8200140e0)\r\n        /opt/go/src/runtime/panic.go:464 +0x3e6\r\ngithub.com/hashicorp/nomad/client/driver.GetTaskEnv(0xc8203437d0, 0xc82014a900, 0x0, 0xc8203521e0, 0x0, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/client/driver/driver.go:145 +0xf8\r\ngithub.com/hashicorp/nomad/client.(*TaskRunner).setTaskEnv(0xc820301300, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/client/task_runner.go:203 +0x5a\r\ngithub.com/hashicorp/nomad/client.(*TaskRunner).RestoreState(0xc820301300, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/client/task_runner.go:140 +0x122\r\ngithub.com/hashicorp/nomad/client.(*AllocRunner).RestoreState(0xc8203505b0, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/client/alloc_runner.go:129 +0x593\r\ngithub.com/hashicorp/nomad/client.(*Client).restoreState(0xc820215200, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/client/client.go:429 +0x53b\r\ngithub.com/hashicorp/nomad/client.NewClient(0xc82022c000, 0xc82022c000, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/client/client.go:171 +0x8b9\r\ngithub.com/hashicorp/nomad/command/agent.(*Agent).setupClient(0xc82000b860, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/command/agent/agent.go:290 +0x173\r\ngithub.com/hashicorp/nomad/command/agent.NewAgent(0xc820086b40, 0x7f8a6fb90da8, 0xc820216c60, 0xc82000b7c0, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/command/agent/agent.go:55 +0x247\r\ngithub.com/hashicorp/nomad/command/agent.(*Command).setupAgent(0xc820084fa0, 0xc820086b40, 0x7f8a6fb90da8, 0xc820216c60, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/command/agent/command.go:286 +0xc3\r\ngithub.com/hashicorp/nomad/command/agent.(*Command).Run(0xc820084fa0, 0xc82000a0c0, 0x3, 0x3, 0x0)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/command/agent/command.go:389 +0x597\r\ngithub.com/hashicorp/nomad/vendor/github.com/mitchellh/cli.(*CLI).Run(0xc8200c20c0, 0xc8200c20c0, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/vendor/github.com/mitchellh/cli/cli.go:153 +0x5ee\r\nmain.RunCustom(0xc82000a0b0, 0x4, 0x4, 0xc8201e8210, 0xc82005a058)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/main.go:49 +0x4d5\r\nmain.Run(0xc82000a0b0, 0x4, 0x4, 0x7f8a6fb8b028)\r\n        /opt/gopath/src/github.com/hashicorp/nomad/main.go:15 +0x4c\r\nmain.main()\r\n        /opt/gopath/src/github.com/hashicorp/nomad/main.go:11 +0x60\r\n```\r\n\r\n### nomad.d config\r\n```\r\nregion = \"aws-pdx-3\"\r\ndatacenter = \"bronze-aws-pdx-3\"\r\ndata_dir = \"/opt/nomad/data\"\r\nlog_level = \"DEBUG\"\r\nenable_syslog = true\r\n\r\nbind_addr = \"0.0.0.0\"\r\n\r\nclient {\r\n  enabled = true\r\n  alloc_dir = \"/opt/nomad/mnt\"\r\n  reserved {\r\n    cpu = 500\r\n    memory = 1024\r\n    disk = 1024\r\n  }\r\n  network_speed = 1000\r\n  options {\r\n    consul.address = \"172.16.103.60:8500\"\r\n    }\r\n}\r\n\r\nadvertise {\r\n  http = \"172.16.103.60:4646\"\r\n}\r\n\r\ntelemetry {\r\n  statsd_address = \"0.0.0.0:8125\"\r\n}\r\n```\r\nour setup is single nomad server with 3 nomad clients.\r\n\r\n"}}
{"actor":{"display_login":"jshaw86"}}