"java.net.BindException: Address already in use: bind" exception while running the REST application
book
Article ID: KB0079132
calendar_today
Updated On:
Products
Versions
TIBCO ActiveMatrix BusinessWorks
6.x
Description
While running the REST application, if you get following error: ----------- SwaggerHostingConfigurationConsumer - Error in starting Swagger documentation server java.net.BindException: Address already in use: bind -----------
Issue/Introduction
"java.net.BindException: Address already in use: bind" exception while running the REST application
Environment
All
Resolution
The default REST Doc port is 7777. To get rid of this error, you need to check if the port is already in use by executing netstat command. To get rid of this error, you need to change " bw.rest.docApi.port" :
1)If there are multiple REST applications running on separate AppNodes on the same single machine,then you need to change the bw.rest.docApi.port=7778 in the config.ini file of the appnode .
2)If you are running the REST application in BusinessStudio then you need to configure -Dbw.rest.docApi.port=7778 property in VM arguments.(Run->Run/debug configutaion->Arguments->VM arguments)