How to run multipple instances of Smart Fox Sever 2.16.3?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

am.anvari
Posts: 4
Joined: 30 May 2018, 05:34

How to run multipple instances of Smart Fox Sever 2.16.3?

Postby am.anvari » 16 Jan 2021, 09:59

Before Smart Fox Server 2.14 I could configure ports in Jetty to run multiple instances in one machine. But in newer version Apache Tomcat take place in your platform. How to achieve my approach in newer version?
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How to run multipple instances of Smart Fox Sever 2.16.3?

Postby Lapo » 16 Jan 2021, 18:05

Hi,
the simplest way is to start the first instance, connect to the AdminTool > Server Configurator > WebServer
Change the HTTP ports from the default values (8080 and 8443) to something else, then restart SFS2X.

Next, you can start the 2nd instance, using the default values.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
am.anvari
Posts: 4
Joined: 30 May 2018, 05:34

Re: How to run multipple instances of Smart Fox Sever 2.16.3?

Postby am.anvari » 18 Jan 2021, 07:52

Hi Lapo,
- Where does this setting save? I change those ports to 8081 and 8444 but when I check server.xml it does not change? I can see my change after restarting the server in the admin panel but not in server.xml.

Code: Select all

<webServer>
    <isActive>true</isActive>
    <blueBoxPollingTimeout>26</blueBoxPollingTimeout>
    <blueBoxMsgQueueSize>40</blueBoxMsgQueueSize>
    <isXForwardedForActive>false</isXForwardedForActive>
    <allowedWebsocketOrigins/>
    <isWSActive>true</isWSActive>
    <gHttpPort>8080</gHttpPort>
    <gHttpsPort>8443</gHttpsPort>
</webServer>


I go to /lib/apache-tomcar/conf/ and open the server.xml I face up with these setting.

Code: Select all

<Connector connectionTimeout="20000" port="8081" protocol="HTTP/1.1" redirectPort="8443"/>
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How to run multipple instances of Smart Fox Sever 2.16.3?

Postby Lapo » 18 Jan 2021, 15:25

There are two <Connector> definitions under Tomcat's server.xml
One for HTTP and the other for HTTPS. They both have a port attribute that you can change. That's where the AdminTool writes to.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
am.anvari
Posts: 4
Joined: 30 May 2018, 05:34

Re: How to run multipple instances of Smart Fox Sever 2.16.3?

Postby am.anvari » 19 Jan 2021, 08:06

Thanks Lapo,
I had to change the default shutdown port from 8005 to another in server.xml. This way I could run another instance.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How to run multipple instances of Smart Fox Sever 2.16.3?

Postby Lapo » 19 Jan 2021, 08:55

Oh, yes, I forgot about that. :(
Apparently there's no way to turn the feature off in Tomcat so it's an extra port number to take care of.

We will post an article soon on our blog about this, so that is easily found via the search function in our documentation website too.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 40 guests