sameersbn / sameersbn/docker-gitlab
500 error on oauth call back
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 8.1k
- Forks
- 2.1k
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 7
Description
Here is roughly what I did leading up to the error:
- Fresh docker image setup today using sameersbn/gitlab:8.2.3 (This is going on a QNAP NAS, so I installed via the QNAP utilities).
- Reset ownership on /var/log/gitlab to make unicorn happy:
cd /var/log && chown -R git:git gitlab - Root password wouldn't work so I reinitialized the data:
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production. - Added OAUTH application to github: callback url set to:
http://<internal ip address>:10080/ - Configured ENV variables for the key and secret and confirmed that the github option shows up in the profile and login screen.
When I try to link my gitlab account to github, it redirects successfully to github for auth confirmation, then errors out on the callback with "500 Whoops, something went wrong on our end."
Here is the error from production.log:
Started POST "/users/auth/github" for 127.0.0.1 at 2016-03-04 06:30:12 +0000
Started GET "/users/auth/github/callback?code=[FILTERED]&state=f0c2fc05682585e0b9ddb7405c107dc63d0a482afcfae23c" for 127.0.0.1 at 2016-03-04 06:30:13 +0000
Faraday::ConnectionFailed (getaddrinfo: Name or service not known):
/usr/lib/ruby/2.1.0/net/http.rb:879:in `initialize'
/usr/lib/ruby/2.1.0/net/http.rb:879:in `open'
/usr/lib/ruby/2.1.0/net/http.rb:879:in `block in connect'
/usr/lib/ruby/2.1.0/timeout.rb:75:in `timeout'
/usr/lib/ruby/2.1.0/net/http.rb:878:in `connect'
/usr/lib/ruby/2.1.0/net/http.rb:863:in `do_start'
/usr/lib/ruby/2.1.0/net/http.rb:852:in `start'
/usr/lib/ruby/2.1.0/net/http.rb:1375:in `request'
vendor/bundle/ruby/2.1.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:82:in `perform_request'
vendor/bundle/ruby/2.1.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:40:in `block in call'
vendor/bundle/ruby/2.1.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:87:in `with_net_http_connection'
vendor/bundle/ruby/2.1.0/gems/faraday-0.9.2/lib/faraday/adapter/net_http.rb:32:in `call'
vendor/bundle/ruby/2.1.0/gems/faraday-0.9.2/lib/faraday/request/url_encoded.rb:15:in `call'
vendor/bundle/ruby/2.1.0/gems/faraday-0.9.2/lib/faraday/rack_builder.rb:139:in `build_response'
vendor/bundle/ruby/2.1.0/gems/faraday-0.9.2/lib/faraday/connection.rb:377:in `run_request'
vendor/bundle/ruby/2.1.0/gems/oauth2-1.0.0/lib/oauth2/client.rb:93:in `request'
vendor/bundle/ruby/2.1.0/gems/oauth2-1.0.0/lib/oauth2/client.rb:138:in `get_token'
...
An ideas what might be causing the issue or things I could try?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the OAuth callback entries in production.log and the Faraday/oauth2 stack trace, then review the Docker environment variables and GitHub callback URL described in the report. Reproduce the callback request and use the logs to identify why it returns a 500; done means linking the GitLab account completes successfully without that error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, github, ruby
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100