-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins 2.101, Cloud Foundry Plugin 2.2.0
We get a FileNotFoundException when using the cloud foundry plugin on a distributed system. We are building an angular application on a slave, so the plugin copies the output to jenkins master. It seems that the plugin mixes up the directories while copying.
It copies the zip from the build slave path "/home/.../things-ui.zip" to jenkins master path "/tmp/appDir2295439221665907722" and then tries to read /tmp/appDir2295439221665907722/things-ui.zip/things-ui.zip.
Plugin configuration:
steps { sh 'zip -r things-ui.zip dist/*' pushToCloudFoundry( target: '', organization: '', cloudSpace: '', credentialsId: '', manifestChoice: [ value : 'jenkinsConfig', appName : 'things-ui-dev', memory : 64, disk_quota: 64, instances : 2, appPath : 'things-ui.zip', buildpack : 'https://github.com/cloudfoundry/staticfile-buildpack.git' ] ) }
Stacktrace:
[Pipeline] pushToCloudFoundry Cloud Foundry Plugin: INFO: Looks like we are on a distributed system... Transferring build artifacts from the slave to the master. INFO: Transferring from /home/.../things-ui.zip to /tmp/appDir2295439221665907722 java.io.FileNotFoundException: /tmp/appDir2295439221665907722/things-ui.zip/things-ui.zip (Not a directory) at java.io.RandomAccessFile.open0(Native Method) at java.io.RandomAccessFile.open(RandomAccessFile.java:316) at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243) at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:213) at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:192) at org.apache.commons.compress.archivers.zip.ZipFile.<init>(ZipFile.java:153) at org.cloudfoundry.util.ResourceMatchingUtils.getArtifactMetadataFromZip(ResourceMatchingUtils.java:80) at org.cloudfoundry.util.ResourceMatchingUtils.getMatchedResources(ResourceMatchingUtils.java:52) at org.cloudfoundry.operations.applications.DefaultApplications.lambda$pushApplication$97(DefaultApplications.java:1055) at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:361) at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67) at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:962) at reactor.core.publisher.MonoThenMap$ThenMapMain$ThenMapInner.onNext(MonoThenMap.java:237) at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:115) at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:115) at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onNext(FluxOnAssembly.java:373) at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:173) at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:76) at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:108) at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:235) at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:108) at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:108) at reactor.ipc.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:207) at reactor.ipc.netty.channel.FluxReceive.onInboundNext(FluxReceive.java:322) at reactor.ipc.netty.channel.ChannelOperations.onInboundNext(ChannelOperations.java:316) at reactor.ipc.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:583) at reactor.ipc.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:129) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at reactor.ipc.netty.http.HttpOperations.lambda$static$3(HttpOperations.java:261) at reactor.ipc.netty.ReactorNetty$ExtractorHandler.channelRead(ReactorNetty.java:328) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1336) at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1127) at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1162) at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489) at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.handler.proxy.ProxyHandler.channelRead(ProxyHandler.java:255) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438) at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:255) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at java.lang.Thread.run(Thread.java:748) Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Assembly trace from producer [reactor.core.publisher.MonoIgnoreEmpty] : reactor.core.publisher.Mono.checkpoint(Mono.java:1400) org.cloudfoundry.operations.applications.DefaultApplications.pushManifest(DefaultApplications.java:392) com.hpe.cloudfoundryjenkins.CloudFoundryPushTask.perform(CloudFoundryPushTask.java:168) com.hpe.cloudfoundryjenkins.CloudFoundryPushBuilder.perform(CloudFoundryPushBuilder.java:172) org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49) hudson.security.ACL.impersonate(ACL.java:274) org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46) java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) java.util.concurrent.FutureTask.run(FutureTask.java:266) Error has been observed by the following operator(s): |_ Mono.checkpoint(DefaultApplications.java:392)