Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Norman Maurer
    that said we already kind of work around this by using Unsafe ;)
    Enrico Olivelli
    Yep. Btw Netty is the 'the safest way to use Unsafe' :)
    Norman Maurer
    we try hard
    Mark Paluch
    I'm running into a NotSslRecordException when using TLS 1.2 or TLS 1.3. It works with TLS 1.1. I'm not sure whether this is a bug on my side or in netty. The issue is somewhat tricky to reproduce because it happens during Azure SQL Server SSL negotiation in the first receive phase.
    Norman Maurer
    hmm strange
    would it be possible to check with wireshark ?
    Mark Paluch
    I recorded the traffic via LoggingHandler. With SQL Server, SSL negotiation is prefixed with a 8-byte header. Currently on writing an issue. I'll attach the wireshark dump
    Norman Maurer
    @mp911de thanks… will try to have a look soon but I am traveling to Apple HQ today and will sit in meetings most of the next 10 days
    so not sure how long it will take me
    Mark Paluch
    No need to rush. Thanks a lot.
    Norman Maurer
    asked for a few more details in the issue :)
    Knut Schleßelmann
    Hi there. Currently we see tests running indefinitly on our jenkins (not on our local machines). I tried to debug this with the reactor channel and we broke it down to the threaddump containing a lot of
    "nioEventLoopGroup-3-2" #71 prio=10 os_prio=0 cpu=333.55ms elapsed=392.07s tid=0x00007fc3ee367800 nid=0x24b runnable  [0x00007fc3b5be3000]
       java.lang.Thread.State: RUNNABLE
            at sun.nio.ch.EPoll.wait(java.base@11.0.3/Native Method)
            at sun.nio.ch.EPollSelectorImpl.doSelect(java.base@11.0.3/EPollSelectorImpl.java:120)
            at sun.nio.ch.SelectorImpl.lockAndDoSelect(java.base@11.0.3/SelectorImpl.java:124)
            - locked <0x00000000e6f826b8> (a io.netty.channel.nio.SelectedSelectionKeySet)
            - locked <0x00000000e6f6b048> (a sun.nio.ch.EPollSelectorImpl)
            at sun.nio.ch.SelectorImpl.select(java.base@11.0.3/SelectorImpl.java:136)
            at io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
            at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:791)
            at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:439)
            at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:906)
            at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
            at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
            at java.lang.Thread.run(java.base@11.0.3/Thread.java:834)
       Locked ownable synchronizers:
            - None
    The test itself uses somefancy Spring/Spring Cloud features like
    @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
    @AutoConfigureWireMock(port = 0)
    internal class FeederClientTest(

    There's some business logic involved which is starting a parallel flux

        fun evaluateVariations(variations: Set<Variation>, rules: Set<Rule>): Flux<Variation> = Flux.fromIterable(variations)
                .flatMap { evaluateVariation(it, rules) }

    and if we remove the parallel part it's running fine on jenkins as well. Any ideas?

    The rest of our discussion can be seen in https://gitter.im/reactor/reactor
    Ewan Higgs
    Hi! If I cant connect to a host/port I get ConnectException. If I have a connection but the host goes away, is it still ConnectException or is there another exception type I should be looking for?
    Ewan Higgs
    oei im using reusing sockets for multiple requests so it's moot. whoopsie! :)
    Norman Maurer
    It’s most likely a IOException
    Hi , i am using netty as part of spring webflux application. We are facing an issue with netty, connectins are not getting closed with clients. when I do a ‘netstat’ , can see lot connections are there with established state. Same application tested with tomcat.. no connection issue there. Please help.
    @hepin1989 邮箱?
    Hi, anybody knows how to get access to the ChanelId in java 11?
    Maven says following:
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project server: Compilation failure
    [ERROR] /Application.java:[138,109] io.netty.channel.Channel.id() in package io.netty.channel is not accessible
    [ERROR]   (package io.netty.channel is declared in the unnamed module, but module io.netty.channel does not read it)

    Hi! I'm trying to use the tc-native library to dynamically load the FIPS compliant OpenSSL library inside Finagle. When I make the call to


    I'm getting an unsatisfied link error

    java.lang.UnsatisfiedLinkError: io.netty.internal.tcnative.NativeStaticallyReferencedJniMethods.sslOpCipherServerPreference()I
        at io.netty.internal.tcnative.NativeStaticallyReferencedJniMethods.sslOpCipherServerPreference(Native Method)
        at io.netty.internal.tcnative.SSL.<clinit>(SSL.java:67)

    I'm currently running on a MacBook but the ultimate location for this is Linux. Any help on where to look to solve this is appreciated.


    Hi, can anybody help me. I am trying to provide a custom Logging handler to print request and response details.

    public class CustomLogger extends LoggingHandler {
        public CustomLogger(Class<?> clazz) {
        protected String format(ChannelHandlerContext ctx, String event, Object arg) {
            if (arg instanceof ByteBuf) {
                ByteBuf msg = (ByteBuf) arg;
                return decode(msg, msg.readerIndex(), msg.readableBytes(), defaultCharset());
            return super.format(ctx, event, arg);
        private String decode(ByteBuf src, int readerIndex, int len, Charset charset) {
            if (len != 0) {
                byte[] array;
                int offset;
                if (src.hasArray()) {
                    array = src.array();
                    offset = src.arrayOffset() + readerIndex;
                } else {
                    array = allocateUninitializedArray(max(len, 1024));
                    offset = 0;
                    src.getBytes(readerIndex, array, 0, len);
                return new String(array, offset, len, charset);
            return "";

    But this does not print response content correctly

    response headers are printed correctly, but response body is printed like this
    what could be the reason?
    i am on netty 4.1.38
    Ferdinand Jacobs
    And channelinboundhandleadapter is what you're looking for I think
    @fjacobs i think for logging Netty suggests to use LoggingHandler
    and for more configuration, provide a custom implementation of this class
    thats what I did
    but it is printing these gibberish characters
    Ferdinand Jacobs


    I am trying to provide a custom Logging handler to print request and response details.

    The class description says: A ChannelHandler that logs all EVENTS using a logging framework.
    Do you understand which event are you trying to print and what format it has?
    I would just start with this simple HTTP client example to print the request: https://netty.io/4.1/xref/io/netty/example/http/snoop/package-summary.html
    Then read and understand how the pipeline works https://netty.io/4.1/api/io/netty/channel/ChannelPipeline.html
    Then make a new inbound handler for the client to print the response and put it in the pipeline after the decoder handler.
    You will understand the order of the handlers and when events are send, then you can implement the LoggingHandler.

    @fjacobs thanks for providing your inputs, but I am using reactor-netty and following other examples to solve my logging usecase. Mostly I want to capture WRITE and READ events. i have created a sample, let me post that in Reactor channel.
    Navaneet Agarwal

    Hi! I am seeing a behavior that is related to what is mentioned in this post - https://stackoverflow.com/questions/13330937/play-framework-netty-does-not-release-socket.

    Basically, the number of outbound tcp connections keep growing. The post says that this was resolved by switching to tomcat.
    Anyone aware of this issue? (I’m using Webflux with reactor-netty)


    Hello, everyone,
    I have developed a project that using ByteToMessageCodec to handle sticky and unpacking TCP/IP message. Although it works , but I am confused about how to Netty Framework to judge whether a ByteBuf should be dropped or accumulated.

    For example, in line 38 and 75, it should be accumulated to form a complete data, meanwhile, in line 46, it should be dropped, because it is a invalid package. I used the same way to code it "return". I think it should be coded differently.
    Thanks in advanced.

    I have read Netty source, in line 454 of ByteToMessageDecoder. It check whether ByteBuf is read, if oldInputLength equals in.readableBytes(), then ByteBuf will be discarded.
    Maybe my question is stupid. Sorry to bother you.
    Hi, we are getting timeouts in our integration tests written with Spring WebTestClient that leverages Netty when going from Netty version 4.1.42 to 4.1.43 on an "old" version of WSL. It seems to be related to the netty-transport-native-epoll artifact because downgrading that to 4.1.42 solves the issue. Does this sound familiar to anyone ?
    Martin Furmanski
    When a leak has been detected is the underlying buffer returned to the system? If not, why not?
    Christopher Kane

    Hi 👋
    I have been trying, without success, to create a HTTP/2 client with prior knowledge.
    My current working client does an upgrade using the following channel handler.

    new HttpClientUpgradeHandler(
            new Http2ClientUpgradeCodec(http2ConnectionHandler),

    I have tried alot of things, but my initial attempt still seems like it should work. The handler I have tried using is:

    new Http2ConnectionHandlerBuilder()

    I can see an outbound settings from on both server and client, and thats where the communication ceases.
    The server is fine as I have used curl to verify it.
    If anyone has any information that would thoughts as to what might be wrong I am all ears. Thanks in advance.

    Omid Dehghan
    Is there any book about Netty other than "Netty in Action" ?
    Omid Dehghan
    Just to make it clear, any good resource will do.