I want to use apache-tomcat-7.0.47 with two instance for my application. I clone my directory and changed the port numbers in server.xml file. I can start the first tomcat instance and my application successfully run, the second instance can start normally but my application can not run normally, It's trace log is here;
Caused by: java.io.IOException: Failed to bind to server socket: tcp://localhost:61616 due to: java.net.BindException: Address already in use: JVM_Bind
I searched error on internet some body said that it is about activeMQ but I do not know what it is. how can I handle wtih this problem?
It is an architectural constraint in TCP/IP that no more than one and only one process can open a specific TCP/IP port for listening purposes. If a second process attempts to open the same port, that attempt will fail. In the case of Tomcat, Tomcat itself will continue to run, but the second copy of Tomcat won't be receiving incoming traffic for that port. The Tomcat system will be executing, but not the part of Tomcat that listens to that port.
This constraint applies at the OS level, not in Java or Tomcat, so even if a non-java program is listening in on port, no other application can do so until the first application stops listening.
When it comes to destroying a civilization, gas chambers cannot hold a candle to echo chambers.