{ Patch } SmartFoxServer PRO 1.5.8c ready

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

Moderators: Lapo, Bax

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

{ Patch } SmartFoxServer PRO 1.5.8c ready

Post by Lapo »

Hello,
we are releasing a maintenance patch for SFS PRO 1.5.5.
The patch introduces several bug fixes and additions to the last version of the server.

- Download HERE -

All the details can be found in the release notes:

Code: Select all

» Actionscript 2.0 API - fixed bug in XML entities decoding. Could cause an infinite loop, if input data was corrupt

» Actionscript 2.0 API - fixed number/string conversion in XML decoding. It could cause a particularly formatted string to be converted into an octal number

» Server Side Java Framework - Added getSecreteKey() method to the ExtensionHelper class

» Server Side Framework - The user object is now passed to both userLost and userExit internal events

» Server Side Framework - Room object exposes a new (overloaded) method: getAllUsersButOne()

» Server Side Framework - Room object exposes a new method: getSpectatorList()

» Server Side Framework - Room object exposes a new method: getAllPlayers()

» Server Side Framework - Room object exposes a new method: getUserByPlayerIndex()

» Admin Tool - fixed a bug that could cause an incomplete extension file list under the "Extensions" screen

» Admin Tool - fixed a bug that could cause the overwrite of the last selected file under the "Extensions" screen

» Server - fixed a bug with maxIdleTime that didn't allow values higher than 2.000.000 of seconds

» Server - fixed a bug with very long room names not being correctly displayed when the server boots 

» Server - fixed a bug in the Bad Words Filter. Certain foreign accented characters could trigger the recognition of a bad word when it's not

» Server side Python Framework - minor changes to the json serialization

» Javadoc: updated and added DbManager and DataRow classes 

Lapo
--
gotoAndPlay()
...addicted to flash games
piser
Posts: 51
Joined: 26 Apr 2007, 08:22
Location: Poland
Contact:

this patch is good, but...

Post by piser »

hi Lapo,
since I upgraded my server Im getting thats warnings:

Code: Select all

2007/08/07 09:53:53.309 - [ WARNING ] [id: 13] (ConnectionCleanerTask.run): Connection cleaner error: java.util.NoSuchElementException
Well, first of all I thought it is because of this part I had in code after any SQL:

Code: Select all

db217.getConnection().close()
When I hashed it and restarted SFS Server everything was good by 2 hour, after this time Im getting same errors as above.

Any solutions for this?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Thanks for reporting, we'll investigate. It's nothing you should worry about too much anyways and it has nothing to do with your SQL code
Lapo
--
gotoAndPlay()
...addicted to flash games
cevans
Posts: 15
Joined: 02 Jul 2007, 11:00

Post by cevans »

Server Side Framework - The user object is now passed to both userLost and userExit internal events
I just finished upgrading to the patch (primarily for the above functionality). Do you have a quick code example of this? I can't find it in the docs.

When I loop through the Event object properties I get these:
oldPlayerIndex
userId
roomIds
playerIndexes
name

When I use the userId with _server.getUserById(), it crashes the script. So how exactly do you get access to the user object in those internal events?

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

Post by Lapo »

I am sorry but it's not yet available in Actionscript :oops: while it is in both Java and Python.
Due to the way events are handled in the AS framework we had to delay it for AS and execute a few more tests to make sure we didn't break any previous compatibility.

It will be available in the next patch before we release SFS 1.6.0
If you need it quickly just drop us an email and we'll send the updated library.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
AndradeArts
Posts: 5
Joined: 29 Aug 2007, 16:07

Post by AndradeArts »

We just tried to apply the 1.5.8c patch to 1.5.5 running linux but we get the following error. This error is vague and doesn't really explain much. The code ran fine before the patch was applied.

Code: Select all

  DB Manager Activated ( org.gjt.mm.mysql.Driver )

Zone: gameZone

 

        GuestLobby         (id: 1, max: 50, pass:N)

        MainLobby          (id: 2, max: 50, pass:N)

        SRoom1         (id: 3, max: 50, pass:N)

        SRoom2         (id: 4, max: 50, pass:N)

        uAMain        (id: 5, max: 50, pass:N)

15:47:18.497 - [ INFO ] > Zone Extension [ sLobby ] created, for zone:gameZone

[sLobby.as]: 

[sLobby.as]: Initing sLobby.as !

[sLobby.as]: +++++++++++++++++++++++++++++++++++++++

[sLobby.as]: 10.116.66.31

 

Zone: testPing

 

        MainLobby          (id: 6, max: 50, pass:N)

        WaitRoom           (id: 7, max: 50, pass:N)

 

15:47:18.538 - [ SEVERE ] > 

 

[ --> FATAL ERROR <-- ]: Error initializing server.

 

Check if server address and port are properly configured.

 

Exception caught in SmartFoxServer

java.net.BindException: Address already in use

        at sun.nio.ch.Net.bind(Native Method)

        at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)

        at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)

        at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)

        at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:433)

        at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:617)

 

 

Shutting down server...

 

2007-08-30 15:47:18.544::INFO:  Shutdown hook executing

2007-08-30 15:47:19.079::INFO:  Shutdown hook complete
Thanks,
Mark Andrade
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

The problem is that you haven't shut down an already running instance of the server and you're trying to run another instance.

Make sure you shut down the old instance before attempting to launch a new one. Open the Admin Tool and click "HALT" in the main screen.

HTH
Lapo
--
gotoAndPlay()
...addicted to flash games
cevans
Posts: 15
Joined: 02 Jul 2007, 11:00

