GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 0000000401 · Issue #772 · clj-commons/aleph

io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 0000000401 #772

New issue
Copy link
New issue
Copy link
Open
Open
io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 0000000401#772
Copy link

Description

@DerGuteMoritz
DerGuteMoritz
opened on Jan 5, 2026
Issue body actions

Occasionally, aleph.http-test/test-bulk-requests runs into the following error:

845613 tid=49 ERROR common - Exception in channel (conn-ex-handler).
io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 0000000401
	at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:107)
	at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:351)
	at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:245)
	at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:451)
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1519)
	at io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1390)
	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1430)
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:796)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:732)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:658)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at manifold.executor$thread_factory$reify__12504$f__12505.invoke(executor.clj:71)
	at clojure.lang.AFn.run(AFn.java:22)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:750)

The previous line logged for tid=49 was this, indicating that it's the client who ran into the error and thus the server is at fault for sending the invalid response:

845610 tid=49 DEBUG aleph-client - [id: 0x6f360c1c, L:/127.0.0.1:44312 - R:localhost/127.0.0.1:8082](H2 - 3) FLUSH

The first 5 bytes cited in the error message (0000000401) indicate a SETTINGS frame but with the ACK bit set which Netty explicitly rejects as it's in violation of the protocol.

Activity

  1. DerGuteMoritz
    added a commit that references this issue on Jan 15, 2026

    Revert "Don't leak error deferreds in HTTP client on error status exc…

    bf8d098
  2. DerGuteMoritz commented on Jan 15, 2026

    @DerGuteMoritz
    DerGuteMoritz
    on Jan 15, 2026
    CollaboratorAuthor
    More actions

    Turns out this doesn't only happen for test-bulk-requests and not only on #767 (which the failed job linked in the description belongs to). Here is an example of the same error occurring on master (without #767 merged, yet). For posterity:

    ERROR in (test-explicit-url) (client.clj:522)
    - http2
    expected: (= "hello" (-> (clojure.core/deref (http/request {:method :get, :scheme (if *use-tls-requests* :https :http), :server-name "localhost", :server-port port, :request-timeout 1000.0, :pool *pool*})) :body bs/to-string))
    75100 tid=4719 WARN DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
    io.netty.handler.codec.http2.Http2Exception: First received frame was not SETTINGS. Hex dump for first 5 bytes: 0000000401
            at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:107)
            at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:351)
            at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:245)
            at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:451)
            at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:545)
            at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:484)
            at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
            at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
            at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1519)
            at io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1390)
            at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1430)
            at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:545)
            at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:484)
            at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
            at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
            at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357)
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
            at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868)
            at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
            at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:796)
            at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:732)
            at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:658)
            at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
            at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998)
            at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
            at manifold.executor$thread_factory$reify__767$f__768.invoke(executor.clj:71)
            at clojure.lang.AFn.run(AFn.java:22)
            at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
            at java.lang.Thread.run(Thread.java:750)
    
  3. DerGuteMoritz
    added 2 commits that reference this issue on Jan 16, 2026

    Only run tests with dropped deferred detection on manual trigger

    0967512

    Only run tests with dropped deferred detection on manual trigger

    56d13a4
  4. DerGuteMoritz commented on Jan 16, 2026

    @DerGuteMoritz
    DerGuteMoritz
    on Jan 16, 2026
    CollaboratorAuthor
    More actions

    Filed an issue with Netty since this phase of the protocol is completely implemented there.

  5. DerGuteMoritz
    added 2 commits that reference this issue on Jan 20, 2026

    Only run tests with dropped deferred detection on manual trigger

    646fe13

    Only run tests with dropped deferred detection on manual trigger

    babcac1
  6. DerGuteMoritz commented on May 6, 2026

    @DerGuteMoritz
    DerGuteMoritz
    on May 6, 2026
    CollaboratorAuthor
    More actions

    Netty 4.1.133.Final includes a patch which might fix this. This version was pulled in with #783 (and released with Aleph 0.9.8). Optimistically closing the issue. If it happens again even with this version, we can re-open it.

    Reacted by Robin
  7. DerGuteMoritz
    closed this as completedon May 6, 2026
  8. DerGuteMoritz commented on Jun 5, 2026

    @DerGuteMoritz
    DerGuteMoritz
    on Jun 5, 2026
    CollaboratorAuthor
    More actions

    Unfortunately, it's still happening. This time, it was on the PR to update Netty to 4.1.135.Final, so it could also be a regression.

    217560 tid=2542 WARN DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
    io.netty.handler.codec.http2.Http2Exception: First received frame was SETTINGS frame but had ACK flag set. Hex dump for first 5 bytes: 0000000401
            at io.netty.handler.codec.http2.Http2Exception.connectionError(Http2Exception.java:107)
            at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.verifyFirstFrameIsSettings(Http2ConnectionHandler.java:363)
            at io.netty.handler.codec.http2.Http2ConnectionHandler$PrefaceDecoder.decode(Http2ConnectionHandler.java:255)
            at io.netty.handler.codec.http2.Http2ConnectionHandler.decode(Http2ConnectionHandler.java:473)
            at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:545)
            at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:484)
            at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
            at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
            at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1519)
            at io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1390)
            at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1430)
            at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:545)
            at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:484)
            at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
            at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
            at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357)
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
            at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868)
            at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:171)
            at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:796)
            at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:732)
            at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:658)
            at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
            at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998)
            at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
            at manifold.executor$thread_factory$reify__767$f__768.invoke(executor.clj:71)
            at clojure.lang.AFn.run(AFn.java:22)
            at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
            at java.lang.Thread.run(Thread.java:750)
    
    lein test :only aleph.http-test/test-listen-socket
    
    ERROR in (test-listen-socket) (client.clj:522)
    with nio transport and a bound server-socket channel - known to the server - http2
    expected: (= 200 (:status (clojure.core/deref (http-get "/string"))))
      actual: clojure.lang.ExceptionInfo: connection was closed after 0.024 seconds
    {:request {:path "/string", :user-info nil, :pool-timeout 10000.0, :pool #object[io.aleph.dirigiste.Pool 0x64110f88 "io.aleph.dirigiste.Pool@64110f88"], :throw-exceptions? false, :request-url "https://localhost:8082/string", :server-port 8082, :request-timeout 10000.0, :uri "/string", :server-name "localhost", :query-string nil, :scheme :https, :request-method :get}}
     at aleph.http.client$rsp_handler$handle_response__7274.invoke (client.clj:522)
        manifold.deferred$eval2013$chain_SINGLEQUOTE____2034.invoke (deferred.clj:893)
        manifold.deferred$eval2013$subscribe__2014$fn__2019.invoke (deferred.clj:859)
        manifold.deferred.Listener.onSuccess (deferred.clj:352)
        manifold.deferred.Deferred/fn (deferred.clj:533)
        manifold.deferred.Deferred.success (deferred.clj:533)
        manifold.deferred$success_BANG_.invokeStatic (deferred.clj:376)
        manifold.deferred$success_BANG_.invoke (deferred.clj:373)
        aleph.http.http2$client_handler$reify__6899.channelInactive (http2.clj:1151)
        io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive (AbstractChannelHandlerContext.java:305)
        io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive (AbstractChannelHandlerContext.java:281)
        io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive (AbstractChannelHandlerContext.java:274)
        io.netty.handler.stream.ChunkedWriteHandler.channelInactive (ChunkedWriteHandler.java:152)
        io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive (AbstractChannelHandlerContext.java:303)
        io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive (AbstractChannelHandlerContext.java:281)
        io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive (AbstractChannelHandlerContext.java:274)
        io.netty.handler.logging.LoggingHandler.channelInactive (LoggingHandler.java:206)
        io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive (AbstractChannelHandlerContext.java:303)
        io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive (AbstractChannelHandlerContext.java:281)
        io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive (AbstractChannelHandlerContext.java:274)
        io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive (DefaultChannelPipeline.java:1352)
        io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive (AbstractChannelHandlerContext.java:301)
        io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive (AbstractChannelHandlerContext.java:281)
        io.netty.channel.DefaultChannelPipeline.fireChannelInactive (DefaultChannelPipeline.java:850)
        io.netty.handler.codec.http2.AbstractHttp2StreamChannel$Http2ChannelUnsafe$2.run (AbstractHttp2StreamChannel.java:809)
        io.netty.util.concurrent.AbstractEventExecutor.runTask (AbstractEventExecutor.java:173)
        io.netty.util.concurrent.AbstractEventExecutor.safeExecute (AbstractEventExecutor.java:166)
        io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks (SingleThreadEventExecutor.java:472)
        io.netty.channel.nio.NioEventLoop.run (NioEventLoop.java:566)
        io.netty.util.concurrent.SingleThreadEventExecutor$4.run (SingleThreadEventExecutor.java:998)
        io.netty.util.internal.ThreadExecutorMap$2.run (ThreadExecutorMap.java:74)
        manifold.executor$thread_factory$reify__767$f__768.invoke (executor.clj:71)
        clojure.lang.AFn.run (AFn.java:22)
        io.netty.util.concurrent.FastThreadLocalRunnable.run (FastThreadLocalRunnable.java:30)
        java.lang.Thread.run (Thread.java:750)
    
  9. DerGuteMoritz
    reopened this on Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.