after login disconnects from server after 30 seconds

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

Post Reply
ceteri
Posts: 8
Joined: 12 Jan 2012, 23:42

after login disconnects from server after 30 seconds

Post by ceteri »

I am new to SFS and feel completely lost i hope someone can help.

I have written a simple chat application, after i log in if i remain idle for more than 30 seconds i am disconnected. the disconnection reason given in the CONNECTION_LOST event is 'idle'

This is despite:

Setting user maximum idle time to 3000 seconds in the server configurator
Restarting the server
Installing the RC3 patch and updating the API

Can anyone offer any advice on what is wrong? i am running the server as localhost and using Flash CS5.5 to develop. below is the output from the windows console, and the trace output from my console in the Flash IDE:

READY!
00:03:16,562 INFO [SocketReader] core.SocketAcceptor - Session created: { I
d: 1, Type: DEFAULT, Logged: No, IP: 127.0.0.1:50813 } on Server port: 9933 <---
> 50813
00:03:16,594 INFO [com.smartfoxserver.v2.controllers.SystemController-1] api.SF
SApi - Login in, { Zone: SimpleChat }, ( User Name: GuestUser#0, Id: 0, Priv
: 0, Sess: 127.0.0.1:50813 )
00:03:52,819 INFO [SocketReader] sessions.DefaultSessionManager - Session r
emoved: { Id: 1, Type: DEFAULT, Logged: Yes, IP: 127.0.0.1:50813 }
00:03:52,821 INFO [SocketReader] entities.SFSZone - User: GuestUser#0 was d
isconnected.
00:03:52,822 INFO [SocketReader] api.SFSApi - User disconnected: ( User Nam
e: GuestUser#0, Id: 0, Priv: 0, Sess: 127.0.0.1:50813 )

----------------------------------------------------------
flash ide output:

Joined Room: The Lobby
[SFS - INFO] UserCountChange { Message id: 1001 }
{ Dump: }

(int) r: 1
(short) uc: 1

[SFS - INFO] Data Read: Binary Size: 29
80 00 1A 12 00 03 00 01 61 03 03 ED 00 01 63 02 ........a.....c.
00 00 01 70 12 00 01 00 02 64 72 02 00 ...p.....dr..

[SFS - INFO] ClientDisconnection { Message id: 1005 }
{ Dump: }

(byte) dr: 0

idle
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Post by rjgtav »

Hi.

Please also change the Overriden user maximum idle time setting of the Zone in the Zone Configurator Module, as it overrides the setting on the server.
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.
ceteri
Posts: 8
Joined: 12 Jan 2012, 23:42

Post by ceteri »

Thanks for the reply, it looks like this is going to be it but for some reason my admin panel crashes when i try to change this to a value of 300

I am working from a fresh install of SFS2x that has been patched

the error log i get is:

16 Jan 2012 17:17:47,799 INFO [pool-1-thread-2] v2.api.SFSApi - Login in, { Zone: --=={{{ AdminZone }}}==-- }, ( User Name: sfsadmin, Id: 0, Priv: 0, Sess: 127.0.0.1:57822 )
16 Jan 2012 17:18:13,799 ERROR [com.smartfoxserver.v2.controllers.ExtensionController-1] v2.controllers.ExtensionController -
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.IllegalArgumentException
Message: Can not set java.lang.String field com.smartfoxserver.v2.config.ZoneSettings$ExtensionSettings.name to java.util.ArrayList
Description: Error while handling client request in extension: { Ext: Admin, Type: JAVA, Lev: ZONE, { Zone: --=={{{ AdminZone }}}==-- }, {} }
Extension Cmd: zoneConfig.saveZoneConfig
+--- --- ---+
Stack Trace:
+--- --- ---+
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
sun.reflect.UnsafeObjectFieldAccessorImpl.set(Unknown Source)
java.lang.reflect.Field.set(Unknown Source)
com.smartfoxserver.v2.admin.configurator.SettingsUpdater.parseSettingData(SettingsUpdater.java:130)
com.smartfoxserver.v2.admin.configurator.SettingsUpdater.update(SettingsUpdater.java:32)
com.smartfoxserver.v2.admin.handlers.ZoneConfigModuleReqHandler.handleClientRequest(ZoneConfigModuleReqHandler.java:208)
com.smartfoxserver.v2.extensions.SFSExtension.handleClientRequest(SFSExtension.java:192)
com.smartfoxserver.v2.controllers.ExtensionController.processRequest(ExtensionController.java:137)
com.smartfoxserver.bitswarm.controllers.AbstractController.run(AbstractController.java:96)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

any suggestions as to what is happening?
2morrowMan
Posts: 8
Joined: 04 May 2009, 21:27
Contact:

Post by 2morrowMan »

I have the same problem.
And after this I have stopped sfs-service and I have no runned sfs-standalone (I mean any possible sfs is offline) But sample applications (for examplse http://localhost:8080/examples/Flash-Tris/) can connect to something and it works! WTF? :evil:
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Post by rjgtav »

@ceteri
It looks like you're using an older cached version o the AdminTool, which isn't totally compatible with the latest server. Please clear your cache and try again. If it doesn't work, please use a browser that hasn't ever opened the adminTool's page.

@2morrowMan
No that's not the same problem. If the examples are still connecting, that's because there's still a server instance running (no magic :P)
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.
ceteri
Posts: 8
Joined: 12 Jan 2012, 23:42

Post by ceteri »

Thanks for the reply. I tried doing what you suggested and i still got the same error, i tried with both IE and Firefox. I even tried installing Google Chrome and it crashes every time i hit the submit button in the zone configurator.

any other ideas what could be causing this?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

It could be a wrong setting in the Zone xml file. Try creating a new Zone from scratch.
Paolo Bax
The SmartFoxServer Team
ceteri
Posts: 8
Joined: 12 Jan 2012, 23:42

Post by ceteri »

I created a new zone and that fixed the error. Thanks rjgtav and Bax for the help! so is the cause of this that the SimpleChat zone was created before the patch was added?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Yes. Possibly an incompatible Zone or Room setting.
Paolo Bax
The SmartFoxServer Team
Post Reply