self-hosted
self-hosted copied to clipboard
Incorrect error message during installation
Self-Hosted Version
22.8.0
CPU Architecture
x86_64
Docker Version
20.10.17
Docker Compose Version
2.6.0
Steps to Reproduce
- Make a clean install of a docker
- Don't add your user to the docker group
- run install.sh from sentry self-hosted
Expected Result
Meaningful error message (as you need sudo to use docker)
Actual Result
~/sentry$ ./install.sh
▶ Parsing command line ...
▶ Detecting Docker platform
panic: reflect: indirection through nil pointer to embedded struct [recovered]
panic: reflect: indirection through nil pointer to embedded struct
goroutine 1 [running]:
text/template.errRecover(0xc0004f72d8)
/usr/local/go/src/text/template/exec.go:169 +0x145
panic({0x557419612ca0, 0x5574198ce8e8})
/usr/local/go/src/runtime/panic.go:1038 +0x215
reflect.Value.FieldByIndex({0x557419796540, 0xc0002ae100, 0x0}, {0xc000130bd0, 0x2, 0x557419612ca0})
/usr/local/go/src/reflect/value.go:1237 +0x1e7
text/template.(*state).evalField(0xc0004f7308, {0x557419796540, 0xc0002ae100, 0x55741853358a}, {0x7fff3ffc45db, 0xc}, {0x5574199397b0, 0xc0002ba660}, {0xc0003685c0, 0
x1, ...}, ...)
/usr/local/go/src/text/template/exec.go:616 +0x450
text/template.(*state).evalFieldChain(0x7fff3ffc45da, {0x557419796540, 0xc0002ae100, 0x12}, {0x557419796540, 0xc0002ae100, 0x0}, {0x5574199397b0, 0xc0002ba660}, {0xc0
003685b0, ...}, ...)
/usr/local/go/src/text/template/exec.go:569 +0x1eb
text/template.(*state).evalFieldNode(0x203000, {0x557419796540, 0xc0002ae100, 0xc0002ac0d0}, 0x557417ff5f8f, {0xc0003685c0, 0x0, 0x1}, {0x55741969ac40, 0x55741a84f840
, ...})
/usr/local/go/src/text/template/exec.go:533 +0xce
text/template.(*state).evalCommand(0xc0004f7308, {0x557419796540, 0xc0002ae100, 0x203000}, 0xc0002ac1a0, {0x55741969ac40, 0x55741a84f840, 0x0})
/usr/local/go/src/text/template/exec.go:461 +0x296
text/template.(*state).evalPipeline(0xc0004f7308, {0x557419796540, 0xc0002ae100, 0xc0002ba6c0}, 0xc000099320)
/usr/local/go/src/text/template/exec.go:435 +0x145
text/template.(*state).walk(0xc0004f7308, {0x557419796540, 0xc0002ae100, 0x10000c0002ae0c0}, {0x5574199395b8, 0xc0002ba690})
/usr/local/go/src/text/template/exec.go:254 +0x1f6
text/template.(*state).walk(0xc0004f7308, {0x557419796540, 0xc0002ae100, 0x0}, {0x557419939888, 0xc0002ba600})
/usr/local/go/src/text/template/exec.go:263 +0x37d
text/template.(*Template).execute(0xc0002ae0c0, {0x5574198e99c0, 0xc000155740}, {0x557419796540, 0xc0002ae100})
/usr/local/go/src/text/template/exec.go:217 +0x2d8
text/template.(*Template).Execute(...)
/usr/local/go/src/text/template/exec.go:200
github.com/docker/cli/cli/command/system.formatInfo({0x557419965cd8, 0xc000422a90}, {0x0, {0xc000235400, 0x1, 0x1}, 0xc0000a39f0, {0x0, 0x0, 0x0}}, ...)
/go/src/github.com/docker/cli/cli/command/system/info.go:511 +0x1a8
github.com/docker/cli/cli/command/system.runInfo(0xc00058fcd0, {0x557419965cd8, 0xc000422a90}, 0xc000234c20)
/go/src/github.com/docker/cli/cli/command/system/info.go:88 +0x47d
github.com/docker/cli/cli/command/system.NewInfoCommand.func1(0xc00026ab00, {0xc00007f680, 0x0, 0x2})
/go/src/github.com/docker/cli/cli/command/system/info.go:54 +0x25
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).execute(0xc00026ab00, {0xc0002754b0, 0x2, 0x2})
/go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:850 +0x60e
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000112580)
/go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:958 +0x3ad
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).Execute(...)
/go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:895
main.runDocker(0x0)
/go/src/github.com/docker/cli/cmd/docker/docker.go:287 +0x1ce
main.main()
/go/src/github.com/docker/cli/cmd/docker/docker.go:298 +0x97
FAIL: Unsupported docker architecture .
I'm a little confused here, are you saying that we should expect to print out a more descriptive error message during our install script if docker is not properly set up for a specific user?
@hubertdeng123
Thanks for the answer!
I'm trying to say that this error is really confusing. When user has problems with docker not properly setup, the error message shouldn't say that it has unsupported docker architecture. I personally tried to figure out if I created ec2 instance with an arm64 or I have downloaded sentry not for x86_64. It took me a while to actually understand that I forgot to add my current user to the docker group.
Just trying to save time for a person who may encounter the same situation in the future.
Yeah we should probably change the check to see if docker
exists and works (I presume docker --version
will error if the daemon is not running).
Got it, thanks for bringing this up to us!
@kobylyanskiy thanks for posting this. I had the same error message and researching the solution lead me here. The error that is reported does not match the root cause. Adding the user to the docker group resolves the issue.
This thread had been really helpful, after wondering for a while and checking this thread, I realised my docker engine was down.