installing SFS2X - not able to bind socket

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

Moderators: Lapo, Bax

FireSmartFox
Posts: 33
Joined: 28 Sep 2018, 19:47

installing SFS2X - not able to bind socket

Postby FireSmartFox » 07 Oct 2018, 18:17

Hi!
I worked with the SFS Pro and after a few years I am back and ready for SFS2X with HTML5!

Current problem after installing SFS2X on a puclic server is:
"Was not able to bind socket: { 5.blabla.blabla.185:10024, (Tcp) }, Was not able to bind socket: { 5.blabla.blabla.185:9933, (Udp) }"
I can't access the administrator tool (form is loading but no connection after clicking "Connect")

In socketAddresses of the config.xml I have:
<socket address="5.blabla.blabla.185" port="10024" type="TCP"/>
<socket address="5.blabla.blabla.185" port="9933" type="UDP"/>

But I also tried the default values seperately, together, and 192.168.142.2, which my server administrator mentioned when I let him make sure that the port 9933 is working:
TRAFFIC FROM ANY à Service Port 9933 TCP/ UDP à 5.blabla.blabla.185 à Change destination to 192.168.142.2 à And service to Port 9933 TCP / UDP
TRAFFIC FROM ANY à Service Port 10024 TCP/ UDP à 5.blabla.blabla.185 à Change destination to 192.168.142.2 à And service to Port 10024 TCP / UDP


I tried to set 192.168.142.2 in the config.xml and it's interesting the boot.log says:
...Added bound tcp socket --> 192.168.142.2:10024
...Added bound udp socket --> 192.168.142.2:9933

But I couldn't connect to the server via admin tool as well.

Do you have any idea how to set it up right? My server administrator checked the ports several times if they are open.
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: installing SFS2X - not able to bind socket

Postby Lapo » 08 Oct 2018, 08:11

Hi,
you have made several mistakes in your config. Long story short you should just install SFS2X and not touch the IP configuration.
SFS2X can auto-bind the current address without manual intervention.

If you need to change port numbers, go ahead but leave the "0.0.0.0" address as the binding IP. This value means that the server auto-binds the correct private IP for you.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
FireSmartFox
Posts: 33
Joined: 28 Sep 2018, 19:47

Re: installing SFS2X - not able to bind socket

Postby FireSmartFox » 08 Oct 2018, 09:56

Thanks! I uploaded the original config.xml and it worked! Nice administration.
However, after I activated WebSockets to my tried ports (8080 and SSL 8443), the Connector html5 example worked too, but not the administration anymore. "Service Unavailable" standard page. The weird thing: When I stop SFS2X and I start it with the default config.xml again (without activated WebSockets), the administration page is sill not reachable. I have now no access to the administration anymore, no matter how the SFS2X is started. Strange.
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: installing SFS2X - not able to bind socket

Postby Lapo » 08 Oct 2018, 14:18

FireSmartFox wrote:Thanks! I uploaded the original config.xml and it worked! Nice administration.
However, after I activated WebSockets to my tried ports (8080 and SSL 8443), the Connector html5 example worked too, but not the administration anymore.

I can't imagine a reason why it wouldn't work... Are you sure you're pointing the browser to the right place?

The weird thing: When I stop SFS2X and I start it with the default config.xml again (without activated WebSockets), the administration page is sill not reachable. I have now no access to the administration anymore, no matter how the SFS2X is started. Strange.

Can you reach the welcome page?
It's reachable at http://your-domain-name:8080/
If not it sounds like you have shut down the webserver entirely?
Also, are you sure there are no server side errors?

thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
FireSmartFox
Posts: 33
Joined: 28 Sep 2018, 19:47

Re: installing SFS2X - not able to bind socket

Postby FireSmartFox » 16 Oct 2018, 22:24


It shows "503 Service Unavailable" as well.

If not it sounds like you have shut down the webserver entirely?

Not on purpose. How can I restart it?

Also, are you sure there are no server side errors?

As far as I could see not (also not in the smartfox.log and boot.log).

Weird. Maybe I destroyed port 8080 by accidently setting the websockets to 8080, too. Still not able to see the web server with init config (without Websockets) no matter how often I start.

The server administrator asked for alle ports which I want to use.

Is this correct (as long as I have these ports in the config)?
9933 for Admin Access
8080 for web server providing Admin Access page
8080 for Websockets again?!
8443 for SSL-Websockets
Image
I don't understand why the websockets are also using port 8080. Maybe this destroyed the port?
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: installing SFS2X - not able to bind socket

Postby Lapo » 17 Oct 2018, 07:11

Hi,
Is this correct (as long as I have these ports in the config)?
9933 for Admin Access
8080 for web server providing Admin Access page
8080 for Websockets again?!
8443 for SSL-Websockets

Yes this is correct.
Keep in mind that websocket is part of the HTTP protocol, so WS and HTTP use the same ports (8080) and WSS and HTTPS use the same ports (8443)

Not on purpose. How can I restart it?

What OS are you using?
Under Linux you just need to use the sfs2x-service command
Under Windows you will need to use the Service Manager.

You can find more details about starting/stopping SFS2X in the installation guide for the OS in use:
http://docs2x.smartfoxserver.com/Gettin ... stallation

If the problem persists we'll need to see your current config and the relative logs.
You can zip the config/ and logs/ folders and send them to our support@... email box with a reference to this thread.

p.s. = try to make the zip < 50MB, maybe by removing unnecessary log files, if they're numerous.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 103 guests