Skip to content

io.netty.handler.codec.DecoderException: io.netty.util.IllegalReferenceCountException: refCnt: 0 #738

@jonbuck16

Description

@jonbuck16

Hi,

I am getting the following exception when trying to push an application into my local pcfdev instance.. The same project and application works when using version 1.1.3 of the java client..

Any ideas? can't find any reference to this exception on the internet...

Push Code...

Path applicationFilePath = Paths.get(applicationFile.toURI());

 PushApplicationRequest request = PushApplicationRequest.builder()
                    .application(applicationFilePath)
                    .buildpack(getBuildpackValue(manifest))
                    .command(getCommandValue(manifest))
                    .diskQuota(getDiskQuotaValue(manifest))
                    .host(alias.asFull())
                    .instances(getApplicationInstances(manifest))
                    .memory(getMemoryValue(manifest))
                    .name(alias.fullName())
                    .noStart(true)
                    .stack(getStackValue(manifest))
                    .stagingTimeout(Duration.ofMinutes(5))
                    .startupTimeout(Duration.ofMinutes(5))
                    .build();

            operations.applications().push(request).doOnSuccess(aVoid -> log.INFO("Application pushed")).block(Duration.ofMillis(300000));

Stack Trace...

io.netty.handler.codec.DecoderException: io.netty.util.IllegalReferenceCountException: refCnt: 0
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:442)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	at java.lang.Thread.run(Thread.java:745)

Caused by: io.netty.util.IllegalReferenceCountException: refCnt: 0
	at io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1401)
	at io.netty.buffer.AbstractByteBuf.checkIndex(AbstractByteBuf.java:1347)
	at io.netty.buffer.CompositeByteBuf.nioBuffers(CompositeByteBuf.java:1482)
	at io.netty.buffer.AbstractUnpooledSlicedByteBuf.nioBuffers(AbstractUnpooledSlicedByteBuf.java:458)
	at io.netty.buffer.CompositeByteBuf.nioBuffers(CompositeByteBuf.java:1501)
	at io.netty.buffer.CompositeByteBuf.nioBuffers(CompositeByteBuf.java:1921)
	at io.netty.handler.ssl.SslHandler.wrap(SslHandler.java:816)
	at io.netty.handler.ssl.SslHandler.wrap(SslHandler.java:659)
	at io.netty.handler.ssl.SslHandler.wrapAndFlush(SslHandler.java:631)
	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1044)
	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:363)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:565)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:479)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	... 1 more

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions