spring-projects / spring-boot

Spring Boot
https://spring.io/projects/spring-boot
Apache License 2.0
74.59k stars 40.55k forks source link

Tomcat IOException: Duplicate accept detected. This is a known OS bug. Please consider reporting that you are affected: #29609

Closed elmodeer closed 2 years ago

elmodeer commented 2 years ago

Version

spring boot v2.6.2 and spring cloud v2021.0.0

Environment Linux alpine image on a pod. JDK 11

Problem I get this exception on some of my services and I want to know what is this and how harmful it is ?

23:27:45.148 [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port(s): 8080 (https) with context path ''
  | 23:27:47.046 [main] INFO  o.a.c.i.engine.AbstractCamelContext - Routes startup (total:1 started:1)
  | 23:27:47.048 [main] INFO  o.a.c.i.engine.AbstractCamelContext -     Started route1 (jms://queue:inp.contentextractor.entry)
  | 23:27:47.049 [main] INFO  o.a.c.i.engine.AbstractCamelContext - Apache Camel 3.14.0 (camel-1) started in 2s228ms (build:622ms init:1s32ms start:574ms)
  | 23:27:47.061 [main] INFO  eu.hermes.esb.cloud.Application - Started Application in 25.305 seconds (JVM running for 27.737)
  | 23:28:20.356 [https-jsse-nio-8080-exec-4] INFO  o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
  | 23:28:20.357 [https-jsse-nio-8080-exec-4] INFO  o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
  | 23:28:20.359 [https-jsse-nio-8080-exec-4] INFO  o.s.web.servlet.DispatcherServlet - Completed initialization in 2 ms
  | 00:05:19.986 [https-jsse-nio-8080-Acceptor] ERROR org.apache.tomcat.util.net.Acceptor - Socket accept failed
  | java.io.IOException: Duplicate accept detected. This is a known OS bug. Please consider reporting that you are affected: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1924298
  | at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:545)
  | at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:78)
  | at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:129)
  | at java.base/java.lang.Thread.run(Thread.java:834)
  | 05:20:49.981 [https-jsse-nio-8080-Acceptor] ERROR org.apache.tomcat.util.net.Acceptor - Socket accept failed
  | java.io.IOException: Duplicate accept detected. This is a known OS bug. Please consider reporting that you are affected: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1924298
  | at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:545)
  | at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:78)
  | at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:129)
  | at java.base/java.lang.Thread.run(Thread.java:834)
snicoll commented 2 years ago

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

bclozel commented 2 years ago

See https://github.com/spring-projects/spring-framework/issues/26434#issuecomment-1003713436