Deploying Rest Route on ESB-SE Runtime Error "Could not start Jetty server on port 8,040: Address already in use: bind"

Six Stars

Deploying Rest Route on ESB-SE Runtime Error "Could not start Jetty server on port 8,040: Address already in use: bind"

I'm trying to deploy a REST based route, and I'm getting the error

 

 "Could not start Jetty server on port 8,040: Address already in use: bind"

 

The endpoint is defined as "http://127.0.0.1:8040/status" which is the same port being used by Jetty for the ActiveMQ web client etc.

 

If I change the rest end point to port 8041 it works fine.

 

If I deploy multiple rest based routes, do they need to have their own port for each route, or can they share a port, using the identifier after the / to differentiate? If they can share, how do they need to be deployed so they don't give a bind error?

 

Six Stars

Re: Deploying Rest Route on ESB-SE Runtime Error "Could not start Jetty server on port 8,040: Address already in use: bind"

Port numbers should not have a comma

Use a port number once

Six Stars

Re: Deploying Rest Route on ESB-SE Runtime Error "Could not start Jetty server on port 8,040: Address already in use: bind"

Also  make sure port 8040 is not used by any other application  ie skype

Six Stars

Re: Deploying Rest Route on ESB-SE Runtime Error "Could not start Jetty server on port 8,040: Address already in use: bind"

Hi! Thanks for this, but it doesn't answer my key question.

 

If I have numerous routes that provide a REST service, can I have different endpoints in each route, but using the same Jetty instance, and the same port...

 

So for example, I want to be able to have

 

http://localhost:8041/routeA

with a number of commands beneath it, and then a separate route, sharing the Jetty instance

http://localhost:8041/routeB

also with a number of commands beneath it.

Are you really saying that if I deploy multiple routes with rest services they each have to have their own Jetty instance and port?

Six Stars

Re: Deploying Rest Route on ESB-SE Runtime Error "Could not start Jetty server on port 8,040: Address already in use: bind"

I know from coding when you declare the jetty instance it is declared as new(port#)

this will cause it to clash

others may have other ideas.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download