Page 1 of 1

port already in use problem

Posted: 18 Sep 2009, 09:06
by luoruize
About a couple of weeks ago I managed to successfully install SFS on my server, and it worked well. Today I tried to check something on the server, but now SFS won't run. Checking the console, I receive several errors. Strangely, the exact same errors are received when trying to run a SFS server a second time on the same machine... I'm totally baffled by this, because the ports are open and there shouldn't be any problem with it. Here's the console output:

11:57:18.406 - [ INFO ] > Starting h2 engine...
11:57:18.500 - [ WARNING ] > Cannot start H2 Engine: org.h2.jdbc.JdbcSQLExceptio
n: Exception opening port 9009 (port may be in use), cause:
on: Address already in use: JVM_Bind [90061-60]
org.h2.jdbc.JdbcSQLException: Exception opening port 9009 (port may be in use),
cause: Address already in use: JVM_Bind [90061-60]
at org.h2.message.Message.getSQLException(
at org.h2.util.NetUtils.createServerSocketTry(
at org.h2.util.NetUtils.createServerSocket(
at org.h2.server.TcpServer.start(
at it.gotoandplay.smartfoxserver.SmartFoxServer.bootH2Engine(SmartFoxSer
Caused by: Address already in use: JVM_Bind
at Method)
at org.h2.util.NetUtils.createServerSocketTry(
... 5 more

--- [ System Info ] ------------------------------------------

System CPU(s): 2
VM Max memory: 517 MB Windows XP
os.arch: x86
os.version: 5.1
java.version: 1.6.0_13
java.vendor: Sun Microsystems Inc.
java.vm.specification.version: 1.0
java.vm.version: 11.3-b02
java.vm.vendor: Sun Microsystems Inc. Java HotSpot(TM) Server VM

--- [ Network Cards ] -----------------------------------------

Card:MS TCP Loopback interface
Card:Realtek RTL8168/8111 PCI-E Gigabit Ethernet NIC

--- [ Licence Loaded ] ------------------------------------

License Type -> PRO
License Owner -> --== Free Demo Licence ==--
Max. Clients -> 20
BlueBox Type -> Demo Version

--- [ Zones & Rooms ] -------------------------------------

11:57:21.062 - [ INFO ] > Default Buddy List Persister <INITED>
11:57:21.062 - [ WARNING ] > Can't initialize BuddyListManager with passed list-
size of: 0
DB Manager Activated ( org.h2.Driver )
Zone: ImperoGalactica

Lobby (id: 1, max: 500, pass:N)
11:57:21.812 - [ INFO ] > Zone Extension [ login_ext ] created, for zone:ImperoG
[]: Welcome to the extention!

11:57:21.828 - [ SEVERE ] >

[ --> FATAL ERROR <-- ]: Error initializing server.

Check if server address and port are properly configured.

Exception caught in SmartFoxServer Address already in use: bind
at Method)
at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFo

Shutting down server...

Press any key to continue . . .

Any thoughts?

Posted: 19 Sep 2009, 11:27
by Lapo
Yes, you are trying to start SmartFox while another instance is already running. Simply shut down the previous version, or if you simply want to check its status connect to it via the Admin Tool

Posted: 19 Sep 2009, 14:14
by luoruize
I thought that that was the problem, but I checked the processes running in the background, and SFS wasn't one of them. I also tried running the admin tool to see if maybe I'm process-blind, but it also couldn't connect... I had to change the ports on which SFS and the embedded DB are running on, and now it's working properly.

Posted: 09 Oct 2009, 19:02
by Molix
Is running multiple instances of SFS on the same machine frowned upon? We've been doing it for a short while, with them just set to different ports. It is kind of necessary so we can test out changes while others keep working with the existing setup.

But I noticed the warning in the logs today (the server starts, but it says H2 doesn't). I could not find 9009 in any of our config files; is it hard-coded somewhere, or can we change it?

Multiple servers, same machine

Posted: 02 Nov 2009, 14:00
by alexgenaud
Hi, I'd like to run multiple servers on the same machine (for development). I've modified the port for each SFS config.xml, but there is a Bind conflict on port 9009 - the H2 engines. Can that be altered as well?

Posted: 02 Nov 2009, 14:09
by Lapo
Sure, by adding the <H2EnginePort>XXX</H2EnginePort> to the config, under the ServerSetup node, wherer XXX is your new port value.

Posted: 02 Nov 2009, 18:29
by alexgenaud
Excellent. Thanks Lapo

Posted: 15 Dec 2009, 03:10
by u007
Hmm 1.6.9 doesnt support * as ip.

<ServerIP> your lan ip</ServerIP>

Posted: 15 Dec 2009, 12:18
by smilefr
From my experience, it does but only on linux servers.

Posted: 15 Dec 2009, 13:44
by Lapo
Please provide more details about the problem.
Also please note that no 1.6.9 version exists. Version 1.6.8 is the very last.

Issue posting rules here: