Skip to content

Netty unable to start (timeout) #9741

Closed
@danielfernandez

Description

@danielfernandez

None of my WebFlux-based projects using Spring Boot 2.0.0.BUILD-SNAPSHOT is able to start. When executing mvn -U clean compile spring-boot:run I'm always getting:

[WARNING]
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:499)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start Netty
	at org.springframework.boot.web.embedded.netty.NettyWebServer.start(NettyWebServer.java:65)
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.startReactiveWebServer(ReactiveWebServerApplicationContext.java:139)
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.finishRefresh(ReactiveWebServerApplicationContext.java:72)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552)
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:49)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233)
	at com.example.demo.DemoApplication.main(DemoApplication.java:10)
	... 6 more
Caused by: reactor.core.Exceptions$ReactiveException: java.util.concurrent.TimeoutException: HttpServer couldn't be started within 3000ms
	at reactor.core.Exceptions.propagate(Exceptions.java:240)
	at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:87)
	at reactor.core.publisher.Mono.block(Mono.java:1296)
	at reactor.ipc.netty.tcp.BlockingNettyContext.<init>(BlockingNettyContext.java:55)
	at reactor.ipc.netty.tcp.BlockingNettyContext.<init>(BlockingNettyContext.java:45)
	at reactor.ipc.netty.NettyConnector.start(NettyConnector.java:53)
	at org.springframework.boot.web.embedded.netty.NettyWebServer.start(NettyWebServer.java:59)
	... 16 more
	Suppressed: java.lang.Exception: #block terminated with an error
		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:88)
		... 21 more
Caused by: java.util.concurrent.TimeoutException: HttpServer couldn't be started within 3000ms
	at reactor.ipc.netty.tcp.BlockingNettyContext.<init>(BlockingNettyContext.java:53)
	... 19 more

Environment

This happens on (at least) macOS Sierra:

➜  demo mvn -version
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T21:39:06+02:00)
Maven home: /usr/local/Cellar/maven/3.5.0/libexec
Java version: 1.8.0_66, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.5", arch: "x86_64", family: "mac"

How to replicate

Simply go to http://start.spring.io, create an application with Reactive Web using Spring Boot 2.0.0.BUILD-SNAPSHOT. Try to start it and the above exception appears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions