Issues running multiple servers on the same machine
Posted: 10 Sep 2010, 20:10
I'm trying to run 2 different servers on the same machine under different ports. This is necessary to simulate a development and production environment without increasing hardware costs. However I get the following error when the 2nd server is started. I should mention that the servers are running on a Linux box. It also seems to be impossible to connect the admin tools to a server that isn't running under the default port of 9933.
14:35:34,334 INFO [main] api.SFSApi - Room created: [ Room: The Lobby, Id: 4, Group: default, isGame: false ]
14:35:34,352 DEBUG [main] Extensions - {Admin}: Admin Extension started
14:35:34,354 INFO [main] api.SFSApi - Room created: [ Room: AdminRoom, Id: 5, Group: default, isGame: false ]
14:35:34,362 INFO [main] core.AdminToolService - AdminTool Service started
14:35:36,036 ERROR [main] v2.SmartFoxServer -
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.net.BindException
Message: Address already in use
Description: Unexpected error during Server boot. The server cannot start.
Solution: Please email us the content of this error message, including the stack trace to support@smartfoxserver.com
+--- --- ---+
Stack Trace:
+--- --- ---+
sun.nio.ch.Net.bind(Native Method)
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:315)
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
org.mortbay.jetty.Server.doStart(Server.java:235)
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
com.smartfoxserver.v2.http.SFSHttpServer.start(SFSHttpServer.java:93)
com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:197)
com.smartfoxserver.v2.Main.main(Main.java:31)
14:35:34,334 INFO [main] api.SFSApi - Room created: [ Room: The Lobby, Id: 4, Group: default, isGame: false ]
14:35:34,352 DEBUG [main] Extensions - {Admin}: Admin Extension started
14:35:34,354 INFO [main] api.SFSApi - Room created: [ Room: AdminRoom, Id: 5, Group: default, isGame: false ]
14:35:34,362 INFO [main] core.AdminToolService - AdminTool Service started
14:35:36,036 ERROR [main] v2.SmartFoxServer -
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.net.BindException
Message: Address already in use
Description: Unexpected error during Server boot. The server cannot start.
Solution: Please email us the content of this error message, including the stack trace to support@smartfoxserver.com
+--- --- ---+
Stack Trace:
+--- --- ---+
sun.nio.ch.Net.bind(Native Method)
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)
sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77)
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:315)
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
org.mortbay.jetty.Server.doStart(Server.java:235)
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
com.smartfoxserver.v2.http.SFSHttpServer.start(SFSHttpServer.java:93)
com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:197)
com.smartfoxserver.v2.Main.main(Main.java:31)