Post by cevans »

I found a pretty serious bug I think.

Before I updated to 1.5.8, I used this code for SQL INSERT statements

Code: Select all

var rs = stmt.executeUpdate(sql, stmt.RETURN_GENERATED_KEYS)
This worked just fine in 1.5.1, but now the scripts halt anytime a SQL INSERT statement is used. No error is given whatsoever, the .as script simply stops.

The actual SQL statement is fine because when I plug in the raw statement on the MySQL command line, it executes correctly.

Also, UPDATE statements work fine in SFS (using executeUpdate) and SELECT statements work fine (using executeQuery). It's just the INSERT statement that seems to be not be working.

Again, everything worked fine prior to the update. I didn't make any DB changes, I just updated SmartFox from 1.5.1 to 1.5.8c.

Hopefully can get this resolved ASAP. To reproduce it on your end, just try using an INSERT statement with executeUpdate(). I can't get any INSERT statements to work. If it works for you, then it's probably something on my end... though I don't know what... :cry:
cevans
Posts: 15
Joined: 02 Jul 2007, 11:00

Post by cevans »

Oh yeah, just in case it's not clear, I should mention I'm accessng the JDBC API directly. I'm not using the executeCommand method.

EDIT: I just tried using the executeCommand with the INSERT statement and I got the following message in the log file:
[ SEVERE ] [id: 11] (DbManager.executeCommand): DbManager error during command execution: INSERT INTO Table SET Field='value'
AndradeArts
Posts: 5
Joined: 29 Aug 2007, 16:07

Post by AndradeArts »

Understood, although since upgrading from version 1.5.5 to 1.5.8 we can no longer run multiple instances on a single host. Even though each instance is configured to use it’s own unique IP address, it still fails to launch the server with the errors posted above. This is likely due to the patch since this was working perfectly before. Any suggestions?


Note: We are running multiple instances (separate users) for our alpha/beta environment.

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

Post by Lapo »

cevans wrote:Oh yeah, just in case it's not clear, I should mention I'm accessng the JDBC API directly. I'm not using the executeCommand method.

EDIT: I just tried using the executeCommand with the INSERT statement and I got the following message in the log file:
[ SEVERE ] [id: 11] (DbManager.executeCommand): DbManager error during command execution: INSERT INTO Table SET Field='value'
The fact that you are using JDBC directly means that you're bypassing the SFS framework completely... so we can't really do anything about it.
What I mean is that the stmt object should be a regular java.sql.Statement object, right?

If so the bug might be in the JDBC API, but I honestly doubt it. I think you should provide more info about your code so that we can see what's going on.
As far as I can tell there's nothing that we could possibly change from 1.5.1 to 1.5.8 that could alter the behavior of the JDBC framework. One possibility is that an Exception is being "swallowed" ... but we should check the actual code and see.

You can send snippets via email if don't want to publish it here

HTH
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

AndradeArts wrote:Understood, although since upgrading from version 1.5.5 to 1.5.8 we can no longer run multiple instances on a single host. Even though each instance is configured to use it’s own unique IP address, it still fails to launch the server with the errors posted above. This is likely due to the patch since this was working perfectly before. Any suggestions?

Note: We are running multiple instances (separate users) for our alpha/beta environment.

--
Mark Andrade
Mark, from version 1.5.8 the server (by default) listens on all available IP addresses, so there's no need to run multiple instances.
If you were using more instances for testing purposes you can re-create the same behavior by using multiple Zones.
Lapo
--
gotoAndPlay()
...addicted to flash games
AndradeArts
Posts: 5
Joined: 29 Aug 2007, 16:07

Post by AndradeArts »

Lapo wrote: Mark, from version 1.5.8 the server (by default) listens on all available IP addresses, so there's no need to run multiple instances.
If you were using more instances for testing purposes you can re-create the same behavior by using multiple Zones.
Let me see if I can explain it a bit more. We have two separate config.xml files; one is testing and other is live. They are split across the separate instances so separate zones will not help with our testing.

How do we access each config.xml independently using SFS? Again, this worked with 1.5.5

What’s the point of the IP in config.xml if you’re binding to all IPs?

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

Post by Lapo »

I see your point. The fact that the server listens on multiple ports helps in both testing and production scenarios as you can easily reach it from the localhost, the physical IP address and the public router address ( using port forwarding ).

In your specific case, if two instances are needed on the same machine, I'd suggest to simply use two different ports. (i.e. 9338 and 9339)

HTH
Lapo
--
gotoAndPlay()
...addicted to flash games
FunTime
Posts: 10
Joined: 02 Oct 2007, 20:32

IP Binding

Post by FunTime »

While I little late (I just got around to updating to 1.5.9 yesterday)
the problem is with this patch here.

I really think you should go back to your old behavior for binding to only IP/ports listed in the config.

Maybe soing something more like this?

<connections>
<bind>
<ServerIP>127.0.0.1</ServerIP>
<ServerPort>9339</ServerPort>
</bind>
<bind>
<ServerIP>127.0.0.1</ServerIP>
<ServerPort>9338</ServerPort>
</bind>

<bind>
<ServerIP>127.0.0.2</ServerIP>
<ServerPort>9339</ServerPort>
</bind>

</connections>


I had aheck of of time wondering why it suddenly didn't work when I had it running on port 80, but now I can't because when it tries to bind to all interfaces it conflicts with my web server.

Is there any chance this can be changed in the (very near) future?
Post Reply