I can not send request to rooms by bluebox

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

haha0738
Posts: 11
Joined: 20 Nov 2009, 04:30

I can not send request to rooms by bluebox

Postby haha0738 » 29 May 2014, 11:09

sfs-config.xml

Code: Select all

<!--
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   SFS2X Client Configuration file
   (c) 2011 gotoAndPlay
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-->

<SmartFoxConfig>

   <!-- Mandatory Settings -->
   <ip>XXX.XXX.XXX.XXX</ip>
   
   
   
   <port>9930</port> <!-- wrong port make sure that client connect by bluebox -->
   <zone>texas</zone>
   <!-- End Mandatory Settings -->
   
   <debug>true</debug>
   
   <httpPort>8080</httpPort>
   <useBlueBox>true</useBlueBox>
   <blueBoxPollingRate>500</blueBoxPollingRate>
   
</SmartFoxConfig>


this what I send to server but server do not have any response and error.
if I remove the room parameter server will have response.

Code: Select all


var sfsObj:SFSObject = new SFSObject();
sfsObj.putInt(GameVariableType.BUY_IN_CHIP, chip);
sfsObj.putInt(GameVariableType.SEAT_NO, seat);
sfsObj.putBool(GameVariableType.AUTO_BUY_IN, autoBuy);

return new ExtensionRequest("CLI2TXH_GAME_SIT_DOWN_PL", sfsObj, room);


Below is the debug message on clinet.
bluebox log file is empty.

Code: Select all

[SFS - INFO] Object going out:
   (sfs_object) p:
      (int) r: 3
      (sfs_object) p:
         (int) buy_in_coin: 200000
         (bool) auto_buy_in: true
         (int) seat_no: 0
      
      (utf_string) c: CLI2TXH_GAME_SIT_DOWN_PL
   
   (byte) c: 1
   (short) a: 13


My smartfox2x version is 2.6, but I update to 2.8. It's the same.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: I can not send request to rooms by bluebox

Postby Lapo » 29 May 2014, 17:01

Please check the server side logs for errors.
Are you sure the client is logged in?

Do you check the debug log of the client API? Do you see the message going out?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
haha0738
Posts: 11
Joined: 20 Nov 2009, 04:30

Re: I can not send request to rooms by bluebox

Postby haha0738 » 03 Jun 2014, 03:10

There are no errors on the server side. Bluebox logs are empty too.
The client actually logged in and join the room. I can see it from Admin Tool

https://www.dropbox.com/s/uz7d92jho20uxuq/2014-06-03_102402.png

Code: Select all

7734-7 | bitswarm.sessions.DefaultSessionManager |     | Session created: { Id: 3, Type: BLUEBOX, Logged: No, IP: null } on Server port: 0 <---> 0


I see the message below in the client

Code: Select all

[SFS - INFO] Object going out:
   (sfs_object) p:
      (int) r: 3
      (sfs_object) p:
         (int) buy_in_coin: 200000
         (bool) auto_buy_in: true
         (int) seat_no: 0
     
      (utf_string) c: CLI2TXH_GAME_SIT_DOWN_PL
   
   (byte) c: 1
   (short) a: 13


There are some errors in the client

Code: Select all

## SocketError: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2031: Socket Error. URL: 118.163.143.85"]

Code: Select all

## SecurityError: [SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048: Security sandbox violation: file:///D|/client/AmiTexasFacebookGame/bin/AmiPoker20.swf cannot load data from 118.163.143.85:9930."]
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: I can not send request to rooms by bluebox

Postby Lapo » 03 Jun 2014, 09:46

The two client-side "errors" are not a problem. That's just the Flash socket failing to connect to a non existent port.

You said this:
if I remove the room parameter server will have response.

Which is not very clear.

If you remove the room parameter from the Extension call, the request will be sent to the Zone-Level Extension, not the Room-Level Extension which is confusing.
Is this particular request that you are sending recognized by two Extensions?

Also, if it is true that removing the room parameter causes the server to reply, then this means you don't have a connection problem, otherwise you wouldn't receive a response in any case.

Is this correct all the times?
Have you tried testing locally? Does it happen all the times? I.e No response with Room param and response without it?
Lapo

--

gotoAndPlay()

...addicted to flash games
haha0738
Posts: 11
Joined: 20 Nov 2009, 04:30

Re: I can not send request to rooms by bluebox

Postby haha0738 » 04 Jun 2014, 04:11

I tried it locally. Everything works without bluebox.
It happens all the times. I can not send request to room level extension with bluebox, But I can receive the response which is sent by room level extension.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: I can not send request to rooms by bluebox

Postby Lapo » 04 Jun 2014, 08:03

Can you give me more details about your server version and client API version?
Is this a local test or a live test?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
haha0738
Posts: 11
Joined: 20 Nov 2009, 04:30

Re: I can not send request to rooms by bluebox

Postby haha0738 » 05 Jun 2014, 04:14

The version of my client api is 1.0.1. The server is 2.6.0
Local and live test have the same problem.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: I can not send request to rooms by bluebox

Postby Lapo » 05 Jun 2014, 07:50

It seems you are using a very old version of the API. I'd recommend to download the latest version, recompile your code and see if it helps
Here's the download page:
http://www.smartfoxserver.com/download/sfs2x#p=client
Lapo

--

gotoAndPlay()

...addicted to flash games
haha0738
Posts: 11
Joined: 20 Nov 2009, 04:30

Re: I can not send request to rooms by bluebox

Postby haha0738 » 06 Jun 2014, 08:43

I upgrade my client to 1.2.0 and server to 2.8.4.
It's the same.

Bluebox log is empty. There is no error on server.

I send request from client the http log file logged my request, but I can not see any error or message on smartfoxserver log.
Can I trace the bluebox on smartfoxserver?

logs/http/2014_06_06.request.log

Code: Select all

127.0.0.1 -  -  [06/六月/2014:07:43:18 +0000] "GET /admin/ HTTP/1.1" 304 0
127.0.0.1 -  -  [06/六月/2014:07:43:18 +0000] "GET /admin/swfobject.js HTTP/1.1" 304 0
118.163.143.85 -  -  [06/六月/2014:07:49:08 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 10
118.163.143.85 -  -  [06/六月/2014:07:52:03 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 40
118.163.143.85 -  -  [06/六月/2014:07:52:03 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 0
118.163.143.85 -  -  [06/六月/2014:07:52:03 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 113
118.163.143.85 -  -  [06/六月/2014:07:52:03 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 0
118.163.143.85 -  -  [06/六月/2014:07:52:08 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 0
118.163.143.85 -  -  [06/六月/2014:07:52:08 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 0
118.163.143.85 -  -  [06/六月/2014:07:52:23 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 9
118.163.143.85 -  -  [06/六月/2014:07:52:23 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 40
118.163.143.85 -  -  [06/六月/2014:07:52:23 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 0
118.163.143.85 -  -  [06/六月/2014:07:52:43 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 9
118.163.143.85 -  -  [06/六月/2014:07:53:04 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 40
118.163.143.85 -  -  [06/六月/2014:07:53:04 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 0
118.163.143.85 -  -  [06/六月/2014:07:53:24 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 9
118.163.143.85 -  -  [06/六月/2014:07:53:45 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 10
118.163.143.85 -  -  [06/六月/2014:07:54:00 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 40
118.163.143.85 -  -  [06/六月/2014:07:54:01 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 0
118.163.143.85 -  -  [06/六月/2014:07:54:19 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 40
118.163.143.85 -  -  [06/六月/2014:07:54:19 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 0
118.163.143.85 -  -  [06/六月/2014:07:54:21 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 9
118.163.143.85 -  -  [06/六月/2014:07:54:39 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 9
118.163.143.85 -  -  [06/六月/2014:07:54:39 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 40
118.163.143.85 -  -  [06/六月/2014:07:54:39 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 0
118.163.143.85 -  -  [06/六月/2014:07:54:41 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 10
118.163.143.85 -  -  [06/六月/2014:07:54:59 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 9
118.163.143.85 -  -  [06/六月/2014:07:55:01 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 10
118.163.143.85 -  -  [06/六月/2014:07:55:19 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 10
118.163.143.85 -  -  [06/六月/2014:07:56:00 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 40
118.163.143.85 -  -  [06/六月/2014:07:56:00 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 0
118.163.143.85 -  -  [06/六月/2014:07:56:20 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 9
118.163.143.85 -  -  [06/六月/2014:07:56:40 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 10
118.163.143.85 -  -  [06/六月/2014:07:56:41 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 40
118.163.143.85 -  -  [06/六月/2014:07:56:41 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 0
118.163.143.85 -  -  [06/六月/2014:07:57:01 +0000] "POST /BlueBox/BlueBox.do HTTP/1.1" 200 9
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: I can not send request to rooms by bluebox

Postby Lapo » 06 Jun 2014, 12:00

Thanks.
I have no idea what is going on with the code you are working with, but I can assure you that there is absolutely no problem whatsoever with sending Extension requests via BlueBox. Regardless of whether they are targeted at a Zone or Room.

What I find surprising is that you don't have any errors from client or server side.

You may want to turn on the DEBUG logging of the server and see if the request actually reaches the server or not. You can open the config/logs4j.properties and change the setting according to these instructions:
http://docs2x.smartfoxserver.com/Gettin ... figuration

Let us know what you find.
Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
haha0738
Posts: 11
Joined: 20 Nov 2009, 04:30

Re: I can not send request to rooms by bluebox

Postby haha0738 » 09 Jun 2014, 03:43

I found out the reason.
Because user.getSession().isConnected() of bluebox connection is false. I refuse the request.
Thanks for your help.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 73 guests