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

Publish Over SSH Pipeline Failure

    Details

    • Similar Issues:

      Description

      I would like to use the Plugin in my Pipeline but it fails with the issue mentioned below:

      Feb 23, 2018 11:03:42 AM org.jenkinsci.plugins.structs.describable.DescribableParameter uncoerce
      WARNING: failed to uncoerce BapSshPublisherPlugin[consolePrefix=SSH: ,delegate=BPInstanceConfig[publishers=[BapSshPublisher[configName=swpsws28,verbose=false,transfers=[BapSshTransfer[sourceFiles=x,excludes=,removePrefix=,remoteDirectory=,remoteDirectorySDF=false,flatten=false,cleanRemote=false,noDefaultExcludes=false,makeEmptyDirs=false,patternSeparator=[, ]+,execCommand=y,execTimeout=120000,pseudoTty=false,agentForwarding=false]],useWorkspaceInPromotion=false,usePromotionTimestamp=false,retry=<null>,label=<null>,credentials=<null>]],continueOnError=false,failOnError=false,masterNodeName=<null>,alwaysPublishFromMaster=false,paramPublish=<null>]]
      java.lang.UnsupportedOperationException: no public field ‘publishers’ (or getter method) found in class jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin
      	at org.jenkinsci.plugins.structs.describable.DescribableParameter.getValue(DescribableParameter.java:161)
      	at org.jenkinsci.plugins.structs.describable.DescribableParameter.inspect(DescribableParameter.java:142)
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2(DescribableModel.java:555)
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2_(DescribableModel.java:646)
      	at org.jenkinsci.plugins.structs.describable.DescribableParameter.uncoerce(DescribableParameter.java:196)
      	at org.jenkinsci.plugins.structs.describable.DescribableParameter.inspect(DescribableParameter.java:142)
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2(DescribableModel.java:555)
      	at org.jenkinsci.plugins.structs.describable.DescribableModel.uninstantiate2_(DescribableModel.java:646)
      	at org.jenkinsci.plugins.workflow.steps.StepDescriptor.uninstantiate(StepDescriptor.java:246)
      	at org.jenkinsci.plugins.workflow.cps.Snippetizer.object2Groovy(Snippetizer.java:126)
      	at org.jenkinsci.plugins.workflow.cps.Snippetizer.step2Groovy(Snippetizer.java:79)
      	at org.jenkinsci.plugins.workflow.cps.Snippetizer.doGenerateSnippet(Snippetizer.java:500)
      	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: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 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.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:99)
      	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.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 winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Issue Links

            Activity

            phreakadelle Stephan Watermeyer created issue -
            phreakadelle Stephan Watermeyer made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-27963 [ JENKINS-27963 ]
            phreakadelle Stephan Watermeyer made changes -
            Attachment screencapture-swpsci06-8080-view-NORDICATM-job-nordicatm-deploy-swpsws28-feature-pipeline-syntax-1519386385301.png [ 41581 ]
            phreakadelle Stephan Watermeyer made changes -
            Attachment screencapture.png [ 41582 ]
            oleg_nenashev Oleg Nenashev made changes -
            Issue Type Task [ 3 ] Bug [ 1 ]
            Hide
            oleg_nenashev Oleg Nenashev added a comment -
            Show
            oleg_nenashev Oleg Nenashev added a comment - Due to whatever reason it constructs BapSshPublisherPlugin instead of https://github.com/jenkinsci/publish-over-ssh-plugin/blob/master/src/main/java/jenkins/plugins/publish_over_ssh/BapSshPublisher.java .
            Hide
            slide_o_mix Alex Earl added a comment -

            I'm adding an @Symbol on the correct descriptor as a way to get some semblance of pipeline support.

            Show
            slide_o_mix Alex Earl added a comment - I'm adding an @Symbol on the correct descriptor as a way to get some semblance of pipeline support.
            slide_o_mix Alex Earl made changes -
            Link This issue duplicates JENKINS-27963 [ JENKINS-27963 ]
            slide_o_mix Alex Earl made changes -
            Status Open [ 1 ] Closed [ 6 ]
            Resolution Duplicate [ 3 ]
            Hide
            phreakadelle Stephan Watermeyer added a comment -

            Hey Alex Earl: Where have you done this change? Would you mind to post a link to the Commit you've done?

            Show
            phreakadelle Stephan Watermeyer added a comment - Hey Alex Earl : Where have you done this change? Would you mind to post a link to the Commit you've done?
            Hide
            slide_o_mix Alex Earl added a comment -

            You can look at the linked issue https://issues.jenkins-ci.org/browse/JENKINS-27963 it has info on that.

            Show
            slide_o_mix Alex Earl added a comment - You can look at the linked issue https://issues.jenkins-ci.org/browse/JENKINS-27963 it has info on that.
            phreakadelle Stephan Watermeyer made changes -
            Attachment 2018-02-27_084410.jpg [ 41605 ]
            phreakadelle Stephan Watermeyer made changes -
            Comment [ First test was also successful here. Still have two entries in the DropDown List:
             !2018-02-27_084410.jpg|thumbnail!

            Further: Would it be possible to get the _configNamevalue _from a variable? Currently i need to hardcode this value in my pipeline...
            {code:java}
            sshPublisher(publishers: [sshPublisherDesc(configName: 'swpsci06', transfers: [sshTransfer(execCommand: '', execTimeout: 120000, sourceFiles: '')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)]){code}
            I would like to do something like. The variable "ReleaseNumber" is getting populate from my paramterized build.
            {code:java}
            #!/usr/bin/env groovy

            def call(Map params = [:]) {
            def serverHostname = "swpsws26"

            pipeline {
            agent any

            stages {
            stage('Download') {
            steps {
            sshPublisher(publishers: [sshPublisherDesc(configName: $serverHostname, transfers: [sshTransfer(execCommand: '''
            echo "INFO: Downloading $filename from $ReleaseNumber"
            echo "INFO: $serverHostname"
            ''', execTimeout: 120000, sourceFiles: '')], usePromotionTimestamp: false, useWorkspaceInPromotion: false, verbose: false)])
            }
            }
            }
            }
            }

            {code} ]

              People

              • Assignee:
                slide_o_mix Alex Earl
                Reporter:
                phreakadelle Stephan Watermeyer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: