BlueBox connection working but now SFS communication

Submit all your BlueBox related questions or report a bug here!

Moderators: Lapo, Bax

mikih
Posts: 11
Joined: 17 Jan 2008, 19:30

BlueBox connection working but now SFS communication

Postby mikih » 04 Feb 2010, 12:50

Hi boys n girls,

we try to make some load tests with the BlueBox component. Unfortunately I cant get the BlueBox running successfully.

No errors are thrown. Connection is successfully established. Client polls requests... but no sfs communication is happening.

no login, no roomlistupdate - nothing. we testing several client as3 and java both. All components are uptodate.


Any ideas?


we have a unlimited pro version and a bluebox demo license



Cheers

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

Postby Lapo » 04 Feb 2010, 15:21

First off try using any of our demo apps. They work out of the box.
You can take the SimpleChat (both AS2 or AS3) or the simple code templates and point them to the wrong TCP port.

This will in turn force the BlueBox connection.

If the test doesn't work for you we will need all the details of your server, API version, server config, error logs etc...

Thank you
Lapo
--
gotoAndPlay()
...addicted to flash games
mikih
Posts: 11
Joined: 17 Jan 2008, 19:30

Postby mikih » 04 Feb 2010, 16:36

Hi Lapo,

we tried it with several of your demos (e.g. connection_as3.fla) and went through all bluebox concerning topics in the forum. There are no errors in the log... connected the bluebox works just fine.


UPDATE: I got you "connection_as3.fla" example working.. there was no login implemented :/.

I found out the difference how as3 and java client does behave.

The Java stuck after receiving the policy xml. The SmartFoxJChat example doesnt work with wrong port at all

Thew as3 client receives next the apiOK message.



Own Java client:

Code: Select all

Feb 4, 2010 5:42:33 PM it.gotoandplay.smartfoxclient.SmartFoxClient debugMessage
WARNING: Socket Error: Could not establish a connection!
java.lang.Exception: Could not establish a connection!
   at it.gotoandplay.utils.net.xmlsocket.XMLSocket.connect(XMLSocket.java:68)
   at it.gotoandplay.smartfoxclient.SmartFoxClient.connect(SmartFoxClient.java:1237)
   at de.bluebyte.socialsettlers.test.sfs.Client.handleEvent(Client.java:61)
   at it.gotoandplay.smartfoxclient.SFSEventDispatcher.dispatchEvent(SFSEventDispatcher.java:96)
   at it.gotoandplay.smartfoxclient.SmartFoxClient.parseConfig(SmartFoxClient.java:4166)
   at it.gotoandplay.smartfoxclient.SmartFoxClient.loadConfig(SmartFoxClient.java:899)
   at de.bluebyte.socialsettlers.test.sfs.Client.initialize(Client.java:52)
   at de.bluebyte.socialsettlers.test.sfs.Client.run(Client.java:28)
Feb 4, 2010 5:42:33 PM it.gotoandplay.smartfoxclient.SmartFoxClient debugMessage
INFO: Socket connection failed. Trying BlueBox
Feb 4, 2010 5:42:33 PM it.gotoandplay.smartfoxclient.http.HttpConnection send
INFO: [ Send ]: sfsHttp=connect
Feb 4, 2010 5:42:38 PM it.gotoandplay.smartfoxclient.SmartFoxClient debugMessage
INFO: [Sending]: <msg t ='sys'><body action='verChk' r='0'><ver v='158' /></body></msg>
Feb 4, 2010 5:42:38 PM it.gotoandplay.smartfoxclient.http.HttpConnection send
INFO: [ Send ]: sfsHttp=ce6b3cd7ebf51100622761ebf47cdadb%3Cmsg+t+%3D%27sys%27%3E%3Cbody+action%3D%27verChk%27+r%3D%270%27%3E%3Cver+v%3D%27158%27+%2F%3E%3C%2Fbody%3E%3C%2Fmsg%3E
Feb 4, 2010 5:42:44 PM it.gotoandplay.smartfoxclient.SmartFoxClient debugMessage
INFO: [ RECEIVED ]: <cross-domain-policy><allow-access-from domain='*' to-ports='9339' /></cross-domain-policy>, (len: 91)



SmartFoxJChat:

Code: Select all

Exception in thread "AWT-EventQueue-0" org.apache.mina.common.RuntimeIOException: Failed to get the session.
   at org.apache.mina.common.support.DefaultConnectFuture.getSession(DefaultConnectFuture.java:63)
   at it.gotoandplay.utils.net.xmlsocket.XMLSocket.connect(XMLSocket.java:56)
   at it.gotoandplay.smartfoxclient.SmartFoxClient.connect(SmartFoxClient.java:1237)
   at it.gotoandplay.smartfoxclient.examples.SmartFoxJChat.MainFrame.handleEvent(MainFrame.java:82)
   at it.gotoandplay.smartfoxclient.SFSEventDispatcher.dispatchEvent(SFSEventDispatcher.java:96)
   at it.gotoandplay.smartfoxclient.SmartFoxClient.parseConfig(SmartFoxClient.java:4162)
   at it.gotoandplay.smartfoxclient.SmartFoxClient.loadConfig(SmartFoxClient.java:899)
   at it.gotoandplay.smartfoxclient.examples.SmartFoxJChat.MainFrame.<init>(MainFrame.java:65)
   at it.gotoandplay.smartfoxclient.examples.SmartFoxJChat.MainFrame$18.run(MainFrame.java:720)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.net.ConnectException: Connection refused
   at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
   at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)
   at org.apache.mina.transport.socket.nio.SocketConnector.processSessions(SocketConnector.java:293)
   at org.apache.mina.transport.socket.nio.SocketConnector.access$800(SocketConnector.java:53)
   at org.apache.mina.transport.socket.nio.SocketConnector$Worker.run(SocketConnector.java:383)
   at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
   at java.lang.Thread.run(Thread.java:637)



