{ Update } SmartFoxServer PRO 1.6.5 is out!

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Ganius
Posts: 92
Joined: 13 Feb 2007, 12:49

Post by Ganius »

Hi Lapo.

According to the server logs when I restart the server, I have version 1.6.5.01. According to the admin console, I have the same version. So I'm assuming that the install is all ok and I'm on the right version.

I installed the Java NPC example in the simple chat zone and ran it. I received the following line in the log:

INFO | jvm 1 | 2009/01/29 13:27:34 | -----> SERVER READY <-----

Looking into the code, I see that this is written in the handleInternalEvent function. So, it seems that the server IS sending the message and the extension is receiving it.

BUT...

I also changed the code of the jsonSample.as extension of the simple chat zone to the following:

Code: Select all

function handleInternalEvent(evt)
{
   trace("*** handleInternalEvent! ***");
   trace("***"+evt.name+"***");
}
These lines do not trace for this zone at all, and same for my personal extension when looking for "serverReady".

So it seems that the java extensions receive the event, but the actionscript ones do not...

Another thing to note, is that when running the NPC example, I get the following output:

Code: Select all

INFO   | jvm 1    | 2009/01/29 13:38:10 | 13:38:10.078 - [ INFO ] > [TaskScheduler] ... started ::
INFO   | jvm 1    | 2009/01/29 13:38:10 | 13:38:10.078 - [ INFO ] > [BlueBoxHandler]... started :: 
INFO   | jvm 1    | 2009/01/29 13:38:10 | 13:38:10.078 - [ INFO ] > [EventWriter] ..... started :: 1 thread(s)
INFO   | jvm 1    | 2009/01/29 13:38:10 | 13:38:10.078 - [ INFO ] > [SystemHandler] ... started :: 1 thread(s)
INFO   | jvm 1    | 2009/01/29 13:38:10 | 13:38:10.078 - [ INFO ] > [ExtensionHandler]. started :: 1 thread(s)
INFO   | jvm 1    | 2009/01/29 13:38:10 | 13:38:10.078 - [ INFO ] > [DeadChannelsPolicy: strict]
INFO   | jvm 1    | 2009/01/29 13:38:10 | 13:38:10.078 - [ INFO ] > Server is up and running!
INFO   | jvm 1    | 2009/01/29 13:38:10 | -----> SERVER READY <-----
INFO   | jvm 1    | 2009/01/29 13:38:10 | [ it.gotoandplay.extensions.examples.npc.NpcAvatarExample2 ]: NpcRoom created.
INFO   | jvm 1    | 2009/01/29 13:38:11 | 13:38:10.968 - [ WARNING ] > NPC creation failed, due to I/O error. Local socket connection failed.
INFO   | jvm 1    | 2009/01/29 13:38:11 | Exception in thread "SystemHandler-1" java.lang.NullPointerException
INFO   | jvm 1    | 2009/01/29 13:38:11 | 	at it.gotoandplay.smartfoxserver.extensions.ExtensionHelper.joinRoom(ExtensionHelper.java:671)
INFO   | jvm 1    | 2009/01/29 13:38:11 | 	at it.gotoandplay.extensions.examples.npc.NpcAvatarExample2.setupUser(NpcAvatarExample2.java:153)
INFO   | jvm 1    | 2009/01/29 13:38:11 | 	at it.gotoandplay.extensions.examples.npc.NpcAvatarExample2.initNpcUsers(NpcAvatarExample2.java:111)
INFO   | jvm 1    | 2009/01/29 13:38:11 | 	at it.gotoandplay.extensions.examples.npc.NpcAvatarExample2.prepareNpcs(NpcAvatarExample2.java:65)
INFO   | jvm 1    | 2009/01/29 13:38:11 | 	at it.gotoandplay.extensions.examples.npc.NpcAvatarExample2.handleInternalEvent(NpcAvatarExample2.java:184)
INFO   | jvm 1    | 2009/01/29 13:38:11 | 	at it.gotoandplay.smartfoxserver.controllers.MessageHandler.dispatchEvent(MessageHandler.java:147)
INFO   | jvm 1    | 2009/01/29 13:38:11 | 	at it.gotoandplay.smartfoxserver.controllers.SystemHandler.processEvent(SystemHandler.java:185)
INFO   | jvm 1    | 2009/01/29 13:38:11 | 	at it.gotoandplay.smartfoxserver.controllers.SystemHandler.run(SystemHandler.java:143)
INFO   | jvm 1    | 2009/01/29 13:38:11 | 	at java.lang.Thread.run(Unknown Source)
So the NPC creation didn't work for me. And I got the same NPC creation failed for my own NPC in my extension as mentioned in my previous post.

I tried the suggestion of pt_dev and set the ServerIP to *, restarted the server, and got the same error for the NPC example, but my NPC for my extension actually worked...

But at the end of the day, I still don't ever get the 'serverReady' event in my actionscript extension...
crickeys
Posts: 16
Joined: 29 May 2008, 17:23

Post by crickeys »

Upgraded and now I get this when starting the server!

WrapperSimpleApp: Encountered an error running main:
INFO | jvm 1 | 2009/01/29 15:22:25 | Traceback (innermost last):
INFO | jvm 1 | 2009/01/29 15:22:25 | File "<string>", line 1, in ?
INFO | jvm 1 | 2009/01/29 15:22:25 | File "<string>", line 24, in init
INFO | jvm 1 | 2009/01/29 15:22:25 | File "/home/SmartFoxServer_PRO_1.6.2/Server/lib/pycore/main$py.class", line 71, in __init__
INFO | jvm 1 | 2009/01/29 15:22:25 | AttributeError: class 'it.gotoandplay.smartfoxserver.SmartFoxServer' has no attribute 'get_MAX'
crickeys
Posts: 16
Joined: 29 May 2008, 17:23

Post by crickeys »

Forgot to copy the contents of pycore! Works now.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »


A few users have reported problems after upgrading experiencing slow downs, slow logins, inability to connect etc...

Please DO MAKE SURE to read the release notes as we have slightly modified the way the <ServerIP> tag works to add more flexibility.

To immediately solve the issue simply open your config.xml and change your IP to this:

<ServerIP>*</ServerIP>

For all the details please read the release notes.
Thank you
Lapo
--
gotoAndPlay()
...addicted to flash games
mixart
Posts: 95
Joined: 08 Aug 2007, 20:32

Post by mixart »

I would like to suggest that for future updates there is a better folder structure or something to resolve the following...

Since patching updates since 1.6.2 my installation directory is:
/SFS_PRO_1.6.2/

I've updated patches to 1.6.5, but the installation folder still reads 1.6.2 - it's just adding confusion whenever I do updates or if I were to pass this project to someone else it just adds confusion to the whole system.

I know it's not a big issue, just add to potential easy mistakes.
phil.harlow
Posts: 6
Joined: 11 Mar 2009, 22:45

Post by phil.harlow »

>> New server side "force login" option , allows a user to force the login and close it's previous connection.

Where do we set this option? After upgrading to 1.6.5 if I try logging in with a username already in use it kicks out the original user and logs in the new one, vs the old behavior of rejecting the new and keeping the original.

How can I set this back?

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

Post by Lapo »

Hi Phil,
the "forceLogin" feature in 1.6.5 is NOT active by default.
You have to pass an extra parameter to the login() function to actually make use of it.
Lapo
--
gotoAndPlay()
...addicted to flash games
phil.harlow
Posts: 6
Joined: 11 Mar 2009, 22:45

Post by phil.harlow »

Hi lapo,

Do you know why it is doing it for me then? I changed nothing other than upgraded. I do use a custom login if that needs a change.

This is what sfs shows when I try logging in with an already-in-use screen name:


01:57:01.735 - [ INFO ] > User: phil@ is already logged in Zone: FreeMarket
Old user object found
Old User ID: 55
Old User IP: 24.16.90.57
[UsersById] query: it.gotoandplay.smartfoxserver.data.User@618ed4
[Clients] query: true
[UsersByChannel] query: null
[ChannelQueues] query: []

User was found in 1 room(s) ::
phil@s Game
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

what server side language do you use? Java? AS? Python?
Lapo
--
gotoAndPlay()
...addicted to flash games
phil.harlow
Posts: 6
Joined: 11 Mar 2009, 22:45

Post by phil.harlow »

AS
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

This is what sfs shows when I try logging in with an already-in-use screen name: ...
Yep, that is correct, there's nothing wrong with it.
And I can confirm that the Actionscript server side framework does not use the force-login by default

Can you show me the code you use when call _server.loginUser(...) ?
Lapo
--
gotoAndPlay()
...addicted to flash games
phil.harlow
Posts: 6
Joined: 11 Mar 2009, 22:45

Post by phil.harlow »

Well Lapo I apologize, I could have swore I checked there first, obviously, but low and behold the trailing ,true parameter was there and it was working as it should.

Thanks for your help!
thecreatrix
Posts: 19
Joined: 20 Aug 2008, 02:32
Contact:

Post by thecreatrix »

mixart wrote:I would like to suggest that for future updates there is a better folder structure
I agree that the patch could be made easier for users to apply and that would cause less headaches for the devs. :)

For instance, it would be a lot easier to upgrade if we could just unzip into the install root directory. That would only require the zip file having the same directory structure as the installed files.

As it is, I'm kind of confused/nervous about what to copy over. The release and install notes are not helpful in this regard. There is no mention of which files/directories from the zip correspond to existing files/directories (other than how to update a live server).

For example, in the zip file, the Actionscript_API directory doesn't exist in the installed files (1.6.2). And the directories under that one in the zip also don't exist in the installed files. Does this mean I should copy things into existing directories or does this upgrade require those new directories to exist? (If so, should we delete the old ones?)

This could all be a lot simpler for everyone by mirroring the installed file structure in the zip. I hope that will be considered for future patches. :)
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

For instance, it would be a lot easier to upgrade if we could just unzip into the install root directory. That would only require the zip file having the same directory structure as the installed files.
Unfortunately this is not possible because not all operating systems work the same way in this regard. While Windows merges the files with the existing ones, under MacOS X you will overwrite the existing folders. Linux also can behave differently based on which GUI you are using.
As it is, I'm kind of confused/nervous about what to copy over. The release and install notes are not helpful in this regard. There is no mention of which files/directories from the zip correspond to existing files/directories (other than how to update a live server).
Before updating a live server it's always safer to do it on your local version of the application. If you don't have a local version it's highly recommended to do so because, in general, you will never want to apply any changes to a live server that is not tested locally first. (and this is valid for any online application)
For example, in the zip file, the Actionscript_API directory doesn't exist in the installed files (1.6.2).
Well the API can be stored anywhere in your HD, they don't affect the server at all, and usually developers keep them in a folder of their choice and then point their Flash/Flex classpath to it
Lapo
--
gotoAndPlay()
...addicted to flash games
duke
Posts: 31
Joined: 16 Apr 2009, 11:23

Post by duke »

Where abouts is the NPC tutorial in the online docs? Wouldn't mind reading about it over my lunch break :)
Post Reply