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

Latest sse-gateway plugin #1767

Closed
wants to merge 1 commit into from
Closed

Latest sse-gateway plugin #1767

wants to merge 1 commit into from

Conversation

vivek
Copy link
Collaborator

@vivek vivek commented Jul 3, 2018

Description

Test latest sue-gateway plugin. See discussion on sse-gateway PR for details.

Submitter checklist

  • Link to JIRA ticket in description, if appropriate.
  • Change is code complete and matches issue description
  • Appropriate unit or acceptance tests or explanation to why this change has no tests
  • Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.

Reviewer checklist

  • Run the changes and verified the change matches the issue description
  • Reviewed the code
  • Verified that the appropriate tests have been written or valid explanation given

@vivek
Copy link
Collaborator Author

vivek commented Jul 23, 2018

@kshultzCB PTAL, we need your go ahead on this.

Copy link
Collaborator

@kzantow kzantow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; tests are passing 👍

@vivek
Copy link
Collaborator Author

vivek commented Jul 23, 2018

@kshultzCB in terms of what we want more that ATH tests would be to confirm manually whether SSE events are delivered on different interactions with blueocean. Thanks.

@kshultzCB
Copy link
Collaborator

There might be some problems. It's hard to say for sure, since I'm not able to hit the update center when running from mvn -f blueocean/pom.xml hpi:run. But with that said:

  1. Start with a fresh install. In other words, from ~/your-repos/blueocean-plugin/, remove everything in blueocean/work, then start Jenkins in developer mode using mvn -f blueocean/pom.xml hpi:run. Like this:
✔ ~/GitHub/blueocean-plugin [pr-1767 L|✔] 
15:14 $ rm -rf blueocean/work/*
✔ ~/GitHub/blueocean-plugin [pr-1767 L|✔] 
15:14 $ mvn -f blueocean/pom.xml hpi:run
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building Blue Ocean 1.7.0-beta-1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
  1. I'm having an environmental problem connecting to the update center on bringup. The trace looks like this:
SEVERE: ERROR: Signature verification failed in update site &#039;default&#039; <a href='#' class='showDetails'>(show details)</a><pre style='display:none'>java.security.cert.CertPathValidatorException: Algorithm constraints check failed on keysize limits. RSA 1024bit key used with certificate: CN=Community Update Center, O=Jenkins Project, ST=California, C=US.

I don't know if this is relevant to the SSE problems I'm having.

  1. Go to Manage Jenkins, turn on Security, setting it to use Jenkins' own user database.

image

  1. Sign up as admin, or whoever you like. When done with that, you'll be signed in as admin.

image

  1. Because I want to build the pipeline-model-definition-plugin project as a test case, I've added two node labels to my master. java, and linux.

image

  1. Click "Open Blue Ocean" in the left hand navigation, and you'll be taken to the "Create a New Pipeline" flow:

image

  1. Most of the time this flow works fine. But on one pass, I got decidedly SSE-related errors reported in the Jenkins log:
INFO: Finished Download metadata. 2,233 ms
Jul 25, 2018 3:10:25 PM org.apache.commons.jexl.util.introspection.Introspector clearCache
INFO: Introspector : detected classloader change. Dumping cache.
[WARNING] Error while serving http://127.0.0.1:8080/jenkins/sse-gateway/ping
java.lang.reflect.InvocationTargetException
    at org.kohsuke.stapler.Function$MethodFunction.invoke (Function.java:347)
    at org.kohsuke.stapler.Function.bindAndInvoke (Function.java:184)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse (Function.java:117)
    at org.kohsuke.stapler.MetaClass$1.doDispatch (MetaClass.java:129)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch (NameBasedDispatcher.java:58)
    at org.kohsuke.stapler.Stapler.tryInvoke (Stapler.java:715)
    at org.kohsuke.stapler.Stapler.invoke (Stapler.java:845)
    at org.kohsuke.stapler.MetaClass$10.dispatch (MetaClass.java:374)
    at org.kohsuke.stapler.Stapler.tryInvoke (Stapler.java:715)
    at org.kohsuke.stapler.Stapler.invoke (Stapler.java:845)
    at org.kohsuke.stapler.Stapler.invoke (Stapler.java:649)
    at org.kohsuke.stapler.Stapler.service (Stapler.java:238)
    at javax.servlet.http.HttpServlet.service (HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle (ServletHolder.java:841)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1650)
    at hudson.util.PluginServletFilter$1.doFilter (PluginServletFilter.java:154)
    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter (Endpoint.java:243)
    at hudson.util.PluginServletFilter$1.doFilter (PluginServletFilter.java:151)
    at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter (JwtAuthenticationFilter.java:61)
    at hudson.util.PluginServletFilter$1.doFilter (PluginServletFilter.java:151)
    at hudson.util.PluginServletFilter.doFilter (PluginServletFilter.java:157)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at hudson.security.csrf.CrumbFilter.doFilter (CrumbFilter.java:64)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:84)
    at hudson.security.UnwrapSecurityExceptionFilter.doFilter (UnwrapSecurityExceptionFilter.java:51)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at jenkins.security.ExceptionTranslationFilter.doFilter (ExceptionTranslationFilter.java:117)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter (AnonymousProcessingFilter.java:125)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter (RememberMeProcessingFilter.java:142)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter (AbstractProcessingFilter.java:271)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at jenkins.security.BasicHeaderProcessor.doFilter (BasicHeaderProcessor.java:93)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter (HttpSessionContextIntegrationFilter.java:249)
    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter (HttpSessionContextIntegrationFilter2.java:67)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at hudson.security.ChainedServletFilter.doFilter (ChainedServletFilter.java:90)
    at hudson.security.HudsonFilter.doFilter (HudsonFilter.java:171)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter (CompressionFilter.java:49)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at hudson.util.CharacterEncodingFilter.doFilter (CharacterEncodingFilter.java:82)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter (DiagnosticThreadNameFilter.java:30)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle (ServletHandler.java:533)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle (SecurityHandler.java:524)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle (HandlerWrapper.java:132)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle (ScopedHandler.java:190)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle (SessionHandler.java:1595)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle (ScopedHandler.java:188)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle (ContextHandler.java:1253)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope (ScopedHandler.java:168)
    at org.eclipse.jetty.servlet.ServletHandler.doScope (ServletHandler.java:473)
    at org.eclipse.jetty.server.session.SessionHandler.doScope (SessionHandler.java:1564)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope (ScopedHandler.java:166)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope (ContextHandler.java:1155)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle (ContextHandlerCollection.java:219)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle (HandlerCollection.java:126)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle (HandlerWrapper.java:132)
    at org.eclipse.jetty.server.Server.handle (Server.java:564)
    at org.eclipse.jetty.server.HttpChannel.handle (HttpChannel.java:317)
    at org.eclipse.jetty.server.HttpConnection.onFillable (HttpConnection.java:251)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded (AbstractConnection.java:279)
    at org.eclipse.jetty.io.FillInterest.fillable (FillInterest.java:110)
    at org.eclipse.jetty.io.ChannelEndPoint$2.run (ChannelEndPoint.java:124)
    at org.eclipse.jetty.util.thread.Invocable.invokePreferred (Invocable.java:128)
    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke (Invocable.java:222)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce (EatWhatYouKill.java:294)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run (EatWhatYouKill.java:199)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob (QueuedThreadPool.java:672)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run (QueuedThreadPool.java:590)
    at java.lang.Thread.run (Thread.java:748)
Caused by: java.lang.ClassCastException: org.jenkinsci.plugins.ssegateway.sse.AsynchEventDispatcher cannot be cast to org.jenkinsci.plugins.ssegateway.sse.EventDispatcher
    at org.jenkinsci.plugins.ssegateway.sse.EventDispatcherFactory.getDispatcher (EventDispatcherFactory.java:160)
    at org.jenkinsci.plugins.ssegateway.Endpoint.doPing (Endpoint.java:197)
    at java.lang.invoke.MethodHandle.invokeWithArguments (MethodHandle.java:627)
    at org.kohsuke.stapler.Function$MethodFunction.invoke (Function.java:343)
    at org.kohsuke.stapler.Function.bindAndInvoke (Function.java:184)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse (Function.java:117)
    at org.kohsuke.stapler.MetaClass$1.doDispatch (MetaClass.java:129)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch (NameBasedDispatcher.java:58)
    at org.kohsuke.stapler.Stapler.tryInvoke (Stapler.java:715)
    at org.kohsuke.stapler.Stapler.invoke (Stapler.java:845)
    at org.kohsuke.stapler.MetaClass$10.dispatch (MetaClass.java:374)
    at org.kohsuke.stapler.Stapler.tryInvoke (Stapler.java:715)
    at org.kohsuke.stapler.Stapler.invoke (Stapler.java:845)
    at org.kohsuke.stapler.Stapler.invoke (Stapler.java:649)
    at org.kohsuke.stapler.Stapler.service (Stapler.java:238)
    at javax.servlet.http.HttpServlet.service (HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle (ServletHolder.java:841)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1650)
    at hudson.util.PluginServletFilter$1.doFilter (PluginServletFilter.java:154)
    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter (Endpoint.java:243)
    at hudson.util.PluginServletFilter$1.doFilter (PluginServletFilter.java:151)
    at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter (JwtAuthenticationFilter.java:61)
    at hudson.util.PluginServletFilter$1.doFilter (PluginServletFilter.java:151)
    at hudson.util.PluginServletFilter.doFilter (PluginServletFilter.java:157)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at hudson.security.csrf.CrumbFilter.doFilter (CrumbFilter.java:64)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:84)
    at hudson.security.UnwrapSecurityExceptionFilter.doFilter (UnwrapSecurityExceptionFilter.java:51)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at jenkins.security.ExceptionTranslationFilter.doFilter (ExceptionTranslationFilter.java:117)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter (AnonymousProcessingFilter.java:125)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter (RememberMeProcessingFilter.java:142)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter (AbstractProcessingFilter.java:271)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at jenkins.security.BasicHeaderProcessor.doFilter (BasicHeaderProcessor.java:93)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter (HttpSessionContextIntegrationFilter.java:249)
    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter (HttpSessionContextIntegrationFilter2.java:67)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at hudson.security.ChainedServletFilter.doFilter (ChainedServletFilter.java:90)
    at hudson.security.HudsonFilter.doFilter (HudsonFilter.java:171)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter (CompressionFilter.java:49)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at hudson.util.CharacterEncodingFilter.doFilter (CharacterEncodingFilter.java:82)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter (DiagnosticThreadNameFilter.java:30)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle (ServletHandler.java:533)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle (SecurityHandler.java:524)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle (HandlerWrapper.java:132)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle (ScopedHandler.java:190)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle (SessionHandler.java:1595)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle (ScopedHandler.java:188)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle (ContextHandler.java:1253)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope (ScopedHandler.java:168)
    at org.eclipse.jetty.servlet.ServletHandler.doScope (ServletHandler.java:473)
    at org.eclipse.jetty.server.session.SessionHandler.doScope (SessionHandler.java:1564)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope (ScopedHandler.java:166)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope (ContextHandler.java:1155)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle (ContextHandlerCollection.java:219)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle (HandlerCollection.java:126)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle (HandlerWrapper.java:132)
    at org.eclipse.jetty.server.Server.handle (Server.java:564)
    at org.eclipse.jetty.server.HttpChannel.handle (HttpChannel.java:317)
    at org.eclipse.jetty.server.HttpConnection.onFillable (HttpConnection.java:251)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded (AbstractConnection.java:279)
    at org.eclipse.jetty.io.FillInterest.fillable (FillInterest.java:110)
    at org.eclipse.jetty.io.ChannelEndPoint$2.run (ChannelEndPoint.java:124)
    at org.eclipse.jetty.util.thread.Invocable.invokePreferred (Invocable.java:128)
    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke (Invocable.java:222)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce (EatWhatYouKill.java:294)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run (EatWhatYouKill.java:199)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob (QueuedThreadPool.java:672)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run (QueuedThreadPool.java:590)
    at java.lang.Thread.run (Thread.java:748)

I've been working on a reliable way to recreate this, and haven't found it yet.

@kshultzCB
Copy link
Collaborator

I take back what I said about not being able to recreate it. Looks like you can hit this by going back to the terminal window in which you started Jenkins, and hitting Enter. I've got a habit of doing this to "clear up some space" if I'm trying to separate log output for a particular set of exploratory tests - but when running from hpi:run this has the effect of restarting Jenkins. It's after this restart that I start to see a lot of problems.

  1. I get logged out of Jenkins at my browser (which might be fine - I've never really noticed that before though). Eventually I figured out that I just can't log in anymore, at all.

  2. Lots of errors thrown by Jenkins in the console log. I've put them all in this Gist, since it's an awful lot of text to put on a PR comment.

One of the more relevant looking bits is:

Caused by: java.lang.ClassCastException: org.jenkinsci.plugins.ssegateway.sse.AsynchEventDispatcher cannot be cast to org.jenkinsci.plugins.ssegateway.sse.EventDispatcher
    at org.jenkinsci.plugins.ssegateway.sse.EventDispatcherFactory.getDispatcher (EventDispatcherFactory.java:160)
    at org.jenkinsci.plugins.ssegateway.Endpoint.doPing (Endpoint.java:197)
    at java.lang.invoke.MethodHandle.invokeWithArguments (MethodHandle.java:627)
    at org.kohsuke.stapler.Function$MethodFunction.invoke (Function.java:343)
    at org.kohsuke.stapler.Function.bindAndInvoke (Function.java:184)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse (Function.java:117)
    at org.kohsuke.stapler.MetaClass$1.doDispatch (MetaClass.java:129)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch (NameBasedDispatcher.java:58)
    at org.kohsuke.stapler.Stapler.tryInvoke (Stapler.java:715)
    at org.kohsuke.stapler.Stapler.invoke (Stapler.java:845)
    at org.kohsuke.stapler.MetaClass$10.dispatch (MetaClass.java:374)
    at org.kohsuke.stapler.Stapler.tryInvoke (Stapler.java:715)
    at org.kohsuke.stapler.Stapler.invoke (Stapler.java:845)
    at org.kohsuke.stapler.Stapler.invoke (Stapler.java:649)
    at org.kohsuke.stapler.Stapler.service (Stapler.java:238)
    at javax.servlet.http.HttpServlet.service (HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle (ServletHolder.java:841)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1650)
    at hudson.util.PluginServletFilter$1.doFilter (PluginServletFilter.java:154)
    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter (Endpoint.java:243)
    at hudson.util.PluginServletFilter$1.doFilter (PluginServletFilter.java:151)
    at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter (JwtAuthenticationFilter.java:61)
    at hudson.util.PluginServletFilter$1.doFilter (PluginServletFilter.java:151)
    at hudson.util.PluginServletFilter.doFilter (PluginServletFilter.java:157)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at hudson.security.csrf.CrumbFilter.doFilter (CrumbFilter.java:64)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:84)
    at hudson.security.UnwrapSecurityExceptionFilter.doFilter (UnwrapSecurityExceptionFilter.java:51)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at jenkins.security.ExceptionTranslationFilter.doFilter (ExceptionTranslationFilter.java:117)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter (AnonymousProcessingFilter.java:125)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter (RememberMeProcessingFilter.java:142)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter (AbstractProcessingFilter.java:271)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at jenkins.security.BasicHeaderProcessor.doFilter (BasicHeaderProcessor.java:93)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter (HttpSessionContextIntegrationFilter.java:249)
    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter (HttpSessionContextIntegrationFilter2.java:67)
    at hudson.security.ChainedServletFilter$1.doFilter (ChainedServletFilter.java:87)
    at hudson.security.ChainedServletFilter.doFilter (ChainedServletFilter.java:90)
    at hudson.security.HudsonFilter.doFilter (HudsonFilter.java:171)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter (CompressionFilter.java:49)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at hudson.util.CharacterEncodingFilter.doFilter (CharacterEncodingFilter.java:82)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter (DiagnosticThreadNameFilter.java:30)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter (ServletHandler.java:1637)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle (ServletHandler.java:533)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle (SecurityHandler.java:524)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle (HandlerWrapper.java:132)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle (ScopedHandler.java:190)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle (SessionHandler.java:1595)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle (ScopedHandler.java:188)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle (ContextHandler.java:1253)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope (ScopedHandler.java:168)
    at org.eclipse.jetty.servlet.ServletHandler.doScope (ServletHandler.java:473)
    at org.eclipse.jetty.server.session.SessionHandler.doScope (SessionHandler.java:1564)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope (ScopedHandler.java:166)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope (ContextHandler.java:1155)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle (ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle (ContextHandlerCollection.java:219)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle (HandlerCollection.java:126)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle (HandlerWrapper.java:132)
    at org.eclipse.jetty.server.Server.handle (Server.java:564)
    at org.eclipse.jetty.server.HttpChannel.handle (HttpChannel.java:317)
    at org.eclipse.jetty.server.HttpConnection.onFillable (HttpConnection.java:251)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded (AbstractConnection.java:279)
    at org.eclipse.jetty.io.FillInterest.fillable (FillInterest.java:110)
    at org.eclipse.jetty.io.ChannelEndPoint$2.run (ChannelEndPoint.java:124)
    at org.eclipse.jetty.util.thread.Invocable.invokePreferred (Invocable.java:128)
    at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke (Invocable.java:222)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce (EatWhatYouKill.java:294)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run (EatWhatYouKill.java:199)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob (QueuedThreadPool.java:672)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run (QueuedThreadPool.java:590)
    at java.lang.Thread.run (Thread.java:748)

I've never seen Jenkins do anything like this before, until running this PR in dev mode.

@vivek
Copy link
Collaborator Author

vivek commented Jul 25, 2018

@kshultzCB Thanks for looking in to it. so the exception below happens only after you hit enter, forcing jenkins to reload?

Caused by: java.lang.ClassCastException: org.jenkinsci.plugins.ssegateway.sse.AsynchEventDispatcher cannot be cast to org.jenkinsci.plugins.ssegateway.sse.EventDispatcher

@kshultzCB
Copy link
Collaborator

kshultzCB commented Jul 25, 2018

@vivek - it looks that way, yes.

As I mentioned earlier, I'm having problems with not being able to connect to the update center correctly. I suppose it's possible those are related? That problem can easily be recreated without restarting Jenkins. And was an issue before I ran this PR build - in other words, I hit this when I run from master as well.

SEVERE: ERROR: Signature verification failed in update site &#039;default&#039; <a href='#' class='showDetails'>(show details)</a><pre style='display:none'>java.security.cert.CertPathValidatorException: Algorithm constraints check failed on keysize limits. RSA 1024bit key used with certificate: CN=Community Update Center, O=Jenkins Project, ST=California, C=US.

Might be worthwhile for someone without a wonky local environment to run through these quick steps:

  1. Pull down the PR:
git fetch jenkinsci pull/276/head:pr-276
git checkout pr-276
mvn clean install -DskipTests=true
  1. Wipe out your workspace if you had one already:
rm -rf blueocean/work/*
  1. Start in dev mode, via:
mvn -f blueocean/pom.xml hpi:run
  1. Configure Security and add a user

  2. Create a pipeline

  3. Switch back to the terminal where you launched hpi:run, and hit Enter to restart Jenkins

  4. Attempt to log back in.

That seems the fastest way to recreate.

@vivek
Copy link
Collaborator Author

vivek commented Jul 25, 2018

@kshultzCB pressing Enter on jenkins run using mvn hpi:run most times didn't work for me in general with blueocean. Its feature for developers to reload plugins without actual restart, not a production use of jenkins.

We should be able to reproduce it without it to call out genuine bug. Since these

As I mentioned earlier, I'm having problems with not being able to connect to the update center correctly. I suppose it's possible those are related?

I doubt. sse gateway and all dependencies are served from local build update center shouldn't cause CCE errors.

@kshultzCB
Copy link
Collaborator

kshultzCB commented Jul 26, 2018

Things look good to me from an end-user standpoint.

Standard restarts via http://1.2.3.4:8080/jenkins/restart don't trigger the odd behavior I described above with hpi:run. I've run through several create flows, Bitbucket and GitHub both. Haven't seen anything out of the ordinary. Basic editor flows are working fine too, although I haven't done anything exotic that hasn't already been done via the ATH anyway.

I figured that certificate problem with the update center was unrelated - just was providing it as a "preexisting condition." :)

It do think it would be good to understand why the hpi:run thing is misbehaving. I know it's a dev-only use case, but I use it pretty often if I'm working on tests.

@vivek
Copy link
Collaborator Author

vivek commented Jul 26, 2018

Things look good to me from an end-user standpoint.

Cool, thanks.

It do think it would be good to understand why the hpi:run thing is misbehaving. I know it's a dev-only use case, but I use it pretty often if I'm working on tests.

This feature never worked for me from the beginning, I do not use it often so never paid attention to find more about it. So to try again, I launched blueocean (from master branch) and tried pressing enter running instance and it gives strange errors. So yeah, probably there is something fixable there. Maybe @imeredith knows.

@vivek
Copy link
Collaborator Author

vivek commented Sep 19, 2018

Closed. Upgrade to sse-gateway 1.16 pr #1809.

@vivek vivek closed this Sep 19, 2018
@halkeye halkeye deleted the test-latest-sse-gateway branch January 24, 2019 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants