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

Publish over SSH plugin XML configuration cannot be read on jenkins start up.

      The XML configuration for the publish over ssh plugin fails to load in the current (1.504) version of jenkins and the plugin (1.10). On my system, the file is located at: /var/lib/jenkins/jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin.xml.

      It seems to be an issue with xstream conversion. Here's the relevant bit of the stack trace (full trace is at the bottom).

      Caused by: com.thoughtworks.xstream.converters.ConversionException: object is not an instance of declaring class : object is not an instance of declaring class
      ---- Debugging information ----
      message : object is not an instance of declaring class
      cause-exception : java.lang.IllegalArgumentException
      cause-message : object is not an instance of declaring class
      class : jenkins.plugins.publish_over_ssh.BapSshHostConfiguration
      required-type : jenkins.plugins.publish_over_ssh.BapSshHostConfiguration
      converter-type : hudson.util.RobustReflectionConverter
      path : /jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor/hostConfigurations/jenkins.plugins.publish_over_ssh.BapSshHostConfiguration
      line number : 25
      class[1] : hudson.util.CopyOnWriteList
      converter-type[1] : hudson.util.XStream2$AssociatedConverterImpl
      class[2] : jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor
      version : null
      -------------------------------

      Jenkins still starts, however the configured ssh hosts do not show up. The configuration element that ends on line 25 is:

      <jenkins.plugins.publish_over_ssh.BapSshHostConfiguration>
      <name>[redacted]</name>
      <hostname>[redacted]</hostname>
      <username>[redacted]</username>
      <secretPassword>[redacted]</secretPassword>
      <remoteRootDir>[redacted]</remoteRootDir>
      <port>22</port>
      <commonConfig class="jenkins.plugins.publish_over_ssh.BapSshCommonConfiguration">
      <secretPassphrase>[redacted]</secretPassphrase>
      <key></key>
      <keyPath>.ssh/id_rsa</keyPath>
      <disableAllExec>false</disableAllExec>
      </commonConfig>
      <timeout>300000</timeout>
      <overrideKey>false</overrideKey>
      <disableExec>false</disableExec>
      <keyInfo>
      <secretPassphrase>[redacted]</secretPassphrase>
      <key></key>
      <keyPath></keyPath>
      </keyInfo>
      </jenkins.plugins.publish_over_ssh.BapSshHostConfiguration>

      The full stack trace:

      WARNING: Failed to load /var/lib/jenkins/jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin.xml
      hudson.util.IOException2: Unable to read /var/lib/jenkins/jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin.xml
      at hudson.XmlFile.unmarshal(XmlFile.java:164)
      at hudson.model.Descriptor.load(Descriptor.java:806)
      at jenkins.plugins.publish_over_ssh.descriptor.BapSshPublisherPluginDescriptor.<init>(BapSshPublisherPluginDescriptor.java:68)
      at jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor.<init>(BapSshPublisherPlugin.java:81)
      at jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor$$FastClassByGuice$$c0ccaf36.newInstance(<generated>)
      at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
      at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
      at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
      at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87)
      at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:259)
      at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1018)
      at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      at com.google.inject.Scopes$1$1.get(Scopes.java:59)
      at hudson.ExtensionFinder$GuiceFinder$4$1.get(ExtensionFinder.java:422)
      at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
      at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:965)
      at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1011)
      at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:961)
      at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:391)
      at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:382)
      at hudson.ExtensionFinder._find(ExtensionFinder.java:151)
      at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:318)
      at hudson.ExtensionList.load(ExtensionList.java:295)
      at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
      at hudson.ExtensionList.iterator(ExtensionList.java:138)
      at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1171)
      at hudson.plugins.copyartifact.BuildSelectorParameter.initAliases(BuildSelectorParameter.java:100)
      at hudson.plugins.copyartifact.CopyArtifactPlugin.postInitialize(CopyArtifactPlugin.java:35)
      at hudson.PluginManager$2$1$2.run(PluginManager.java:352)
      at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
      at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
      at jenkins.model.Jenkins$7.runTask(Jenkins.java:883)
      at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
      at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:679)
      Caused by: com.thoughtworks.xstream.converters.ConversionException: object is not an instance of declaring class : object is not an instance of declaring class
      ---- Debugging information ----
      message : object is not an instance of declaring class
      cause-exception : java.lang.IllegalArgumentException
      cause-message : object is not an instance of declaring class
      class : jenkins.plugins.publish_over_ssh.BapSshHostConfiguration
      required-type : jenkins.plugins.publish_over_ssh.BapSshHostConfiguration
      converter-type : hudson.util.RobustReflectionConverter
      path : /jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor/hostConfigurations/jenkins.plugins.publish_over_ssh.BapSshHostConfiguration
      line number : 25
      class[1] : hudson.util.CopyOnWriteList
      converter-type[1] : hudson.util.XStream2$AssociatedConverterImpl
      class[2] : jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor
      version : null
      -------------------------------
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
      at hudson.util.CopyOnWriteList$ConverterImpl.unmarshal(CopyOnWriteList.java:193)
      at hudson.util.CopyOnWriteList$ConverterImpl.unmarshal(CopyOnWriteList.java:172)
      at hudson.util.XStream2$AssociatedConverterImpl.unmarshal(XStream2.java:337)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:333)
      at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:275)
      at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:222)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
      at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1061)
      at hudson.util.XStream2.unmarshal(XStream2.java:109)
      at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1045)
      at hudson.XmlFile.unmarshal(XmlFile.java:160)
      ... 37 more
      Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(SerializationMethodInvoker.java:66)
      at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:223)
      at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
      ... 60 more

          [JENKINS-17058] Publish over SSH plugin XML configuration cannot be read on jenkins start up.

          Code changed in jenkins
          User: Alex Earl
          Path:
          pom.xml
          src/main/java/jenkins/plugins/publish_over_ssh/BapSshHostConfiguration.java
          src/main/java/jenkins/plugins/publish_over_ssh/BapSshPublisherPlugin.java
          http://jenkins-ci.org/commit/publish-over-ssh-plugin/dbc15b7ae03b4b140e074295a6c243a4781842ec
          Log:
          Merge pull request #4 from key-consulting/master

          JENKINS-17058 add readResolve on BapSshHostConfiguration, fix dep

          Compare: https://github.com/jenkinsci/publish-over-ssh-plugin/compare/c591bae51812...dbc15b7ae03b

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alex Earl Path: pom.xml src/main/java/jenkins/plugins/publish_over_ssh/BapSshHostConfiguration.java src/main/java/jenkins/plugins/publish_over_ssh/BapSshPublisherPlugin.java http://jenkins-ci.org/commit/publish-over-ssh-plugin/dbc15b7ae03b4b140e074295a6c243a4781842ec Log: Merge pull request #4 from key-consulting/master JENKINS-17058 add readResolve on BapSshHostConfiguration, fix dep Compare: https://github.com/jenkinsci/publish-over-ssh-plugin/compare/c591bae51812...dbc15b7ae03b

          What do we need to do to get on the maintainers list?

          Preston Gilchrist added a comment - What do we need to do to get on the maintainers list?

          Hello,

          I hve fixed the problem earlier this year. See my Jira-comments on April of 2013.
          You can look into my sources on Github.

          I don't know, how to propagate my patches to the official version of the plugins (pull-request?). So I use my own patched version since April without any problems until now with Jenkins 1.544.

          Alexander Fischer added a comment - Hello, I hve fixed the problem earlier this year. See my Jira-comments on April of 2013. You can look into my sources on Github. https://github.com/afischer211/publish-over-plugin https://github.com/afischer211/publish-over-ssh-plugin I don't know, how to propagate my patches to the official version of the plugins (pull-request?). So I use my own patched version since April without any problems until now with Jenkins 1.544.

          @Preston, I suggest e-mailing on this thread in the jenkins-dev mailing list: https://groups.google.com/forum/#!topic/jenkinsci-dev/7vEwarVHbgc

          Slide merged the change today and is supposed to be pushing out a release, but he's still looking for a new official maintainer.

          Mark Ottaviani added a comment - @Preston, I suggest e-mailing on this thread in the jenkins-dev mailing list: https://groups.google.com/forum/#!topic/jenkinsci-dev/7vEwarVHbgc Slide merged the change today and is supposed to be pushing out a release, but he's still looking for a new official maintainer.

          Code changed in jenkins
          User: Alexander Fischer
          Path:
          .gitignore
          pom.xml
          src/test/java/jenkins/plugins/publish_over/BPBuildInfoTest.java
          http://jenkins-ci.org/commit/publish-over-plugin/a9d9ab51505ce83b3a6d507465e0b2bb9b72f558
          Log:
          fix for jenkins-bug #JENKINS-17058

          modified unit-test for resolving relative paths;
          updated pom - integrate plugin-API for Jenkins1.510 and adapt for
          Eclipse m2e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alexander Fischer Path: .gitignore pom.xml src/test/java/jenkins/plugins/publish_over/BPBuildInfoTest.java http://jenkins-ci.org/commit/publish-over-plugin/a9d9ab51505ce83b3a6d507465e0b2bb9b72f558 Log: fix for jenkins-bug # JENKINS-17058 modified unit-test for resolving relative paths; updated pom - integrate plugin-API for Jenkins1.510 and adapt for Eclipse m2e

          Code changed in jenkins
          User: Alexander Fischer
          Path:
          src/test/java/jenkins/plugins/publish_over/BPHostConfigurationTest.java
          src/test/java/jenkins/plugins/publish_over/helper/BPHostConfigurationFactory.java
          http://jenkins-ci.org/commit/publish-over-plugin/962aace22881b26507a091e7397b79a77aaa4927
          Log:
          fix for jenkins-bug #JENKINS-17058

          overriding method readResolve() from base-class BPHostConfiguration for
          resoving Reflection-problems with XStream

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Alexander Fischer Path: src/test/java/jenkins/plugins/publish_over/BPHostConfigurationTest.java src/test/java/jenkins/plugins/publish_over/helper/BPHostConfigurationFactory.java http://jenkins-ci.org/commit/publish-over-plugin/962aace22881b26507a091e7397b79a77aaa4927 Log: fix for jenkins-bug # JENKINS-17058 overriding method readResolve() from base-class BPHostConfiguration for resoving Reflection-problems with XStream

          Fixed in version 1.11 of the Publish over SSH plugin.

          Mark Ottaviani added a comment - Fixed in version 1.11 of the Publish over SSH plugin.

          David Turner added a comment -

          Hi All, For clarity, can someone please answer this q'n?

          We're still on Jenkins 1.509.2 LTS, Windows exe, bundled 1.6 Java RE (like bdellegrazie above) and have this problem.

          I am browsing the GitHub forks trying to work out the necessary dependencies to obtain a compatible 'fix' for Publish Over SSH without updating Java RE or Jenkins core.

          Will the 'fixed' SSH 1.11 work on 1.509 LTS and J6RE despite the apparent new baseline?

          Ref from the MANIFEST.MFs:

          Plugin-Version: 1.10
          Hudson-Version: 1.388
          Build-Jdk: 1.6.0_32
          Depends on Publish-Over: 0.17

          Plugin-Version: 1.11
          Hudson-Version: 1.532.1
          Jenkins-Version: 1.532.1
          Build-Jdk: 1.7.0_45
          Depends on Publish-Over: 0.18

          David Turner added a comment - Hi All, For clarity, can someone please answer this q'n? We're still on Jenkins 1.509.2 LTS, Windows exe, bundled 1.6 Java RE (like bdellegrazie above) and have this problem. I am browsing the GitHub forks trying to work out the necessary dependencies to obtain a compatible 'fix' for Publish Over SSH without updating Java RE or Jenkins core. Will the 'fixed' SSH 1.11 work on 1.509 LTS and J6RE despite the apparent new baseline? Ref from the MANIFEST.MFs: Plugin-Version: 1.10 Hudson-Version: 1.388 Build-Jdk: 1.6.0_32 Depends on Publish-Over: 0.17 Plugin-Version: 1.11 Hudson-Version: 1.532.1 Jenkins-Version: 1.532.1 Build-Jdk: 1.7.0_45 Depends on Publish-Over: 0.18

          I came in with a similar issue. I installed a brand new Jenkins and brand new set of plugins. I attempted to add a server in the manage jenkins configuration area and the values would disappear over and over again. I am essentially copying another jenkins master to test something. So, I went to the existing jenkins master and copied 

          jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin.xml

           from the old master to the new one. The values show up in the dashboard and I can modify it and it works, etc. 

          The Jenkins is version 2.104, the plugin is 1.18 The underlying OS is Centos 7.2

           

          Something is preventing Jenkins from creating this file. I don't know what to stack trace. Not a java programmer. I figure I'd throw this out there if you want a workaround. 

          Elaine Richards added a comment - I came in with a similar issue. I installed a brand new Jenkins and brand new set of plugins. I attempted to add a server in the manage jenkins configuration area and the values would disappear over and over again. I am essentially copying another jenkins master to test something. So, I went to the existing jenkins master and copied  jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin.xml  from the old master to the new one. The values show up in the dashboard and I can modify it and it works, etc.  The Jenkins is version 2.104, the plugin is 1.18 The underlying OS is Centos 7.2   Something is preventing Jenkins from creating this file. I don't know what to stack trace. Not a java programmer. I figure I'd throw this out there if you want a workaround. 

          For your information, all publish-over-ssh component type JENKINS issues related to the Publish Over SSH plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues

          Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues/204
          And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-ssh-plugin/issues?q=%22JENKINS-17058%22

          (Note: this is an automated bulk comment)

          Gavin McDonald added a comment - For your information, all publish-over-ssh component type JENKINS issues related to the Publish Over SSH plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-ssh-plugin/issues/204 And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-ssh-plugin/issues?q=%22JENKINS-17058%22 (Note: this is an automated bulk comment)

            thomasvandoren Thomas Van Doren
            thomasvandoren Thomas Van Doren
            Votes:
            30 Vote for this issue
            Watchers:
            46 Start watching this issue

              Created:
              Updated:
              Resolved: