SFS2X doesn't respond at login step

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

Moderators: Lapo, Bax

LeMageFou
Posts: 18
Joined: 19 Aug 2011, 15:51

SFS2X doesn't respond at login step

Postby LeMageFou » 07 Jun 2012, 09:47

Hi.

I have a SmartFox2X server running. Everything is running fine but sometimes, the server doesn't do the login.
It's not the extension of the Zone because it does the same with the Remote Admin Tool. I've got the info "Connected to [my_ip]; now performing login" but nothing happens, it just don't do anything. The login info are correct. All i can do is restarting the server manually and it fixes the problem but only for a time.

Any idea where the problem should be?

Thanks.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SFS2X doesn't respond at login step

Postby Lapo » 07 Jun 2012, 17:48

Please specify which version you are using and check you server side logs for warnings/errors.
Let us know
Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: SFS2X doesn't respond at login step

Postby rjgtav » 07 Jun 2012, 18:00

Hello.
Are you running a database-based custom login? If so, please make sure that you always close the connection after checking the user's credentials, by using a try/catch/finally statement.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
LeMageFou
Posts: 18
Joined: 19 Aug 2011, 15:51

Re: SFS2X doesn't respond at login step

Postby LeMageFou » 08 Jun 2012, 12:29

Hi. Thanks for the reply.

Lapo wrote:Please specify which version you are using and check you server side logs for warnings/errors.
Let us know
Thanks

I use the 2.1.0 version of the server. Nothing in the log, no error, no warning. Sometimes this one appears but only when I restart the server :

Code: Select all

failed SelectChannelConnector@0.0.0.0:8080: java.net.BindException: Address already in use

failed Server@52efccb1: java.net.BindException: Address already in use

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.net.BindException
Message: Address already in use
Description: The specified TCP port cannot be bound to the configured IP address.
Possible Causes: Probably you are running another instance of SFS2X. Please double check using the AdminTool.
Start a new browser page at http://<your-sfs-domain>/admin/
If the problem persists, email us the content of this error message to support[at]smartfoxserver.com
+--- --- ---+
Stack Trace:
+--- --- ---+
sun.nio.ch.Net.bind(Native Method)
sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
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:111)
com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:244)
com.smartfoxserver.v2.Main.main(Main.java:31)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
com.install4j.runtime.launcher.Launcher.main(Unknown Source)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


rjgtav wrote:Hello.
Are you running a database-based custom login? If so, please make sure that you always close the connection after checking the user's credentials, by using a try/catch/finally statement.

Yes I use a custom login with a database. All connections are closed. I also have a login systme which doesn't use any database and I have the same problem.
Plus this problem appears also with the SmartFox Admin Tool, the Flash application where you can monitor your SmartFox server. I enter the host, the port, the username and the password but when I press the connect button, nothing happens. Is the admin tool use also a database connection during the login process or right after it? If I restart the server manually, everything go back to normal.
One time, This problem also happened when I was connected in the admin tool. Everything was blank : memory usage, threads list, network, zone and room list, all this data was just not loaded in the application.

This problem doesn't appear all the time. I can run the server an hour, a day, a week without having it.
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: SFS2X doesn't respond at login step

Postby rjgtav » 08 Jun 2012, 15:20

Hmm... As the error suggests, maybe you're running multiple instances of SFS2X? Or is there any other software that is using the same ports?
If you shutdown the server and then start it again instead of restarting it, does the problem still happen?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Google [Bot] and 46 guests