Running multiple SFS instances on same box

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

jamieyg3
Posts: 84
Joined: 25 Sep 2008, 16:01

Post by jamieyg3 »

Lapo wrote:As explained above, ( http://forums.smartfoxserver.com/viewto ... 3089#13089 )
please make sure to use a different port for the database server for each SFS instance running on the same machine.
This setting:

Code: Select all

<H2EnginePort>9009</H2EnginePort>  
should be added in the main config.xml file. (under the root node)

9009 is the default value, any other value should work, like 9010, 9011 etc...
so it's not under the server setup node? i'll try it under the root thanks.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Yes plase under <ServerSetup>
Lapo
--
gotoAndPlay()
...addicted to flash games
jamieyg3
Posts: 84
Joined: 25 Sep 2008, 16:01

Post by jamieyg3 »

Lapo wrote:Yes plase under <ServerSetup>
that's where I put it and it didn't work, I posted what I have in my previous post
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Please, try be more clear.
The last error message you posted indicated that there was a port conflict on TCP port 9009 which is the default.

If this is happening is because BOTH instances are trying to use that port.
Simply change the configuration of the second instance of the server to run on another port number, 9010 for example.

If you are still getting errors, please post them here
Lapo
--
gotoAndPlay()
...addicted to flash games
jamieyg3
Posts: 84
Joined: 25 Sep 2008, 16:01

Post by jamieyg3 »

jamieyg3 wrote:
Lapo wrote:The database server runs on port 9009, so if you run a second SFS instance you should give it another port (e.g. 9010)
I am having problems with this

I'm using 1.6.5

and I put this in:

Code: Select all

<SmartFoxConfig>

        <ServerSetup>
                <H2EnginePort>9010</H2EnginePort>
                <ServerIP>*</ServerIP>
                <ServerPort>9340</ServerPort>
I get this error during startup...

Code: Select all

jvm 1    | 13:41:27.065 - [ INFO ] > Starting h2 engine...
jvm 1    | 13:41:27.170 - [ WARNING ] > Cannot start H2 Engine: org.h2.jdbc.JdbcSQLException: Exception opening port 9009 (port may be in use), cause: java.net.BindException: Address already in use [90061-60]
jvm 1    | org.h2.jdbc.JdbcSQLException: Exception opening port 9009 (port may be in use), cause: java.net.BindException: Address already in use [90061-60]
jvm 1    |      at org.h2.message.Message.getSQLException(Message.java:84)
jvm 1    |      at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:54)
jvm 1    |      at org.h2.util.NetUtils.createServerSocket(NetUtils.java:39)
jvm 1    |      at org.h2.server.TcpServer.start(TcpServer.java:125)
jvm 1    |      at org.h2.tools.Server.start(Server.java:362)
jvm 1    |      at it.gotoandplay.smartfoxserver.SmartFoxServer.bootH2Engine(SmartFoxServer.java:532)
jvm 1    |      at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:581)
jvm 1    | Caused by: java.net.BindException: Address already in use
jvm 1    |      at java.net.PlainSocketImpl.socketBind(Native Method)
jvm 1    |      at java.net.PlainSocketImpl.bind(Unknown Source)
jvm 1    |      at java.net.ServerSocket.bind(Unknown Source)
jvm 1    |      at java.net.ServerSocket.<init>(Unknown Source)
jvm 1    |      at java.net.ServerSocket.<init>(Unknown Source)
jvm 1    |      at org.h2.util.NetUtils.createServerSocketTry(NetUtils.java:51)
jvm 1    |      ... 5 more
and a bit further down I see this...

Code: Select all

jvm 1    | --- [ Zones & Rooms ] -------------------------------------
jvm 1    |
jvm 1    |      DB Manager Activated ( org.gjt.mm.mysql.Driver )
jvm 1    | java.lang.NullPointerException
jvm 1    |      at it.gotoandplay.smartfoxserver.data.buddylist.persistence.AdvancedBuddyListPersister.checkIfTableExists(AdvancedBuddyListPersister.java:266)
jvm 1    |      at it.gotoandplay.smartfoxserver.data.buddylist.persistence.AdvancedBuddyListPersister.init(AdvancedBuddyListPersister.java:40)
jvm 1    |      at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone(SmartFoxServer.java:1893)
jvm 1    |      at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones(ConfigReader.java:796)
jvm 1    |      at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:174)
jvm 1    |      at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:341)
jvm 1    |      at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:609)
jvm 1    | Problems in config file: null
jvm 1    | it.gotoandplay.smartfoxserver.exceptions.ConfigurationException
jvm 1    |      at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:199)
jvm 1    |      at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:341)
jvm 1    |      at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:609)
jvm 1    |
jvm 1    | Errors found in configuration files.
jvm 1    | Unable to start the server.
jvm 1    |
jvm 1    |
jvm 1    | Shutting down server...
any help is appreciated!
I am still having problems with everything that I put in this post.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Please, send us your config.xml file from both server installations and we'll take a look.
Click on Support > Contact Us to send us the email
Lapo
--
gotoAndPlay()
...addicted to flash games
jamieyg3
Posts: 84
Joined: 25 Sep 2008, 16:01

Post by jamieyg3 »

ok an email has been sent thanks.
jamieyg3
Posts: 84
Joined: 25 Sep 2008, 16:01

Post by jamieyg3 »

I am still having this issue even after making sure my config.xml was UTF-8. Does anyone have any ideas?
Post Reply