GitLab runner dies when failing to connect via SSL
While installing and registering gitlab-ci-multi-runner
on my local macOS dev environment I accidentally typed https
for my localhost coordinator URL instead of http
. This probably should spit out a friendly "could not connect" message, but it spits out a stack trace instead.
$ gitlab-ci-multi-runner register
WARNING: Running in user-mode.
WARNING: Use sudo for system-mode:
WARNING: $ sudo gitlab-runner...
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
https://localhost:3000/ci
Please enter the gitlab-ci token for this runner:
mKUvoXV22srKZKsq5Abq
Please enter the gitlab-ci description for this runner:
[pixelcog-mbp]:
Please enter the gitlab-ci tags for this runner (comma separated):
unexpected fault address 0x4bfa67485421
fatal error: fault
[signal 0xb code=0x1 addr=0x4bfa67485421 pc=0x6cdeb]
goroutine 1 [running]:
runtime.throw(0x1864068, 0x5)
/usr/local/go/src/runtime/panic.go:547 +0x90 fp=0xc820512ca0 sp=0xc820512c88
runtime.sigpanic()
/usr/local/go/src/runtime/sigpanic_unix.go:27 +0x2ba fp=0xc820512cf0 sp=0xc820512ca0
gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/Sirupsen/logrus.Entry.log(0xc820012200, 0xc820209bc0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xea02, 0xc8202ab6c0, ...)
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/Sirupsen/logrus/entry.go:88 +0xfb fp=0xc820512e18 sp=0xc820512cf0
gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/Sirupsen/logrus.(*Entry).Error(0xc820226a80, 0xc820512ec8, 0x1, 0x1)
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/Sirupsen/logrus/entry.go:145 +0x8c fp=0xc820512e88 sp=0xc820512e18
gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/Sirupsen/logrus.(*Entry).Errorln(0xc820226a80, 0xc820513100, 0x2, 0x2)
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/Sirupsen/logrus/entry.go:240 +0x120 fp=0xc820512f08 sp=0xc820512e88
gitlab.com/gitlab-org/gitlab-ci-multi-runner/network.(*GitLabClient).RegisterRunner(0xc820032088, 0xc8202aaf00, 0x19, 0xc8202aaf20, 0x14, 0x0, 0x0, 0xc820105d30, 0xc, 0x0, ...)
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/network/gitlab.go:137 +0xad2 fp=0xc820513328 sp=0xc820512f08
gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands.(*RegisterCommand).askRunner(0xc820001500)
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands/register.go:146 +0x67a fp=0xc820513450 sp=0xc820513328
gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands.(*RegisterCommand).Execute(0xc820001500, 0xc8200de0f0)
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/commands/register.go:195 +0x16d fp=0xc820513550 sp=0xc820513450
gitlab.com/gitlab-org/gitlab-ci-multi-runner/common.(Commander).Execute-fm(0xc8200de0f0)
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/common/command.go:24 +0x3c fp=0xc820513578 sp=0xc820513550
gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/codegangsta/cli.Command.Run(0x1890600, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x19a0f70, 0x15, 0x0, ...)
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/codegangsta/cli/command.go:127 +0x1055 fp=0xc820513a38 sp=0xc820513578
gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/codegangsta/cli.(*App).Run(0xc8201aa000, 0xc82000a2a0, 0x2, 0x2, 0x0, 0x0)
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/codegangsta/cli/app.go:159 +0xc34 fp=0xc820513e48 sp=0xc820513a38
main.main()
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/main.go:58 +0x2d9 fp=0xc820513f10 sp=0xc820513e48
runtime.main()
/usr/local/go/src/runtime/proc.go:188 +0x2b0 fp=0xc820513f60 sp=0xc820513f10
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc820513f68 sp=0xc820513f60
goroutine 5 [syscall]:
os/signal.signal_recv(0x0)
/usr/local/go/src/runtime/sigqueue.go:116 +0x132
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
/usr/local/go/src/os/signal/signal_unix.go:28 +0x37
goroutine 6 [chan receive]:
gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/getsentry/raven-go.(*Client).worker(0xc8200c66e0)
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/getsentry/raven-go/client.go:418 +0x60
created by gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/getsentry/raven-go.newClient
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/getsentry/raven-go/client.go:307 +0x193
goroutine 7 [chan receive]:
gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/golang/glog.(*loggingT).flushDaemon(0x35a8760)
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/golang/glog/glog.go:882 +0x67
created by gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/golang/glog.init.1
/go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/vendor/github.com/golang/glog/glog.go:410 +0x297