smartConnect not working on sfs 1.6

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

Moderators: Lapo, Bax

amnesya
Posts: 18
Joined: 10 Dec 2007, 21:54

Postby amnesya » 20 Dec 2007, 09:38

I cannot see the issue on your example AdvanceCaht because

if i restart the server while client is logged in,

the client goes on :

** Socket connection failed. Trying BlueBox **
[ Send ]: connect
Error opening URL "http://127.0.0.1:8080/BlueBox/HttpBox.do"

and it doesn't seem to moove from that position when the server is started up again.

the problem I have is not this, by the way....

the problem is that when i connect again (and I do that attempting reconnection every X seconds if disconnected) ANY KIND of function to call the server DO NOT WORK !!!

this after having installed 1.6

this problem was not on 1.5 !!! it was perfectly working.

I'm trying to empty the project to provide you my login function, because filled with many not usefull things.
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 20 Dec 2007, 09:52

** Socket connection failed. Trying BlueBox **
[ Send ]: connect
Error opening URL "http://127.0.0.1:8080/BlueBox/HttpBox.do"

This can be normal if the connection attempt is done right after the server has been restarted. In fact it takes 10-20 seconds (or more depending on your extension) before the server comes back again.
The socket connection would fail anyways and the bluebox does too.

If you take an older version of the server you'll notice the same problem. If you attempt a connection immediately after a disconnection it may fail due to the fact that the server is not ready yet.

The AS 2.0 API have a parameter called socketConnectionTimeout which controls how much time the client should wait before trying the BlueBox connection.
Defualt value is 5000ms. (5 seconds).
If you raise this to 10-15 you will probably be able to reconnect between server restarts... if the server comes back within that time.

Btw, you didn't tell me what is happening when you kick the user or use the exit button. This is related with the problem you mentioned: reconnecting within the same application instance.
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 20 Dec 2007, 09:53

Additional note: socketConnectionTimeout can be set in the external client configuration file as well
Lapo

--

gotoAndPlay()

...addicted to flash games
amnesya
Posts: 18
Joined: 10 Dec 2007, 21:54

Postby amnesya » 20 Dec 2007, 11:00

I try reconnection every x seconds after disconnection, and I always get (when the server is on again) the domain policy etc...

so it communicates regularly with the server.

i think i must be more clear about the problem:

in case BB is ON and i'm NOT under proxy:

i connect 1° time on socket and it's ok (i log in, play etc...)

then i stop the server.

When the connection is newly established the client reconnects via bluebox, also if I'm not firewalled or proxied. It should go on proxy
this is problem 1

then being on BB if the server stops the disconnection is not detected by client.
this is problem 2

so i have turn it off (bad because it could be very useful)

in case BB is off (by setting smartConnect= false;) always without proxy.

i connect 1° time on socket and it's ok (i log in, play etc...)

then i stop the server.

When the connection is newly established the client seems to reconnect perfectly, but any action performed calling the server (starting with login) is not answered by the server !

this is problem 3

--------------------------------------------

i sent you an email with my fla.
flash8
as2

thanks
0jes
Posts: 2
Joined: 12 Jan 2009, 20:42

Postby 0jes » 26 Jan 2009, 22:20

i have the same problem but with as3
this is the error


cannot load data from
http://127.0.0.1:8080/BlueBox/HttpBox.do.
at it.gotoandplay.smartfoxserver.http::LoaderFactory()
at it.gotoandplay.smartfoxserver.http::HttpConnection()
at it.gotoandplay.smartfoxserver::SmartFoxClient()
0jes. - Jose Jimenez
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 28 Jan 2009, 07:59

In order for us to check these issues we need all the details.
Please read the posting rules -> viewtopic.php?t=3307
Thank you
Lapo

--

gotoAndPlay()

...addicted to flash games
wavedev
Posts: 2
Joined: 25 Jan 2010, 17:25

Postby wavedev » 25 Jan 2010, 17:41

I am adobe AIR (Flex) developer with FMS background and new to SFS I have just downloaded the 1.6.6 and trying out the samples.

While I was exploring SFSTemplate(flex) example and using the action script code to my custom AIR application (I was able to compile & run my application successfully) I found the SmartFoxClient.logout() is not working correctly.

When I invoke logout for the first time it works and I receive

[ RECEIVED ]: <msg t='sys'><body action='logout' r='0'></body></msg>, (len: 54)

But without quitting the application if I connect again and try to log out nothing happens

All I can see is
[Sending]: <msg t='sys'><body action='logout' r='-1'></body></msg>

sfs.isConnected returns true even after invoking sfs.logout() and the listener function [sfs.addEventListener(SFSEvent.onLogout, onLogout);] onLogout never invokes.

Can you let me know what is going wrong ?
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 25 Jan 2010, 17:56

But without quitting the application if I connect again and try to log out nothing happens

Connection and LogIn are two different things.

The connection takes care of the socket connection between your client and server. The login process allows your client to join one of the Applications running in the server.

If you log in Zone A and then logout you are still connected.
All you need to do is performing a new login in a new Zone.
Lapo

--

gotoAndPlay()

...addicted to flash games
wavedev
Posts: 2
Joined: 25 Jan 2010, 17:25

Postby wavedev » 26 Jan 2010, 10:22

Thanks a lot for the quick reply, yes you are right. Its perfect now :)
LynCh
Posts: 2
Joined: 14 Jan 2010, 17:37

Postby LynCh » 28 Jan 2010, 13:06

Hi,
I'm so new at SFS and I thought the problem mentioned in this topic is so similar with mine. So I decided to write here.

I installed SFS Pro on my machine -WindowsXP- working for about 3 weeks on it. But I could never make a socket connection with server for now. I can only connect with BB. I disabled the firewall, and tested the port via Telnet if it's open. All seems ok but, i couldn't find how to make a socket connection with server. I read almost all the similar topics in forum.

I'm using custom login on my extension but, the example files can't connect with socket too.

What am I doing wrong?
User avatar
Lapo
Site Admin
Posts: 21590
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 28 Jan 2010, 15:55

You said you used telnet to check. Does it work?
What is the result of the telnet?
Lapo

--

gotoAndPlay()

...addicted to flash games
LynCh
Posts: 2
Joined: 14 Jan 2010, 17:37

Postby LynCh » 28 Jan 2010, 18:04

Telnet connects if I write "Telnet 127.0.0.1 9339" but it doesn't connect if I write "Telnet 127.0.0.1 5339 -or something else-".

I figured it out by the way. I disabled the firewall of the router and It connects now. I still don't understand why Telnet connects before but I don't care :)

Thanks for reply...

Return to “BlueBox”

Who is online

Users browsing this forum: No registered users and 1 guest