BlueBox running fine, but I can't use it on my dedicated!

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

Moderators: Lapo, Bax

piratematt
Posts: 4
Joined: 22 Aug 2008, 10:35
Contact:

BlueBox running fine, but I can't use it on my dedicated!

Postby piratematt » 22 Aug 2008, 11:10

Hi,

I'm making a multiuser game which runs online; which will be for a commercial client.

I have a windows dedicated server with ukFast

78.109.165.127

This server runs SFS Pro with bluebox. It also serves my websites and the .swfs themselves

I've asked ukFast to unblock ports 9339 and 8080; which has been actioned correctly.

This means that standard connections to my games [experiments at the moment] work. But I also need to cater for corporate and unversity firewalls.

If I make the standard connection go to a blocked port - and attempt to play a game; it 'correctly' fails - and attemps to use bluebox
But it cannot connect.

However;
http://78.109.165.127:8080
http://78.109.165.127:8080/BlueBox/
Are both running.

But my trace out from my swf is
** Socket connection failed. Trying BlueBox **
[ Send ]: connect

and handleConnection returns a fail


I've created a client side config like this:
<SmartFoxClient>
<ip>78.109.165.127</ip>
<port>9334</port>
<zone>fishermansFriend_AnchorPull</zone>
<debug>true</debug>
<blueBoxIpAddress>78.109.165.127</blueBoxIpAddress>
<blueBoxPort>8080</blueBoxPort>
<smartConnect>true</smartConnect>
<socketConnectionTimeout>5000</socketConnectionTimeout>
<httpPort>8080</httpPort>
<httpPollSpeed>750</httpPollSpeed>
<rawProtocolSeparator>%</rawProtocolSeparator>
</SmartFoxClient>

The zone does exist, just to confirm that.

You will notice I've put port 9334 at the top. This is just a quick cheap way to get the standard connection to fail for this swf. As I cannot change the firewall here at work to block port 9339

You can see this in action:
www.onlythestrongest.com/FishermansLobby.swf [which is running on the same server] uses the above config file.

I've also uploaded pixelGame.swf ; the only change to recompile with my dedicated server ip.
As you know, this connects first via 9339, then attempts bluebox conection. This does not use a client config, - but bluebox will use the defaults of the same ip address and then 8080.

I cannot use port 80 for BlueBox - as mentioned as this is a hosted dedicated server.

I left jetty unchanged. As confirmed above; this is running on 8080
Other information I can give is that my cross-domain-policy is default to *.
But this shouldn't cause problems anyway; as I'm not spliting the project across domains [maybe I have to!!]

Is it not possible to use my dedicated server to run bluebox??? and serve websites?

Have I got to pay somebody to host a machine which doesn't serve webpages and is soley for bluebox purposes?

Sorry this is quite a long post.
I wanted to make it clear that bluebox is running correctly for the most part; and that standard connections are working fine.

Please feel free to connect via the admin tool
Hopefully I've made a simple mistake; or misunderstood something about the ports.

Thanks in advance for any help

Edit - I believe this may be similar to the apache|jetty question posted previously. Sorry that was the one previous post I missed.

However, I don't think I can get ukFast to put another network card into a hosted solution - and I don't fully understand that posted fix yet.
Matt
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 22 Aug 2008, 13:07

Everything is running fine with the exception of the BlueBox servlet itself which fires a server error.

A few tips:
- If you're not running BlueBox 1.0.4 I would recommend to update ( http://www.smartfoxserver.com/products/ ... #downloads )
- Can you show the settings of the bluebox.properties file?
- Check the SFS boot logs and make sure you don't have errors during that phase
Lapo
--
gotoAndPlay()
...addicted to flash games
piratematt
Posts: 4
Joined: 22 Aug 2008, 10:35
Contact:

Postby piratematt » 22 Aug 2008, 13:57

Hi,

Thanks for the quick response Lapo.

I was running BlueBox 1.0.3 - but I've now patched this, and also applied the SmartFox Server update released yesterday

I'm afraid I'm still hitting the same problem though.

Looking at the recent server logs, you and I have both been recorded doing this:


"your_ip" - - [22/08/2008:14:00:36 +0000] "GET /BlueBox HTTP/1.1" 302 0
"your_ip" - - [22/08/2008:14:00:36 +0000] "GET /BlueBox/ HTTP/1.1" 200 862
"your_ip" - - [22/08/2008:14:00:36 +0000] "GET /BlueBox/bb_logo.gif HTTP/1.1" 200 1909
"your_ip" - - [22/08/2008:14:00:46 +0000] "GET /BlueBox/HttpBox.do HTTP/1.1" 500 6216
"your_ip" - - [22/08/2008:14:01:04 +0000] "GET /BlueBox/HttpBox.do?debugCmd=main HTTP/1.1" 500 6216
"my_ip" - - [22/08/2008:14:23:31 +0000] "GET /crossdomain.xml HTTP/1.1" 304 0
"my_ip" - - [22/08/2008:14:23:32 +0000] "POST /BlueBox/HttpBox.do HTTP/1.1" 200 0
"my_ip" - - [22/08/2008:14:26:17 +0000] "POST /BlueBox/HttpBox.do HTTP/1.1" 200 0
"my_ip" - - [22/08/2008:14:27:59 +0000] "GET /BlueBox/ HTTP/1.1" 304 0
"my_ip" - - [22/08/2008:14:28:00 +0000] "GET /BlueBox/bb_logo.gif HTTP/1.1" 304 0
"my_ip" - - [22/08/2008:14:29:30 +0000] "GET /crossdomain.xml HTTP/1.1" 200 208
"my_ip" - - [22/08/2008:14:29:30 +0000] "POST /BlueBox/HttpBox.do HTTP/1.1" 200 0
"my_ip" - - [22/08/2008:14:31:47 +0000] "POST /BlueBox/HttpBox.do HTTP/1.1" 200 0


My bluebox.properties is as default
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::
# {{ SmartFoxServer - BlueBox }}
# Configuration File
# version 1.0
#
# (c) 2004-2007 gotoAndPlay()
# www.smartfoxserver.com
# www.gotoandplay.it
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::

log_level=FINER
log_folder=./logs/
log_max_size=100000
log_max_files=5

# Can be embedded or stand-alone
serverMode=embedded

# These 2 are available only in stand-alone mode
sfsAddr=127.0.0.1
sfsPort=9339

# This value should always be > 20. A value of 30 is recommended.
client_idle_time=30

# Allows runtime debugging
# You can point the browser to -> http://hostname:port/BlueBox/HttpBox.go?debugCmd=main
debug_mode=true


Though I did briefly set sfsAddr to my server IP; but I understand this would make no difference in embedded mode anyway.

It might of use for you to know that my dedicated server runs Plesk on port 8443; but neither this or any of the other services should be clashing. At least I shouldn't have thought they would.

The smartfox server boot output displays no errors; I paid particular attention to the BlueBox INITIATED output but can see no problems.

Matt
piratematt
Posts: 4
Joined: 22 Aug 2008, 10:35
Contact:

Postby piratematt » 22 Aug 2008, 14:07

Quick update.

I get a java.lang.NumberFormatException error when I go to:

http://78.109.165.127:8080/BlueBox/Http ... ugCmd=main

which I assume must be the same error Lapo encountered.

I'm running Java 1.6.0_07

However this same version of java is working fine with bluebox on a test machine on our internal network.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 22 Aug 2008, 14:17

There's quite a stupid error :(
By checking the error output fired by the BlueBox, I've found this:
java.lang.NumberFormatException: For input string: "30 "


Sooo... this means that you simply have 2 or more white spaces after the number that break the Java string-to-number conversion.

( on a side note is quite disappointing that Integer.parseInt does not trim the spaces etc..., not to talk about the NumberFormatException :roll: ... anyways it's a well known pitfall, and we should have done the trimming manually to avoid these annoying loss of time... sorry for the rant :) )

Moral of the story ... simply make sure to clear those white spaces and you should be up and running.

Hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games
piratematt
Posts: 4
Joined: 22 Aug 2008, 10:35
Contact:

Postby piratematt » 22 Aug 2008, 14:19

Lapo,

I've discovered the problem.
It was a tiny, silly mistake I'm afraid

I had a hidden space at the end of this line:
client_idle_time=30
in the bluebox.properties file

It was only when I replicated the java error I guessed what the problem was with the number error

I must have accidentally introduced a space bar key after the 30 in my enthusiasm to set up the server.

Many thanks for your help; and I'm sorry it turned out to be such a silly mistake on my part.

Matt

Return to “BlueBox”

Who is online

Users browsing this forum: No registered users and 9 guests