spring-cloud-netflix icon indicating copy to clipboard operation
spring-cloud-netflix copied to clipboard

Turbine Stream RxNetty Server is clashing Tomcat's port

Open john-eevee opened this issue 10 years ago • 4 comments

Using Brixton.BUILD-SNAPSHOT as the day of this writing with tubine-stream dependency and @EnableTurbineStream the application starts but reports the Tomcat port is assigned to -1, some lines up we can see this log

2015-12-26 15:17:40.560 INFO 9160 --- [ restartedMain] i.reactivex.netty.server.AbstractServer : Rx server started at port: 8043

The assigined port 8043 is the port setted on server.port properties, which must be used only by configuring the 'normal' http server (e.g. Tomcat, Undertow, Jetty)

At TurbineStreamProperties we can see the issue, where server.port get precendence. Should we use TurbineStream with Tomcat ? Or this is really a misleading configuration property to use ?

john-eevee avatar Dec 26 '15 17:12 john-eevee

I'm also getting the same issue with Brixton.M4 and tubine-stream It is not able to register with eureka and it remains in STARTING state.

Please tell us is this the actual behavior, or we are missing something

dinkarthakur avatar Jan 06 '16 12:01 dinkarthakur

By now setting the property turbine.stream.port to another port than server.port works for the issue about tomcat's port

I just think it's bad to fall back to server.port when the turbine property is not set.

john-eevee avatar Jan 12 '16 21:01 john-eevee

thanks that solve the problem, i have another question regarding the turbine stream if i add

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-netflix-hystrix-stream</artifactId>
</dependency>

to the zuul then in eureka dash board is show two instances and one remains always in STARTING state

dinkarthakur avatar Jan 13 '16 10:01 dinkarthakur

I just think it's bad to fall back to server.port when the turbine property is not set.

Seems reasonable to me because there might not be a Tomcat (certainly the user has to choose to add it). If you want to change the default behaviour feel free to send a PR, but please don't change the fact that we fall back to server.port if nothing else is using it.

dsyer avatar Jan 14 '16 10:01 dsyer