Page 1 of 1

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

Posted: 22 Aug 2008, 11:10
by piratematt

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

I have a windows dedicated server with ukFast

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.

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:

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: [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.

Posted: 22 Aug 2008, 13:07
by Lapo
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 ( ... #downloads )
- Can you show the settings of the file?
- Check the SFS boot logs and make sure you don't have errors during that phase

Posted: 22 Aug 2008, 13:57
by piratematt

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/ HTTP/1.1" 500 6216
"your_ip" - - [22/08/2008:14:01:04 +0000] "GET /BlueBox/ 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/ HTTP/1.1" 200 0
"my_ip" - - [22/08/2008:14:26:17 +0000] "POST /BlueBox/ 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/ HTTP/1.1" 200 0
"my_ip" - - [22/08/2008:14:31:47 +0000] "POST /BlueBox/ HTTP/1.1" 200 0

My is as default
# {{ SmartFoxServer - BlueBox }}
# Configuration File
# version 1.0
# (c) 2004-2007 gotoAndPlay()


# Can be embedded or stand-alone

# These 2 are available only in stand-alone mode

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

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

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.


Posted: 22 Aug 2008, 14:07
by piratematt
Quick update.

I get a java.lang.NumberFormatException error when I go to: ... 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.

Posted: 22 Aug 2008, 14:17
by Lapo
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

Posted: 22 Aug 2008, 14:19
by piratematt

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:
in the 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.