On uploading a new jar most of the times all the changes are reflected but sometimes the changes are not reflected, when we restart the server it starts reflecting the changes.
Our app is about to go live soon and would like to know if we happen to upload a new jar, is there any way to have the changes reflect without having to restart the server while in production.
Restarting Smartfox server on new jar
-
- Posts: 7
- Joined: 27 Sep 2011, 22:40
-
- Posts: 186
- Joined: 16 Oct 2011, 14:33
Re: Restarting Smartfox server on new jar
go in the zone configurator in the admin tool. go to the zone extension tab. their is a option AUTO for Reload of the extension.
When the server is running and you replace the existing jar with another jar you will not need to restart the server and changes will be reloaded automatically.
however AUTO setting is recommended only for development/testing environment. You should keep this option to MANUAL for production environment.
understanding that you had kept the above discussed option to MANUAL before you go live..you can do this if you are live and want to change the extension without restarting the server :
1. upload your new jar for your zone.
2. go to zone monitor in the admin tool while you are live .
3. click the zone you are changing the extension for and hit monitor selection in the admin tool.
4. go to zone extension tab.
5. under Manual reloading hit the RELOAD button.
this should make the changes come into effect. However note that any previous rooms created in the zone before the upload will continue to use the previous extension ... only new rooms created now on will use the new extension.
When the server is running and you replace the existing jar with another jar you will not need to restart the server and changes will be reloaded automatically.
however AUTO setting is recommended only for development/testing environment. You should keep this option to MANUAL for production environment.
understanding that you had kept the above discussed option to MANUAL before you go live..you can do this if you are live and want to change the extension without restarting the server :
1. upload your new jar for your zone.
2. go to zone monitor in the admin tool while you are live .
3. click the zone you are changing the extension for and hit monitor selection in the admin tool.
4. go to zone extension tab.
5. under Manual reloading hit the RELOAD button.
this should make the changes come into effect. However note that any previous rooms created in the zone before the upload will continue to use the previous extension ... only new rooms created now on will use the new extension.
Re: Restarting Smartfox server on new jar
I am following the same procedure, however, when i press reload button in zone Monitor and Zone extension tab.
Extension does not work at all. When a user is connected to SFS, it disconnects it immediately.
When we restart server, same extension works fine.
Extension does not work at all. When a user is connected to SFS, it disconnects it immediately.
When we restart server, same extension works fine.
-
- Posts: 186
- Joined: 16 Oct 2011, 14:33
Re: Restarting Smartfox server on new jar
are you seeing this -
1. you are live and people are logged into the zone
2. you go to zone monitor and press reload for the zone you uploaded the new extension for.
3. the connected users get logged out
?
well i dont think this should be happening, the reload button in the zone monitor is to make the changes on the fly. make sure you are using the latest server and client
http://www.smartfoxserver.com/download/sfs2x#p=updates
1. you are live and people are logged into the zone
2. you go to zone monitor and press reload for the zone you uploaded the new extension for.
3. the connected users get logged out
?
well i dont think this should be happening, the reload button in the zone monitor is to make the changes on the fly. make sure you are using the latest server and client
http://www.smartfoxserver.com/download/sfs2x#p=updates
Re: Restarting Smartfox server on new jar
Connected users are not logged out.
New users are logged out immediately.
I am using patch 2.2.0
New users are logged out immediately.
I am using patch 2.2.0
Re: Restarting Smartfox server on new jar
1. We configured SFS for manual Reload extension (change settings from auto to Manual).
2. Restarted SFS.
3. User wzt Started playing game for few mins, (current extension build #10)
4. replaced Extension (new ext. build # 11) while wzt was playing
5. Hit Reload Button in Zone Monitor. (wzt still playing)
6. wzt kept on playing, (logs show that this user is using build # 10).
7. New user tried to enter a table, Logs show that new user uses Build # 11.
8. new User is Disconnected immediately, Disconnected Event's logs show Build #11 is running.
9. new User tries to enter again, It is able to join room, logs tell that Room Join event is fired for both build #10 and #11.
10. After that it is disconnected immediately. two disconnect events fired, one for build#10 and other for #11
2. Restarted SFS.
3. User wzt Started playing game for few mins, (current extension build #10)
4. replaced Extension (new ext. build # 11) while wzt was playing
5. Hit Reload Button in Zone Monitor. (wzt still playing)
6. wzt kept on playing, (logs show that this user is using build # 10).
7. New user tried to enter a table, Logs show that new user uses Build # 11.
8. new User is Disconnected immediately, Disconnected Event's logs show Build #11 is running.
9. new User tries to enter again, It is able to join room, logs tell that Room Join event is fired for both build #10 and #11.
10. After that it is disconnected immediately. two disconnect events fired, one for build#10 and other for #11
Re: Restarting Smartfox server on new jar
Hi.
Is this a Room-Level or a Zone-Level Extension?
Is this a Room-Level or a Zone-Level Extension?
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.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Re: Restarting Smartfox server on new jar
it is zone level extension
i am using sfs2x
i am using sfs2x
Re: Restarting Smartfox server on new jar
Sounds like you are not getting rid of the Extension handlers correctly, which explains the multple logs with different version numbers.
Can you show me what the destroy() method in your main Extension class does?
Thanks
Can you show me what the destroy() method in your main Extension class does?
Thanks
Re: Restarting Smartfox server on new jar
@Override
public void destroy() {
removeEventHandler(SFSEventType.USER_LOGIN);
removeEventHandler(SFSEventType.USER_JOIN_ROOM );
removeEventHandler(SFSEventType.SPECTATOR_TO_PLAYER );
removeEventHandler(SFSEventType.PLAYER_TO_SPECTATOR );
removeEventHandler(SFSEventType.ROOM_REMOVED );
removeEventHandler(SFSEventType.USER_DISCONNECT );
removeEventHandler(SFSEventType.USER_LOGOUT );
removeEventHandler(SFSEventType.USER_LEAVE_ROOM );
removeEventHandler(SFSEventType.PUBLIC_MESSAGE );
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
removeRequestHandler("chairNumber" );
removeRequestHandler(Command.tableState );
removeRequestHandler(Command.startGame );
removeRequestHandler(Command.userAction );
removeRequestHandler(Command.newRound );
removeRequestHandler(Command.rule );
removeRequestHandler(Command.play );
removeRequestHandler(Command.token );
super.destroy();
}
public void destroy() {
removeEventHandler(SFSEventType.USER_LOGIN);
removeEventHandler(SFSEventType.USER_JOIN_ROOM );
removeEventHandler(SFSEventType.SPECTATOR_TO_PLAYER );
removeEventHandler(SFSEventType.PLAYER_TO_SPECTATOR );
removeEventHandler(SFSEventType.ROOM_REMOVED );
removeEventHandler(SFSEventType.USER_DISCONNECT );
removeEventHandler(SFSEventType.USER_LOGOUT );
removeEventHandler(SFSEventType.USER_LEAVE_ROOM );
removeEventHandler(SFSEventType.PUBLIC_MESSAGE );
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
removeRequestHandler("chairNumber" );
removeRequestHandler(Command.tableState );
removeRequestHandler(Command.startGame );
removeRequestHandler(Command.userAction );
removeRequestHandler(Command.newRound );
removeRequestHandler(Command.rule );
removeRequestHandler(Command.play );
removeRequestHandler(Command.token );
super.destroy();
}
Re: Restarting Smartfox server on new jar
NOTE: you can remove all those manual calls, and just leave the super.destroy() which alone will remove all listeners.
It's not that it will change much, in my opinion, but all those manual removes are redundant and not useful.
There's one more thing to check, are you using the @Instantiation annotation in any of your handlers? If you do that could be the cause.
It's not that it will change much, in my opinion, but all those manual removes are redundant and not useful.
There's one more thing to check, are you using the @Instantiation annotation in any of your handlers? If you do that could be the cause.
Re: Restarting Smartfox server on new jar
when i upload new extension.
this is working fine for all the new users, however, existing live users are having problems.
my previous extension is BUILD #10
after manual Reload my new extension is BUILD #11
All the eventListeners fired for old users from server (like abc extendsBaseServerEventHandler) and eventListeners received from client(like abc extends BaseClientRequestHandler) show that it is BUILD #11. These users are of old extension (BUILD #10).
But server and client listeners' traces show that they are called for BUILd #11.
In these listeners i am accessing extension instance by getParentExtension() method.
please advise
this is working fine for all the new users, however, existing live users are having problems.
my previous extension is BUILD #10
after manual Reload my new extension is BUILD #11
All the eventListeners fired for old users from server (like abc extendsBaseServerEventHandler) and eventListeners received from client(like abc extends BaseClientRequestHandler) show that it is BUILD #11. These users are of old extension (BUILD #10).
But server and client listeners' traces show that they are called for BUILd #11.
In these listeners i am accessing extension instance by getParentExtension() method.
please advise
Re: Restarting Smartfox server on new jar
Hi,
i am using sfs2x ver. 2.2.0
i have zone level extension.
If i manually reload new extension, old game rooms will keep using old ext and new game rooms will use new extension.
Please correct me if i am wrong.
i have few questions:
1) does manual reload affect old game rooms and old users?
2) if it affects then is there any way that after manual reload my old and new user or rooms are not disturbed?
Note: after manual reload, i want that my current users keep on playing game smoothly, they should not be disturbed by manual reload.
i am using sfs2x ver. 2.2.0
i have zone level extension.
If i manually reload new extension, old game rooms will keep using old ext and new game rooms will use new extension.
Please correct me if i am wrong.
i have few questions:
1) does manual reload affect old game rooms and old users?
2) if it affects then is there any way that after manual reload my old and new user or rooms are not disturbed?
Note: after manual reload, i want that my current users keep on playing game smoothly, they should not be disturbed by manual reload.
Re: Restarting Smartfox server on new jar
Hi,
If you're manually reloading a Zone-Level extension, after it successfully gets reloaded, all the new requests sent from the clients (old and new) will be processed by the new extension, as the old version gets deleted.
If you're manually reloading a Zone-Level extension, after it successfully gets reloaded, all the new requests sent from the clients (old and new) will be processed by the new extension, as the old version gets deleted.
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.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Who is online
Users browsing this forum: Baidu [Spider] and 113 guests