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

After upgrading to powershell-plugin 1.5 enabling/disabling projects causes an error

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • powershell-plugin
    • None
    • Jenkins 2.277.4 and powershell-plugin 1.5

      Ever since I upgraded powershell-plugin from v1.4 to v1.5, I get exceptions like these when I enable/disable projects

      Caused: java.lang.RuntimeException: Failed to serialize hudson.plugins.powershell.PowerShell#listener for class hudson.plugins.powershell.PowerShell
      

      I guess it has to do with the new Powershell version selection feature. I looked under "manage jenkins -> Global tool configuration" to make sure a value was specified and it does seem like it's setup.

       

      Here's a longer stack trace (above extract is line 48).

      2021-05-11 20:36:54.252+0000 [id=134835] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID fa61f00e-743c-40d1-bd9c-8f52e03ec6052021-05-11 20:36:54.252+0000 [id=134835] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID fa61f00e-743c-40d1-bd9c-8f52e03ec605java.io.NotSerializableException: The calling thread Thread[Handling POST /view/REDACTED/job/REDACTED_JOB/disable from 192.168.xxx.x : Jetty (winstone)-134835,5,main] has no associated channel. The current object hudson.remoting.RemoteOutputStream@2041ea74 is interface org.jenkinsci.remoting.SerializableOnlyOverRemoting, but it is likely being serialized/deserialized without the channel at org.jenkinsci.remoting.SerializableOnlyOverRemoting.getChannelForSerialization(SerializableOnlyOverRemoting.java:67) at hudson.remoting.RemoteOutputStream.writeObject(RemoteOutputStream.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:154)Caused: com.thoughtworks.xstream.converters.ConversionException: Failed calling method---- Debugging information ----message             : Failed calling methodcause-exception     : java.io.NotSerializableExceptioncause-message       : The calling thread Thread[Handling POST /view/REDACTED/job/REDACTED_JOB/disable from 192.168.xxx.x : Jetty (winstone)-134835,5,main] has no associated channel. The current object hudson.remoting.RemoteOutputStream@2041ea74 is interface org.jenkinsci.remoting.SerializableOnlyOverRemoting, but it is likely being serialized/deserialized without the channelmethod              : hudson.remoting.RemoteOutputStream.writeObject()------------------------------- at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:158) at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doMarshal(SerializableConverter.java:257) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87) at com.thoughtworks.xstream.converters.reflection.SerializableConverter$1.writeToStream(SerializableConverter.java:139) at com.thoughtworks.xstream.core.util.CustomObjectOutputStream.writeObjectOverride(CustomObjectOutputStream.java:87) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:344) at hudson.util.StreamTaskListener.writeObject(StreamTaskListener.java:168) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:154)Caused: com.thoughtworks.xstream.converters.ConversionException: Failed calling method---- Debugging information ----message             : Failed calling methodcause-exception     : com.thoughtworks.xstream.converters.ConversionExceptioncause-message       : Failed calling methodmethod              : hudson.model.StreamBuildListener.writeObject()------------------------------- at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:158) at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doMarshal(SerializableConverter.java:257) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:275) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:262)Caused: java.lang.RuntimeException: Failed to serialize hudson.plugins.powershell.PowerShell#listener for class hudson.plugins.powershell.PowerShell at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:266) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:233) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:150) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:219) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:158) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66) at hudson.util.DescribableList$ConverterImpl.marshal(DescribableList.java:269) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:275) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:262)Caused: java.lang.RuntimeException: Failed to serialize hudson.model.Project#builders for class hudson.model.FreeStyleProject at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:266) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:233) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:150) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:219) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:158) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1276) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1265) at com.thoughtworks.xstream.XStream.toXML(XStream.java:1238) at hudson.XmlFile.write(XmlFile.java:195)Caused: java.io.IOException at hudson.XmlFile.write(XmlFile.java:202) at hudson.model.AbstractItem.save(AbstractItem.java:609) at hudson.model.Job.save(Job.java:191) at hudson.model.AbstractProject.save(AbstractProject.java:289) at jenkins.model.ParameterizedJobMixIn$ParameterizedJob.makeDisabled(ParameterizedJobMixIn.java:484) at jenkins.model.ParameterizedJobMixIn$ParameterizedJob.doDisable(ParameterizedJobMixIn.java:492) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408) 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:212) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145) at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:536) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898) at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:281) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898) at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:281) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:766) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:898) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:694) at org.kohsuke.stapler.Stapler.service(Stapler.java:240) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791) at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154) at jenkins.telemetry.impl.UserLanguages$AcceptLanguageFilter.doFilter(UserLanguages.java:129) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at jenkins.security.ResourceDomainFilter.doFilter(ResourceDomainFilter.java:76) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:153) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:92) at jenkins.security.AcegiSecurityExceptionFilter.doFilter(AcegiSecurityExceptionFilter.java:52) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97) at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:105) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:101) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:92) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:218) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97) at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:110) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80) at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:62) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:97) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:109) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:168) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:51) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at jenkins.security.SuspiciousRequestFilter.doFilter(SuspiciousRequestFilter.java:36) 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.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) 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:279) 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:383) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036) at java.lang.Thread.run(Thread.java:748)
      

       

          [JENKINS-65613] After upgrading to powershell-plugin 1.5 enabling/disabling projects causes an error

          Lowell Smith added a comment - - edited

          For what its worth, I also received this error and tracked it back to the v1.5 of the plugin.  After editing and saving a jenkins job, I could kick off a build onto our jenkins slave and have it complete successfully just once, all subsequent builds got this serialization error.  Downgrading to v1.4 caused the problem to stop happening entirely.

          Here was my exception/error text

          FATAL: java.lang.RuntimeException: Failed to serialize hudson.model.Project#builders for class hudson.model.FreeStyleProject
          java.io.NotSerializableException: The calling thread Thread[Executor #3 for windows-slave-1 : executing deploy-mbs-iceman #1729,5,main] has no associated channel. The current object hudson.remoting.RemoteOutputStream@65e0d820 is interface org.jenkinsci.remoting.SerializableOnlyOverRemoting, but it is likely being serialized/deserialized without the channel
          	at org.jenkinsci.remoting.SerializableOnlyOverRemoting.getChannelForSerialization(SerializableOnlyOverRemoting.java:67)
          	at hudson.remoting.RemoteOutputStream.writeObject(RemoteOutputStream.java:84)
          	at jdk.internal.reflect.GeneratedMethodAccessor636.invoke(Unknown Source)
          	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          	at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:154)
          Caused: com.thoughtworks.xstream.converters.ConversionException: Failed calling method
          ---- Debugging information ----
          message             : Failed calling method
          cause-exception     : java.io.NotSerializableException
          cause-message       : The calling thread Thread[Executor #3 for windows-slave-1 : executing deploy-mbs-iceman #1729,5,main] has no associated channel. The current object hudson.remoting.RemoteOutputStream@65e0d820 is interface org.jenkinsci.remoting.SerializableOnlyOverRemoting, but it is likely being serialized/deserialized without the channel
          method              : hudson.remoting.RemoteOutputStream.writeObject()
          -------------------------------
          	at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:158)
          	at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doMarshal(SerializableConverter.java:257)
          	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87)
          	at com.thoughtworks.xstream.converters.reflection.SerializableConverter$1.writeToStream(SerializableConverter.java:139)
          	at com.thoughtworks.xstream.core.util.CustomObjectOutputStream.writeObjectOverride(CustomObjectOutputStream.java:87)
          	at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:345)
          	at hudson.util.StreamTaskListener.writeObject(StreamTaskListener.java:168)
          	at jdk.internal.reflect.GeneratedMethodAccessor635.invoke(Unknown Source)
          	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          	at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:154)
          Caused: com.thoughtworks.xstream.converters.ConversionException: Failed calling method
          ---- Debugging information ----
          message             : Failed calling method
          cause-exception     : com.thoughtworks.xstream.converters.ConversionException
          cause-message       : Failed calling method
          method              : hudson.model.StreamBuildListener.writeObject()
          -------------------------------
          	at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:158)
          	at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doMarshal(SerializableConverter.java:257)
          	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
          	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:275)
          	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:262)
          Caused: java.lang.RuntimeException: Failed to serialize hudson.plugins.powershell.PowerShell#listener for class hudson.plugins.powershell.PowerShell
          	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:266)
          	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:233)
          	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:150)
          	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:219)
          	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:158)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87)
          	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94)
          	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66)
          	at hudson.util.DescribableList$ConverterImpl.marshal(DescribableList.java:269)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
          	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:275)
          	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:262)
          Caused: java.lang.RuntimeException: Failed to serialize hudson.model.Project#builders for class hudson.model.FreeStyleProject
          	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:266)
          	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:233)
          	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:150)
          	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:219)
          	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:158)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
          	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
          	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
          	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1276)
          	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1265)
          	at com.thoughtworks.xstream.XStream.toXML(XStream.java:1238)
          	at hudson.XmlFile.write(XmlFile.java:195)
          Caused: java.io.IOException
          	at hudson.XmlFile.write(XmlFile.java:202)
          	at hudson.model.AbstractItem.save(AbstractItem.java:609)
          	at hudson.model.Job.save(Job.java:191)
          	at hudson.model.AbstractProject.save(AbstractProject.java:289)
          	at hudson.model.AbstractProject.setCustomWorkspace(AbstractProject.java:2033)
          	at com.datalex.jenkins.plugins.nodestalker.wrapper.NodeStalkerBuildWrapper.setUp(NodeStalkerBuildWrapper.java:114)
          	at hudson.model.Build$BuildExecution.doRun(Build.java:157)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
          	at hudson.model.Run.execute(Run.java:1907)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          	at hudson.model.ResourceController.execute(ResourceController.java:97)
          	at hudson.model.Executor.run(Executor.java:429)
          

          Lowell Smith added a comment - - edited For what its worth, I also received this error and tracked it back to the v1.5 of the plugin.  After editing and saving a jenkins job, I could kick off a build onto our jenkins slave and have it complete successfully just once , all subsequent builds got this serialization error.  Downgrading to v1.4 caused the problem to stop happening entirely. Here was my exception/error text FATAL: java.lang.RuntimeException: Failed to serialize hudson.model.Project#builders for class hudson.model.FreeStyleProject java.io.NotSerializableException: The calling thread Thread[Executor #3 for windows-slave-1 : executing deploy-mbs-iceman #1729,5,main] has no associated channel. The current object hudson.remoting.RemoteOutputStream@65e0d820 is interface org.jenkinsci.remoting.SerializableOnlyOverRemoting, but it is likely being serialized/deserialized without the channel at org.jenkinsci.remoting.SerializableOnlyOverRemoting.getChannelForSerialization(SerializableOnlyOverRemoting.java:67) at hudson.remoting.RemoteOutputStream.writeObject(RemoteOutputStream.java:84) at jdk.internal.reflect.GeneratedMethodAccessor636.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:154) Caused: com.thoughtworks.xstream.converters.ConversionException: Failed calling method ---- Debugging information ---- message : Failed calling method cause-exception : java.io.NotSerializableException cause-message : The calling thread Thread[Executor #3 for windows-slave-1 : executing deploy-mbs-iceman #1729,5,main] has no associated channel. The current object hudson.remoting.RemoteOutputStream@65e0d820 is interface org.jenkinsci.remoting.SerializableOnlyOverRemoting, but it is likely being serialized/deserialized without the channel method : hudson.remoting.RemoteOutputStream.writeObject() ------------------------------- at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:158) at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doMarshal(SerializableConverter.java:257) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87) at com.thoughtworks.xstream.converters.reflection.SerializableConverter$1.writeToStream(SerializableConverter.java:139) at com.thoughtworks.xstream.core.util.CustomObjectOutputStream.writeObjectOverride(CustomObjectOutputStream.java:87) at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:345) at hudson.util.StreamTaskListener.writeObject(StreamTaskListener.java:168) at jdk.internal.reflect.GeneratedMethodAccessor635.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:154) Caused: com.thoughtworks.xstream.converters.ConversionException: Failed calling method ---- Debugging information ---- message : Failed calling method cause-exception : com.thoughtworks.xstream.converters.ConversionException cause-message : Failed calling method method : hudson.model.StreamBuildListener.writeObject() ------------------------------- at com.thoughtworks.xstream.core.util.SerializationMembers.callWriteObject(SerializationMembers.java:158) at com.thoughtworks.xstream.converters.reflection.SerializableConverter.doMarshal(SerializableConverter.java:257) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:275) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:262) Caused: java.lang.RuntimeException: Failed to serialize hudson.plugins.powershell.PowerShell#listener for class hudson.plugins.powershell.PowerShell at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:266) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:233) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:150) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:219) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:158) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66) at hudson.util.DescribableList$ConverterImpl.marshal(DescribableList.java:269) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:275) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:262) Caused: java.lang.RuntimeException: Failed to serialize hudson.model.Project#builders for class hudson.model.FreeStyleProject at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:266) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:233) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:150) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:219) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:158) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1276) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1265) at com.thoughtworks.xstream.XStream.toXML(XStream.java:1238) at hudson.XmlFile.write(XmlFile.java:195) Caused: java.io.IOException at hudson.XmlFile.write(XmlFile.java:202) at hudson.model.AbstractItem.save(AbstractItem.java:609) at hudson.model.Job.save(Job.java:191) at hudson.model.AbstractProject.save(AbstractProject.java:289) at hudson.model.AbstractProject.setCustomWorkspace(AbstractProject.java:2033) at com.datalex.jenkins.plugins.nodestalker.wrapper.NodeStalkerBuildWrapper.setUp(NodeStalkerBuildWrapper.java:114) at hudson.model.Build$BuildExecution.doRun(Build.java:157) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513) at hudson.model.Run.execute(Run.java:1907) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)

          Filipe Roque added a comment -

          I can't reproduce this. Anyone can provide instructions to reproduce ?

          Filipe Roque added a comment - I can't reproduce this. Anyone can provide instructions to reproduce ?

          Jorge Yanes added a comment - - edited

          In my case it's as simple as upgrading from v1.4 to 1.5 and then attempting to edit a job and then saving, it will trigger the "demon jenkins" page and generate the stack trace shared previously. I forgot to mention I'm running Jenkins on Java 8 and not 11. Could that be the reason?

          EDIT: Enabling/Disabling the job also triggers it, the exception I shared was caused by clicking the disable button.

          Jorge Yanes added a comment - - edited In my case it's as simple as upgrading from v1.4 to 1.5 and then attempting to edit a job and then saving, it will trigger the "demon jenkins" page and generate the stack trace shared previously. I forgot to mention I'm running Jenkins on Java 8 and not 11. Could that be the reason? EDIT: Enabling/Disabling the job also triggers it, the exception I shared was caused by clicking the disable button.

            froque Filipe Roque
            jyanesancert Jorge Yanes
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: