alh84001
alh84001

Reputation: 1283

Tomcat from WTP ignoring assigned port

I have a Tomcat launch configuration to which I assigned a Tomcat server that is configured to use ports 8006, 8010 and 8081. I have another server running on ports 8005, 8009 and 8080. When I try to start the launch configuration I get an error

SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:8080

I checked the server.xml in <workspace>/servers and <metadata>/.plugins/org.eclipse.wst.server.core/tmp1/conf directories and both have the following statements:

<Connector connectionTimeout="20000" port="8081" protocol="HTTP/1.1" redirectPort="8443"/>
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
           port="8080" protocol="HTTP/1.1" 
           connectionTimeout="20000" 
           redirectPort="8443" />
-->

Can anyone shed some light on this? Version of eclipse is Indigo, and version of Tomcat is 6.

Upvotes: 0

Views: 545

Answers (2)

e-zinc
e-zinc

Reputation: 4581

You have to Publish new Tomcat configuration.
WTP FAQ:
What does Publish do for Tomcat servers in the Servers view?

Publish updates the server instance with any server configuration changes, changes related to projects added or removed from the server, and content changes in projects already added to the server. This includes copying the server configuration files found under the associated subfolder of the Servers project to the server's instance location. In the case of server.xml, "adjustments" may be made to the file by WTP during the copy. For an example of an "adjustment", see this question.

Note the configuration files under the subfolders in the Servers project are not used directly by running servers. The running server uses copies of these files. This implies that any manual changes made to the copy will be overwritten the next time the server is published.

Upvotes: 0

Bozho
Bozho

Reputation: 597114

If you are setting the ports from within Eclipse (double-click the server, edit "ports"), and then hit "save", everything should be OK.

Upvotes: 1

Related Questions