>
>
>> On 15 Jun 2022, at 22:57, Leslie Wang <
qi...@pensando.io> wrote:
>>
>> Thanks for figuring out the issue.
>>
>> I’m still unclear where I need change. I changed to `canonicalWebUrl =
https://d1e8-38-99-81-66.ngrok.io`, but UI can not load. Do I need configure a reverse proxy?
>
> I believe you’re making it too complicated by using
grok.io: why don’t you just use localhost and port 8080 instead?
<Leslie> Localhost was good. I’ve been able to create projects, and create change set. That is why I moved to this advanced mode now because we have some projects in GitHub already. :-)
>
>>
>> Sorry for the simple question because I’m still new to Gerrit.
>
> No problem, as your first time Gerrit setup you’ve chosen a quite complex one :-)
> Why don’t you try with something simpler?
>
> If you are accessing it with
ngrok.io acting as SSL termination and reverse proxy, then yes, the gerrit.config needs to change to:
>
> [httpd]
> listenUrl = proxy-https://*:8080/
>
> [auth]
> cookieSecure = true
>
> [gerrit]
> canonicalWebUrl =
https://d1e8-38-99-81-66.ngrok.io/
>
<Leslie> Now it works after this change and restart the gerrit, after clicking sign on, it redirects me to GitHub. New problem is after clicking GitHub grant access, it return 500 failure. Below is error log in gerrit
[2022-06-15T22:09:40.220Z] [main] INFO com.google.gerrit.pgm.Daemon : Gerrit Code Review 3.5.2 ready
[2022-06-15T22:10:32.600Z] [HTTP-74] WARN org.eclipse.jetty.server.HttpChannel : handleException /oauth java.io.IOException: Invalid authentication state: expected 'null' but was 'CdAOy9FB3thdkRl00VKBfsLrPqY=,/login/%2Fq%2Fstatus%3Aopen%2B-is%3Awip'
[2022-06-15T22:10:32.609Z] [HTTP-74] ERROR com.google.gerrit.pgm.http.jetty.HiddenErrorHandler : Error in GET /oauth?code=cbef8647ea5d3c1c737c&state=CdAOy9FB3thdkRl00VKBfsLrPqY%3D%2C%2Flogin%2F%252Fq%252Fstatus%253Aopen%252B-is%253Awip
java.io.IOException: Invalid authentication state: expected 'null' but was 'CdAOy9FB3thdkRl00VKBfsLrPqY=,/login/%2Fq%2Fstatus%3Aopen%2B-is%3Awip'
at com.googlesource.gerrit.plugins.github.oauth.OAuthProtocol.loginPhase2(OAuthProtocol.java:336)
at com.googlesource.gerrit.plugins.github.oauth.GitHubLogin.login(GitHubLogin.java:102)
at com.googlesource.gerrit.plugins.github.oauth.OAuthWebFilter.login(OAuthWebFilter.java:123)
at com.googlesource.gerrit.plugins.github.oauth.OAuthWebFilter.doFilter(OAuthWebFilter.java:84)
at com.googlesource.gerrit.plugins.github.oauth.OAuthFilter.doFilter(OAuthFilter.java:72)
at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
at java.base/java.lang.Thread.run(Thread.java:829)
Unforutenaly it can record the video now because it goes to 500 directly even if I clean the cache and cookie.