Flash client (working):

Code: Select all

Socket connection failed. Trying BlueBox
[ Send ]: sfsHttp=connect
[Sending]: <msg t='sys'><body action='verChk' r='0'><ver v='161' /></body></msg>

[ Send ]: sfsHttp=c8e2f1d0edc1e43d78792efa9c126049%3Cmsg%20t%3D%27sys%27%3E%3Cbody%20action%3D%27verChk%27%20r%3D%270%27%3E%3Cver%20v%3D%27161%27%20%2F%3E%3C%2Fbody%3E%3C%2Fmsg%3E
[ RECEIVED ]: <cross-domain-policy><allow-access-from domain='*' to-ports='9339' /></cross-domain-policy>, (len: 91)
[ RECEIVED ]: <msg t='sys'><body action='apiOK' r='0'></body></msg>, (len: 53)
[Sending]: <msg t='sys'><body action='login' r='0'><login z='test'><nick><![CDATA[fucker666]]></nick><pword><![CDATA[]]></pword></login></body></msg>

[ Send ]: sfsHttp=c8e2f1d0edc1e43d78792efa9c126049%3Cmsg%20t%3D%27sys%27%3E%3Cbody%20action%3D%27login%27%20r%3D%270%27%3E%3Clogin%20z%3D%27test%27%3E%3Cnick%3E%3C%21%5BCDATA%5Bfucker666%5D%5D%3E%3C%2Fnick%3E%3Cpword%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C%2Fpword%3E%3C%2Flogin%3E%3C%2Fbody%3E%3C%2Fmsg%3E
[WARN] Connection error: Error #2048: Security sandbox violation: file:///Macintosh%20HD/Users/mikih/Downloads/connection%5FAS3/connection%5FAS3.swf cannot load data from 10.26.100.120:9338.
[ RECEIVED ]: <msg t='sys'><body action='logOK' r='0'><login n='fucker666' id='8' mod='0'/></body></msg>, (len: 90)
[Sending]: <msg t='sys'><body action='getRmList' r='-1'></body></msg>

[ Send ]: sfsHttp=c8e2f1d0edc1e43d78792efa9c126049%3Cmsg%20t%3D%27sys%27%3E%3Cbody%20action%3D%27getRmList%27%20r%3D%27%2D1%27%3E%3C%2Fbody%3E%3C%2Fmsg%3E
[ RECEIVED ]: <msg t='sys'><body action='rmList' r='0'><rmList><rm id='1' priv='0' temp='0' game='0' ucnt='0' maxu='99999' maxs='0'><n><![CDATA[default]]></n></rm></rmList></body></msg>, (len: 171)
[Sending]: <msg t='sys'><body action='autoJoin' r='-1'></body></msg>

[ Send ]: sfsHttp=c8e2f1d0edc1e43d78792efa9c126049%3Cmsg%20t%3D%27sys%27%3E%3Cbody%20action%3D%27autoJoin%27%20r%3D%27%2D1%27%3E%3C%2Fbody%3E%3C%2Fmsg%3E
[ RECEIVED ]: <msg t='sys'><body action='joinOK' r='1'><pid id='0'/><vars /><uLs r='1'><u i='8' m='0'><n><![CDATA[fucker666]]></n><vars></vars></u></uLs></body></msg>, (len: 152)
[ RECEIVED ]: <msg t='sys'><body action='uCount' r='1' u='1'></body></msg>, (len: 60)



I use all latest version!

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

Postby Lapo » 04 Feb 2010, 18:18

I was going to tell you that we don't see the problem on our side but actually we have found something after some tests.
Testing the Java API with Windows works perfectly, however I also asked my colleagues to test under Linux and we found that the communication seems to stop and the problem looks similar to what you have reported.

I would assume you are testing under Linux right?
Maybe there's a specific Linux bug related with the Java API. I am not able to say at the moment, but we'll take a look.
Lapo

--

gotoAndPlay()

...addicted to flash games
mikih
Posts: 11
Joined: 17 Jan 2008, 19:30

Postby mikih » 04 Feb 2010, 18:30

Yes, my testsystem is linux ~ mac os x snow leopard. java 6 64 bit.

Thanks for investigating!


We will also focus our research to that.



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

Postby Lapo » 05 Feb 2010, 16:25

Ok, I think one bug was found with the Java API using the BlueBox.
It seems that certain combinations of newline characters can create problems and this only appears when the client talks to an SFS instance running on Unix, while it works with Windows.

We are currently fixing the issue and hope to release and update of the Java API very soon.

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 11 Feb 2010, 18:00

Update:
The bug-fixed Java API are available for download at this address --> http://www.smartfoxserver.com/products/ ... d.php?d=57

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “BlueBox”

Who is online

Users browsing this forum: No registered users and 3 guests