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

Crash using auth = "none" in service configuration for osctrl-admin #4

Closed
javuto opened this issue Aug 27, 2019 · 1 comment
Closed
Assignees
Labels
🐛 bug Something isn't working
Milestone

Comments

@javuto
Copy link
Collaborator

javuto commented Aug 27, 2019

Issue

Using osctrl v0.1.5, using auth = "none" in the service configuration (admin.json) for osctrl-admin, when attempting to browse the admin UI, server throws a panic and browser shows a nginx 502 Bad Gateway error.

Steps to reproduce

1 - Deploy locally, using vagrant up for example,
2 - Change auth = "db" for auth = "none" in /opt/osctrl/config/admin.json
3 - Run make install to rebuild and deploy.
4 - Crash, panic and nginx 502 Bad Gateway. Also this stacktrace:

Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]: server.go:3012: http: panic serving 127.0.0.1:41128: interface conversion: interface {} is nil, not main.contextValue
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]: goroutine 690 [running]:
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]: net/http.(*conn).serve.func1(0xc000083cc0)
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]:         /usr/local/go/src/net/http/server.go:1769 +0x139
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]: panic(0xa3a900, 0xc000341980)
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]:         /usr/local/go/src/runtime/panic.go:522 +0x1b5
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]: main.environmentHandler(0xbcf240, 0xc0001bc700, 0xc000176400)
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]:         /vagrant/cmd/admin/handlers-get.go:121 +0xec6
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]: net/http.HandlerFunc.ServeHTTP(0xb01fd0, 0xbcf240, 0xc0001bc700, 0xc000176400)
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]:         /usr/local/go/src/net/http/server.go:1995 +0x44
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]: main.handlerAuthCheck.func1(0xbcf240, 0xc0001bc700, 0xc000176400)
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]:         /vagrant/cmd/admin/auth.go:17 +0xc2
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]: net/http.HandlerFunc.ServeHTTP(0xc0003c3dc0, 0xbcf240, 0xc0001bc700, 0xc000176400)
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]:         /usr/local/go/src/net/http/server.go:1995 +0x44
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]: github.com/gorilla/mux.(*Router).ServeHTTP(0xc0000de9c0, 0xbcf240, 0xc0001bc700, 0xc000176200)
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]:         /home/vagrant/go/pkg/mod/github.com/gorilla/mux@v1.7.2/mux.go:212 +0xe3
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]: net/http.serverHandler.ServeHTTP(0xc0004c3c70, 0xbcf240, 0xc0001bc700, 0xc000176200)
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]:         /usr/local/go/src/net/http/server.go:2774 +0xa8
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]: net/http.(*conn).serve(0xc000083cc0, 0xbd0b40, 0xc0001790c0)
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]:         /usr/local/go/src/net/http/server.go:1878 +0x851
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]: created by net/http.(*Server).Serve
Aug 27 22:56:12 osctrl-Dev osctrl-admin[21166]:         /usr/local/go/src/net/http/server.go:2884 +0x2f4
@javuto javuto added the 🐛 bug Something isn't working label Aug 27, 2019
@javuto javuto added this to the 0.1.6 milestone Aug 27, 2019
@javuto javuto self-assigned this Aug 27, 2019
@javuto
Copy link
Collaborator Author

javuto commented Aug 28, 2019

Fixed in #5

@javuto javuto closed this as completed Aug 28, 2019
CptOfEvilMinions added a commit that referenced this issue Dec 28, 2021
Add branch and commit hash to CI/CD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant