Gerrit OAuth2 issue

199 views
Skip to first unread message

Rangaraj R

unread,
Sep 27, 2016, 11:19:02 PM9/27/16
to Repo and Gerrit Discussion
Hi Team,

We are using Gerrit (v 2.10.2-18-gc6c5e0b-dirty) and gerrit-oauth-provider.jar compatible with this gerrit version. Till yesterday, Gerrit server was working fine, but today I am getting error message "server error" when I try to sign-in. When I checked the error logs, I am getting below error message. 

We are stuck and teams are not able to use the gerrit server. Please provide solution/suggestion for this issue ASAP.

[2016-09-28 08:41:38,576] ERROR com.google.gerrit.pgm.http.jetty.HiddenErrorHandler : Error in GET /oauth?state=yZ57gHzCj_zaGMrxXItlRcitwAnp1nQ8MpQeBd9SNtA&code=4/t7Slo1VA38iaLDDCEM0N2JcVNzMMTY6woLfByyGRttQ&authuser=0&hd=domain.com&session_state=905c234290723f708ef52dfc7a5d2bb52297af12..9329&prompt=none
org.scribe.exceptions.OAuthException: Cannot extract an acces token. Response was: {
  "error" : "invalid_request",
  "error_description" : "OAuth 2 parameters can only have a single value: grant_type"
}
        at com.googlesource.gerrit.plugins.oauth.Google2Api$GoogleJsonTokenExtractor.extract(Google2Api.java:163)
        at com.googlesource.gerrit.plugins.oauth.Google2Api$GoogleOAuthService.getAccessToken(Google2Api.java:112)
        at com.googlesource.gerrit.plugins.oauth.GoogleOAuthService.getAccessToken(GoogleOAuthService.java:183)
        at com.google.gerrit.httpd.auth.oauth.OAuthSession.login(OAuthSession.java:92)
        at com.google.gerrit.httpd.auth.oauth.OAuthWebFilter.doFilter(OAuthWebFilter.java:123)
        at com.google.gwtexpui.server.CacheControlFilter.doFilter(CacheControlFilter.java:70)
        at com.google.gerrit.httpd.RunAsFilter.doFilter(RunAsFilter.java:113)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy$1.doFilter(AllRequestFilter.java:64)
        at com.google.gerrit.httpd.AllRequestFilter$FilterProxy.doFilter(AllRequestFilter.java:57)
        at com.google.gerrit.httpd.RequestContextFilter.doFilter(RequestContextFilter.java:75)
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119)
        at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
        at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
        at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1636)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:564)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:219)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:498)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:98)
        at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:92)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:98)
        at org.eclipse.jetty.server.Server.handle(Server.java:461)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:284)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
        at java.lang.Thread.run(Thread.java:745)

Thanks,
Rangaraj

Anjan Tummalapalli

unread,
Sep 28, 2016, 1:33:49 AM9/28/16
to Repo and Gerrit Discussion
Hi Team,

We also facing same issue and unable to login to Gerrit machine through OAuth2

But able to work via CLI or we can browse though site with active session without logout

We are blocked with this.. this is our production instance

can anyone of you please help me..

Subba Reddy

unread,
Sep 28, 2016, 2:22:53 AM9/28/16
to Repo and Gerrit Discussion
Hi Everyone,

We are using Gerrit 2.11 and down with the same error at present. Any help would be really appreciated.

David Ostrovsky

unread,
Sep 28, 2016, 3:22:18 AM9/28/16
to Repo and Gerrit Discussion


On Wednesday, September 28, 2016 at 8:22:53 AM UTC+2, Subba Reddy wrote:
Hi Everyone,

We are using Gerrit 2.11 and down with the same error at present. Any help would be really appreciated.

On Wednesday, September 28, 2016 at 11:03:49 AM UTC+5:30, Anjan Tummalapalli wrote:
Hi Team,

We also facing same issue and unable to login to Gerrit machine through OAuth2

Apparently Google deployed new OAuth release tonight, that does more strict
checking and reject double grant type in URL and request body: [1].

The bug was already fixed and merged. I will upload new plugin release in a moment. 

David Ostrovsky

unread,
Sep 28, 2016, 3:33:49 AM9/28/16
to Repo and Gerrit Discussion

Subba Reddy

unread,
Sep 28, 2016, 4:33:48 AM9/28/16
to David Ostrovsky, Repo and Gerrit Discussion
Thank you very much for your quick response.

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/repo-discuss/otAhkJRvYWg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anjan Tummalapalli

unread,
Sep 28, 2016, 4:37:10 AM9/28/16
to Repo and Gerrit Discussion
Thanks David for the quick fix..!! Issue solved for us and we are able to login to Gerrit now..

Best Regards
Anjan


On Wednesday, September 28, 2016 at 8:49:02 AM UTC+5:30, Rangaraj R wrote:

Daniel Liberman

unread,
Sep 28, 2016, 10:46:37 AM9/28/16
to Repo and Gerrit Discussion
Thank you so very much!
Reply all
Reply to author
Forward
0 new messages