jenkinsci / publish-over-ssh-plugin

https://plugins.jenkins.io/publish-over-ssh/
113 stars 151 forks source link

Remote call on EC2 failed #309

Open pat1shea opened 1 year ago

pat1shea commented 1 year ago

Jenkins and plugins versions report

AWS EC2 cloud remote instrance ```text Using Jenkins in a master/slave configuration on EC2 ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Trying to copy artifacts using ssh from the EC2 remote instance to a target server

pipeline code:

sshPublisher( continueOnError: false, failOnError: true, publishers: [ sshPublisherDesc( configName: "blc_qa_server_name", transfers: [sshTransfer( sourceFiles: 'dist/mgps/tmp/dist/*.tar.gz', removePrefix: 'dist/mgps/tmp/dist',
remoteDirectory: 'mgps' )], verbose: true ) ] )

Reproduction steps

Trying to copy artifacts using ssh from the EC2 remote instance to a target server

pipeline code:

sshPublisher( continueOnError: false, failOnError: true, publishers: [ sshPublisherDesc( configName: "blc_qa_server_name", transfers: [sshTransfer( sourceFiles: 'dist/mgps/tmp/dist/*.tar.gz', removePrefix: 'dist/mgps/tmp/dist',
remoteDirectory: 'mgps' )], verbose: true ) ] )

Expected Results

Files should be copied to the remote host

Actual Results

An exception was caught when invoking perform Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to EC2 (ec2-JENKINS SLAVES) - JENKINS SLAVE (i-0501d69e1e759b439) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356) at hudson.remoting.Channel.call(Channel.java:1000) at hudson.FilePath.act(FilePath.java:1192) at hudson.FilePath.act(FilePath.java:1181) at jenkins.plugins.publish_over.BPInstanceConfig.perform(BPInstanceConfig.java:141) at jenkins.plugins.publish_over.BPPlugin.perform(BPPlugin.java:126) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) java.lang.UnsatisfiedLinkError: no net in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib] at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2673) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830) at java.base/java.lang.System.loadLibrary(System.java:1873) at java.base/java.net.InetAddress$1.run(InetAddress.java:323) at java.base/java.net.InetAddress$1.run(InetAddress.java:321) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.net.InetAddress.(InetAddress.java:320) at jenkins.plugins.publish_over.BPCallablePublisher.printHostName(BPCallablePublisher.java:76) at jenkins.plugins.publish_over.BPCallablePublisher.invoke(BPCallablePublisher.java:64) at jenkins.plugins.publish_over.BPCallablePublisher.invoke(BPCallablePublisher.java:38) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3578) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:377) at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused: java.io.IOException: Remote call on EC2 (ec2-JENKINS SLAVES) - JENKINS SLAVE (i-0501d69e1e759b439) failed at hudson.remoting.Channel.call(Channel.java:1004) at hudson.FilePath.act(FilePath.java:1192) at hudson.FilePath.act(FilePath.java:1181) at jenkins.plugins.publish_over.BPInstanceConfig.perform(BPInstanceConfig.java:141) at jenkins.plugins.publish_over.BPPlugin.perform(BPPlugin.java:126) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)

Anything else?

The remote build works fine (maven/ant/java) but this error comes up after the build "archiveArtifacts" task. This used to work, at least we think, we were able to run this successfully for a while before this came up.

As a test we re-installed the plugin and it worked for a day or so before the same error comes up.

Also, doing the same from the master jenkins node works as expected.