Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51793

Unable to save configuration changes after upgrading from 2.36 to 2.107.3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: logstash-plugin
    • Labels:
      None
    • Environment:
      Production
    • Similar Issues:

      Description

      java.net.MalformedURLException: no protocol:
      at java.net.URL.<init>(URL.java:605)
      at java.net.URL.<init>(URL.java:502)
      at java.net.URL.<init>(URL.java:451)
      at org.kohsuke.stapler.Stapler$4.convert(Stapler.java:1083)
      Caused: org.apache.commons.beanutils.ConversionException: no protocol:
      at org.kohsuke.stapler.Stapler$4.convert(Stapler.java:1085)
      at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:739)
      at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:478)
      at org.kohsuke.stapler.RequestImpl.injectSetters(RequestImpl.java:833)
      at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:783)
      at org.kohsuke.stapler.RequestImpl.access$200(RequestImpl.java:83)
      at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:678)
      at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:489)
      at jenkins.plugins.logstash.LogstashConfiguration.configure(LogstashConfiguration.java:178)
      at jenkins.model.Jenkins.configureDescriptor(Jenkins.java:3682)
      at jenkins.model.Jenkins.doConfigSubmit(Jenkins.java:3646)
      at java.lang.invoke.VirtualHandle.invokeExact_thunkArchetype_V(VirtualHandle.java:77)
      at java.lang.invoke.FilterReturnHandle.invokeExact_thunkArchetype_X(FilterReturnHandle.java:42)
      at java.lang.invoke.InvokeGenericHandle.invokeExact_thunkArchetype_X(InvokeGenericHandle.java:71)
      at java.lang.invoke.SpreadHandle.invokeExact_thunkArchetype_X(SpreadHandle.java:77)
      at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:538)
      at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
      at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)
      at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
      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)
      Caused: javax.servlet.ServletException
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:765)
      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:729)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
      at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
      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 io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:232)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:209)
      at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
      at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:113)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:99)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:591)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:495)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:767)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1347)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:785)

        Attachments

          Activity

          Hide
          cdoughty77 chris doughty added a comment -

          I had this problem on an entirely new server (no upgrade) with the same stacktrace as above using:

          • Jenkins ver. 2.107.3
          • Logstash plugin 2.0.0

          The logstash config file contained (jenkins.plugins.logstash.LogstashConfiguration.xml):

          <?xml version='1.1' encoding='UTF-8'?>
          <jenkins.plugins.logstash.LogstashConfiguration plugin="logstash@2.0.0">
           <dataMigrated>true</dataMigrated>
           <enableGlobally>false</enableGlobally>
          </jenkins.plugins.logstash.LogstashConfiguration> 
          
          

          Removing the above file did not resolve the issue, however in the UI if I set the "ElasticSearch" option to "Syslog" and added "localhost" in the "Host name" field, then I was able to saveĀ  again without getting the exception and the above file is now populated with:

          <?xml version='1.1' encoding='UTF-8'?>
          <jenkins.plugins.logstash.LogstashConfiguration plugin="logstash@2.0.0">
            <logstashIndexer class="jenkins.plugins.logstash.configuration.Syslog">
              <host>localhost</host>
              <port>519</port>
              <messageFormat>RFC_3164</messageFormat>
              <syslogProtocol>UDP</syslogProtocol>
            </logstashIndexer>
            <dataMigrated>true</dataMigrated>
            <enableGlobally>false</enableGlobally> 

          Hope this helps others. Seems like the default format of the configuration file might not be correct on first install, which causes issues with saving configuration.

          Show
          cdoughty77 chris doughty added a comment - I had this problem on an entirely new server (no upgrade) with the same stacktrace as above using: Jenkins ver. 2.107.3 Logstash plugin 2.0.0 The logstash config file contained (jenkins.plugins.logstash.LogstashConfiguration.xml): <?xml version= '1.1' encoding= 'UTF-8' ?> <jenkins.plugins.logstash.LogstashConfiguration plugin= "logstash@2.0.0" > <dataMigrated> true </dataMigrated> <enableGlobally> false </enableGlobally> </jenkins.plugins.logstash.LogstashConfiguration> Removing the above file did not resolve the issue, however in the UI if I set the "ElasticSearch" option to "Syslog" and added "localhost" in the "Host name" field, then I was able to saveĀ  again without getting the exception and the above file is now populated with: <?xml version= '1.1' encoding= 'UTF-8' ?> <jenkins.plugins.logstash.LogstashConfiguration plugin= "logstash@2.0.0" > <logstashIndexer class= "jenkins.plugins.logstash.configuration.Syslog" > <host>localhost</host> <port>519</port> <messageFormat>RFC_3164</messageFormat> <syslogProtocol>UDP</syslogProtocol> </logstashIndexer> <dataMigrated> true </dataMigrated> <enableGlobally> false </enableGlobally> Hope this helps others. Seems like the default format of the configuration file might not be correct on first install, which causes issues with saving configuration.
          Hide
          mwinter69 Markus Winter added a comment -

          fixed with version 2.1.0

          Show
          mwinter69 Markus Winter added a comment - fixed with version 2.1.0
          Hide
          codylample Cody Lample added a comment -

          Fresh Jenkins (2.121.1) install with plugin version 2.1.0 still throws a stack trace after saving global config even if no configurations are changed.

          chris doughty's workaround still works.

          Show
          codylample Cody Lample added a comment - Fresh Jenkins (2.121.1) install with plugin version 2.1.0 still throws a stack trace after saving global config even if no configurations are changed. chris doughty's workaround still works.
          Hide
          akovi Andras Kovi added a comment -

          To make things worse, it seems like the "Enabled" checkbox is not considered at all. The parameters need to be filled in, even if the plugin is turned off.

          Show
          akovi Andras Kovi added a comment - To make things worse, it seems like the "Enabled" checkbox is not considered at all. The parameters need to be filled in, even if the plugin is turned off.
          Hide
          mwinter69 Markus Winter added a comment -

          fixed with release 2.2.0

          Show
          mwinter69 Markus Winter added a comment - fixed with release 2.2.0

            People

            Assignee:
            jbochenski Jakub Bochenski
            Reporter:
            srinivascheeti Srinivas Cheeti
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: