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

Panic with private gitlab #390

Closed
ahiaht opened this issue Dec 13, 2018 · 4 comments
Closed

Panic with private gitlab #390

ahiaht opened this issue Dec 13, 2018 · 4 comments
Labels
provider/gitlab question Further information is requested

Comments

@ahiaht
Copy link

ahiaht commented Dec 13, 2018

I tried to connect to a private gitlab-ce following the document for gitlab. Everything fine until I tried to create a null resource and add comment, Atlantis return PANIC error:
#atlantis server --atlantis-url="http://atlantis:4141" --gitlab-user="atlantis-bot" --gitlab-token="****************" --gitlab-webhook-secret="**************" --repo-whitelist="gitlab-ce/itarch/terraform-infra" --gitlab-hostname="http://gitlab-ce"

2018/12/13 06:33:33 [INFO] server: Determined GitLab is running version 11.5.3
2018/12/13 06:33:35 [INFO] server: Atlantis started - listening on port 4141
2018/12/13 06:33:57 PANIC: runtime error: invalid memory address or nil pointer dereference
goroutine 44 [running]:
github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni.(*Recovery).ServeHTTP.func1(0x7fedf4b2e130, 0xc0002a0e00, 0xc000262fc0)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni/recovery.go:34 +0xef
panic(0xa56e60, 0x1090c60)
	/usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/runatlantis/atlantis/server/events.(*EventParser).ParseGitlabMergeRequestCommentEvent(0xc000271810, 0xc0002a2940, 0x4, 0xc000356500, 0x1, 0xc0002a2d60, 0xf, 0x0, 0x0, 0x0, ...)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/server/events/event_parser.go:533 +0x1eb
github.com/runatlantis/atlantis/server.(*EventsController).HandleGitlabCommentEvent(0xc00012c2d0, 0x7fedf4b2e130, 0xc0002a0e00, 0xc0002a2940, 0x4, 0xc000356500, 0x1, 0xc0002a2d60, 0xf, 0x0, ...)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/server/events_controller.go:337 +0xef
github.com/runatlantis/atlantis/server.(*EventsController).handleGitlabPost(0xc00012c2d0, 0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad200)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/server/events_controller.go:323 +0x3fc
github.com/runatlantis/atlantis/server.(*EventsController).Post(0xc00012c2d0, 0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad200)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/server/events_controller.go:90 +0x1ff
github.com/runatlantis/atlantis/server.(*EventsController).Post-fm(0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad200)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/server/server.go:355 +0x48
net/http.HandlerFunc.ServeHTTP(0xc0001fdee0, 0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad200)
	/usr/local/go/src/net/http/server.go:1964 +0x44
github.com/runatlantis/atlantis/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc0002717a0, 0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad200)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/vendor/github.com/gorilla/mux/mux.go:162 +0xf1
github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni.Wrap.func1(0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad000, 0xc00029ecc0)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni/negroni.go:41 +0x4d
github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni.HandlerFunc.ServeHTTP(0xc000263060, 0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad000, 0xc00029ecc0)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni/negroni.go:24 +0x4e
github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0xbed4e0, 0xc000263060, 0xc0002630c0, 0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad000)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni/negroni.go:33 +0x9c
github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni.middleware.ServeHTTP-fm(0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad000)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni/negroni.go:33 +0x60
github.com/runatlantis/atlantis/server.(*RequestLogger).ServeHTTP(0xc00009a410, 0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad000, 0xc00029eca0)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/server/middleware.go:37 +0x62
github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0xbec140, 0xc00009a410, 0xc0002630a0, 0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad000)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni/negroni.go:33 +0x9c
github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni.middleware.ServeHTTP-fm(0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad000)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni/negroni.go:33 +0x60
github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni.(*Recovery).ServeHTTP(0xc000262fc0, 0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad000, 0xc00029ec80)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni/recovery.go:45 +0x82
github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0xbec680, 0xc000262fc0, 0xc000263080, 0x7fedf4b2e130, 0xc0002a0e00, 0xc0002ad000)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni/negroni.go:33 +0x9c
github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni.(*Negroni).ServeHTTP(0xc0003d6a50, 0xbf16e0, 0xc00042a000, 0xc0002ad000)
	/Users/lkysow/go/src/github.com/runatlantis/atlantis/vendor/github.com/urfave/negroni/negroni.go:73 +0xe8
net/http.serverHandler.ServeHTTP(0xc0002a7450, 0xbf16e0, 0xc00042a000, 0xc0002ad000)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc000355400, 0xbf1b60, 0xc0002a0c40)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

Terraform: 0.11.10
Gitlab-ce 11.5.3
Atlantis 0.4.12

Any idea what's wrong ?

@lkysow
Copy link
Member

lkysow commented Dec 13, 2018

@ahiaht are you commenting on a merge request? I've seen this error for users commenting on a commit instead of the merge request.

@lkysow lkysow added bug Something isn't working waiting-on-response Waiting for a response from the user labels Dec 13, 2018
@ahiaht
Copy link
Author

ahiaht commented Dec 14, 2018

I did on a commit request.
P/S: How do i trigger atlantis without merge request for gitlab ?

@lkysow
Copy link
Member

lkysow commented Dec 14, 2018

You can't trigger Atlantis unless it's via a merge request. Atlantis is specialized for working on merge requests.

@lkysow
Copy link
Member

lkysow commented Dec 14, 2018

I'm going to close this since it's not a bug but feel free to ask more questions.

@lkysow lkysow closed this as completed Dec 14, 2018
@lkysow lkysow removed bug Something isn't working waiting-on-response Waiting for a response from the user labels Dec 14, 2018
@lkysow lkysow added the question Further information is requested label Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/gitlab question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants