Dec 21st, 2011, 10:29 AM
Port already in use: 6969
I am trying to run two tc Server instances on a single machine.
I use the tcruntime-instance.sh script (provided by vFabric) to create the instances. During the creation of the second instance I pass the parameter -p bio.http.port=8081 to change the http listening port which works fine:
Port: 8081 Type: Blocking IO Secure: false
But I cannot start the second server, catalina.out says:
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 6969; nested exception is:
java.net.BindException: Address already in use
How can I change the jmx port during instance creation? I found out that the tcruntime-ctl.sh script in the instance directory uses the catalina.sh script in the main server directory where the jmx port is some kind of hardwired?!
Any help is greatly appreciated.
Dec 29th, 2011, 05:51 AM
I figured out that I can pass a different jmx port during the instance creation ( -p base.jmx.port=6970). The catalina.properties in the instance-dir/conf/ now reads: bio.http.port=8081, base.jmx.port=6970.
When I try to start this instance the tc Server accepts the different http port but somehow disregards the jmx configuration and tries to use port 6969 instead.
Forget about specifying the base.jmx.port during instance creation.
Editing the instance-dir/bin/setenv.sh is the (not very nice) solution for now.
JAVA_OPTS="$JVM_OPTS $AGENT_PATHS $JAVA_AGENTS $JAVA_LIBRARY_PATH -Dcom.sun.management.jmxremote.port=6970"
Last edited by disastermanagement; Dec 29th, 2011 at 06:57 AM.
Jan 5th, 2012, 02:44 PM
What version of tc Server are you using? I cannot reproduce this issue with 2.6.3. Passing either --interactive (where you can enter the jmx port manually) or specifying -p base.jmx.port=xxxx results in the property being stored correctly in catalina.properties and used on server startup.
Any other details you can provide?
Jan 11th, 2012, 08:45 AM
Thanks for your answer!
I just tried to create another instance and passed the jmx port during the instance creation with -p base.jmx.port=xxxx. It worked like a charm.
It was a tc Server 2.6.1 at the time I tried unsuccessfully. Last week I upgraded HypericHQ and tc Server without trying again. Now it's tc Server 2.6.3. The machine is running RHEL 5.7 x86_64 and JRE 1.6.0_30 (64 bit).