-
Notifications
You must be signed in to change notification settings - Fork 323
Closed
Description
Sample code here:
https://github.com/kdvolder/cf-java-client-sample-v2/blob/caf97215689f12c8f0237ed81b6f2fc4d8b46e9a
This manifest seems to cause the issue:
To reproduce, run the main class here:
THe following error results:
Starting...
[main] WARN cloudfoundry-client.trust - Trusting SSL Certificate for api.local2.pcfdev.io:443
[main] DEBUG cloudfoundry-client.trust - Trusted SSL Certificate for api.local2.pcfdev.io:443
Using PASSWORD token for auth
[main] DEBUG cloudfoundry-client.operations - START Push Manifest
[main] DEBUG cloudfoundry-client.request - GET https://api.local2.pcfdev.io:443/v2/organizations?q=name:pcfdev-org&page=1
[cloudfoundry-client-nio-5] DEBUG cloudfoundry-client.token - Negotiating using token provider
[cloudfoundry-client-nio-5] DEBUG cloudfoundry-client.request - GET https://api.local2.pcfdev.io:443/v2/info
[cloudfoundry-client-nio-7] DEBUG cloudfoundry-client.response - 200 https://api.local2.pcfdev.io:443/v2/info (32 ms)
[cloudfoundry-client-nio-7] WARN cloudfoundry-client.trust - Trusting SSL Certificate for login.local2.pcfdev.io:443
[cloudfoundry-client-nio-7] DEBUG cloudfoundry-client.trust - Trusted SSL Certificate for login.local2.pcfdev.io:443
[cloudfoundry-client-nio-7] DEBUG cloudfoundry-client.request - POST https://login.local2.pcfdev.io:443/oauth/token
[cloudfoundry-client-nio-1] DEBUG cloudfoundry-client.response - 200 https://login.local2.pcfdev.io:443/oauth/token (239 ms)
[cloudfoundry-client-nio-1] DEBUG cloudfoundry-client.token - Refresh Token: 26259ae10974470c86abce0902fa63eb-r
[cloudfoundry-client-nio-1] DEBUG cloudfoundry-client.token - Access Token: eyJhbGciOiJSUzI1NiIsImtpZCI6ImtleS0xIiwidHlwIjoiSldUIn0.eyJqdGkiOiI5NzVhMTIyM2JiMDg0MDNkYTJhOTRjYzA0MmZkN2E5NiIsInN1YiI6IjI1MWIyNGI1LTZlYTQtNDc0Ny05MzAwLTEyNWQzZGI0ZDdhMCIsInNjb3BlIjpbIm9w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client-nio-1] DEBUG cloudfoundry-client.token - Access Token Expires At: 2017-06-15T23:57:42 UTC
[cloudfoundry-client-nio-5] DEBUG cloudfoundry-client.response - 200 https://api.local2.pcfdev.io:443/v2/organizations?q=name:pcfdev-org&page=1 (451 ms)
[cloudfoundry-client-nio-5] DEBUG cloudfoundry-client.request - GET https://api.local2.pcfdev.io:443/v2/spaces?q=name:pcfdev-space&q=organization_guid:532e5a31-2b96-4812-88ff-14fca73596ab&page=1
[cloudfoundry-client-nio-3] DEBUG cloudfoundry-client.response - 200 https://api.local2.pcfdev.io:443/v2/spaces?q=name:pcfdev-space&q=organization_guid:532e5a31-2b96-4812-88ff-14fca73596ab&page=1 (25 ms)
[cloudfoundry-client-nio-3] DEBUG cloudfoundry-client.request - GET https://api.local2.pcfdev.io:443/v2/spaces/984c86dc-533c-4fe2-be7c-3acf61cfd77e
[cloudfoundry-client-nio-5] DEBUG cloudfoundry-client.response - 200 https://api.local2.pcfdev.io:443/v2/spaces/984c86dc-533c-4fe2-be7c-3acf61cfd77e (28 ms)
[cloudfoundry-client-nio-5] DEBUG cloudfoundry-client.request - GET https://api.local2.pcfdev.io:443/v2/organizations/532e5a31-2b96-4812-88ff-14fca73596ab/private_domains?page=1
[cloudfoundry-client-nio-5] DEBUG cloudfoundry-client.request - GET https://api.local2.pcfdev.io:443/v2/shared_domains?page=1
[cloudfoundry-client-nio-7] DEBUG cloudfoundry-client.response - 200 https://api.local2.pcfdev.io:443/v2/organizations/532e5a31-2b96-4812-88ff-14fca73596ab/private_domains?page=1 (24 ms)
[cloudfoundry-client-nio-1] DEBUG cloudfoundry-client.response - 200 https://api.local2.pcfdev.io:443/v2/shared_domains?page=1 (59 ms)
[cloudfoundry-client-nio-1] DEBUG cloudfoundry-client.request - GET https://api.local2.pcfdev.io:443/v2/spaces/984c86dc-533c-4fe2-be7c-3acf61cfd77e/apps?q=name:test-static-aaasd&page=1
[elastic-2] DEBUG cloudfoundry-client.request - PUT https://api.local2.pcfdev.io:443/v2/resource_match
[cloudfoundry-client-nio-3] DEBUG cloudfoundry-client.response - 200 https://api.local2.pcfdev.io:443/v2/spaces/984c86dc-533c-4fe2-be7c-3acf61cfd77e/apps?q=name:test-static-aaasd&page=1 (44 ms)
[cloudfoundry-client-nio-5] DEBUG cloudfoundry-client.response - 200 https://api.local2.pcfdev.io:443/v2/resource_match (46 ms)
[cloudfoundry-client-nio-5] DEBUG cloudfoundry-client.resource-matching - 0 resources matched totaling 0 B
[cloudfoundry-client-nio-3] DEBUG cloudfoundry-client.request - PUT https://api.local2.pcfdev.io:443/v2/apps/0f5f21ac-319e-4445-ba3a-eb525e79fe5e
[cloudfoundry-client-nio-7] DEBUG cloudfoundry-client.response - 201 https://api.local2.pcfdev.io:443/v2/apps/0f5f21ac-319e-4445-ba3a-eb525e79fe5e (58 ms)
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at org.cloudfoundry.operations.applications.RouteUtils.decomposeRoute(RouteUtils.java:59)
at org.cloudfoundry.operations.applications.DefaultApplications.lambda$getPushRouteIdFromRoute$78(DefaultApplications.java:873)
at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:361)
at reactor.core.publisher.FluxIterable$IterableSubscription.slowPath(FluxIterable.java:174)
at reactor.core.publisher.FluxIterable$IterableSubscription.request(FluxIterable.java:144)
at reactor.core.publisher.FluxFlatMap$FlatMapMain.onSubscribe(FluxFlatMap.java:345)
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:89)
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:54)
at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:95)
at reactor.core.publisher.FluxFlatMap.subscribe(FluxFlatMap.java:95)
at reactor.core.publisher.FluxMergeSequential.subscribe(FluxMergeSequential.java:97)
at reactor.core.publisher.MonoIgnoreEmpty.subscribe(MonoIgnoreEmpty.java:36)
at reactor.core.publisher.MonoThenIgnore$ThenIgnoreMain.drain(MonoThenIgnore.java:165)
at reactor.core.publisher.MonoThenIgnore.subscribe(MonoThenIgnore.java:55)
at reactor.core.publisher.FluxFlatMap$FlatMapMain.onNext(FluxFlatMap.java:384)
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:962)
at reactor.core.publisher.MonoWhen$WhenCoordinator.signal(MonoWhen.java:249)
at reactor.core.publisher.MonoWhen$WhenInner.onNext(MonoWhen.java:308)
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:581)
at reactor.ipc.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:125)
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:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
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:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
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:1240)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1041)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:411)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
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:1334)
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:926)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:624)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:559)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:476)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
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.MonoDoFinally] :
reactor.core.publisher.Mono.checkpoint(Mono.java:1400)
org.cloudfoundry.operations.applications.DefaultApplications.pushManifest(DefaultApplications.java:390)
com.github.kdvolder.cfv2sample.CFV2SampleMain.pushAnApp(CFV2SampleMain.java:96)
com.github.kdvolder.cfv2sample.CFV2SampleMain.main(CFV2SampleMain.java:83)
Error has been observed by the following operator(s):
|_ Mono.checkpoint(DefaultApplications.java:390)
Suppressed: java.lang.Exception: #block terminated with an error
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:86)
at reactor.core.publisher.Mono.block(Mono.java:1301)
at com.github.kdvolder.cfv2sample.CFV2SampleMain.pushAnApp(CFV2SampleMain.java:96)
at com.github.kdvolder.cfv2sample.CFV2SampleMain.main(CFV2SampleMain.java:83)
[cloudfoundry-client-nio-7] DEBUG cloudfoundry-client.operations - FINISH Push Manifest (onError/919 ms)