question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NPE in HttpSessionHandler.channelInactive with JRE11

See original GitHub issue

The following issue is reproduced on latest armeria (0.90.x) with openjdk 11.0.2 when the remote server requires a downgrade from HTTP2 to H1C :

java.lang.NullPointerException: remoteAddress
	at io.netty.util.internal.ObjectUtil.checkNotNull(ObjectUtil.java:33)
	at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:141)
	at com.linecorp.armeria.client.HttpChannelPool.connect(HttpChannelPool.java:347)
	at com.linecorp.armeria.client.HttpSessionHandler.channelInactive(HttpSessionHandler.java:306)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:257)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:243)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:236)
	at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:393)
	at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:358)
	at io.netty.handler.codec.http2.Http2ConnectionHandler.channelInactive(Http2ConnectionHandler.java:415)

It appears that the Channel’s remoteAddress is not set. (requestedRemoteAddress is set though)

This cannot be reproduced e.g. with oracle 10.0.2 where remoteAddress = requestedRemoteAddress

It could be an issue with netty (interop with recent openJDKs) or with the way Armeria uses Netty.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
trustincommented, Aug 21, 2019

@minwoox @ikhoon I’m not using OS X, so could you guys take a look into this?

0reactions
minwooxcommented, Sep 3, 2019

Thanks for checking it @delegacy!

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found