spring-cloud / spring-cloud/spring-cloud-gateway

Warning - java.lang.IllegalStateException: channel not registered to an event loop After upgrade to v4.2.0

Open
#3,697 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feedback-provided
Dominant language
Java
Stars
4.9k
Forks
3.5k
Avg merge
20h 57m
Merged PRs (30d)
8

Description

Description
Recently, I upgrade my SpringCloudGateway service from v4.1.5 to v4.2.0. Also upgraded SpringBoot from v3.3.5 to v3.4.2. Whenever I do deployment my service generates warning

{"timestamp":"2025-02-08T10:37:22.014Z","source":"io.netty.util.concurrent.AbstractEventExecutor","thread":"reactor-http-epoll24", "level":"WARN",
"stack_trace":"java.lang.IllegalStateException: channel not registered to an event loop
	at io.netty.channel.AbstractChannel.eventLoop(AbstractChannel.java:163)
	at io.netty.channel.AbstractChannelHandlerContext.executor(AbstractChannelHandlerContext.java:132)
	at io.netty.channel.AbstractChannelHandlerContext.newPromise(AbstractChannelHandlerContext.java:1011)
	at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:560)
	at io.netty.channel.DefaultChannelPipeline.close(DefaultChannelPipeline.java:906)
	at io.netty.channel.AbstractChannel.close(AbstractChannel.java:243)
	at reactor.netty.http.client.HttpClientOperations.onInboundCancel(HttpClientOperations.java:320)
	at reactor.netty.channel.FluxReceive.disposeAndUnsubscribeReceiver(FluxReceive.java:490)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:405)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Unknown Source)",
"message":"A task raised an exception. Task:reactor.netty.channel.FluxReceive$$Lambda/0x00000001005b9c80@77ca8cc7"}

Upgrade Detail

  • spring_boot_version= from 3.3.4 to 3.4.2
  • spring_cloud_gateway_version= from 4.1.5 to 4.2.0
  • spring_dependency_management_version=from 1.1.6 to 1.1.7
  • spring_cloud_dependency_version=from 2023.0.3 to 2024.0.0

Other Details

  • Using Java 21 (azuljre:21.34.19-alpine-3.20)
  • Jib for building Image
  • K8s

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported stack trace through reactor.netty.channel.FluxReceive, reactor.netty.http.client.HttpClientOperations, and io.netty.channel.AbstractChannel, comparing behavior across the listed Spring Boot and Spring Cloud Gateway upgrades. Reproduce deployment with Java 21 and the reported environment, then verify that the warning no longer occurs and document the triggering request or shutdown path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.