BlueBox and FreeBSD

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

Moderators: Lapo, Bax

avtogen
Posts: 5
Joined: 02 Mar 2009, 10:34

BlueBox and FreeBSD

Postby avtogen » 02 Mar 2009, 11:52

Hello,

We are using SmartFoxServer Pro on FreeBSD-7.1-R.
For the clean tests, i perform fresh install of smartfox 1.6.2 + patch 1.6.5 + bluebox 1.0.5. Then download and compile test client (http://showcase.smartfoxserver.com/connectionAS3/connection_AS3.zip).
When the connection goes through bluebox, it fails with "Connection lost!" in client (firewall open). During this at some time bluebox debug-http page display information about active connections (netstat also shows an open connection to bluebox, which closed down after a while).

I made the same actions on the linux-machine and everything works perfectly.

Ok, then I decided redirect http-connection from freebsd to bluebox on linux using nginx. Install jetty on linux and run bluebox with serverMode=stand-alone in their config (using faq http://www.smartfoxserver.com/docs/docPages/blueBox/faq.html).
Scheme of connections: client -> nginx on freebsd -> bluebox on linux -> smartfox on freebsd.
But when attempting to connect i receive an error in the jetty logs: "SFS Handshake failure!"

Well, modify scheme: client -> bluebox on linux (stand-alone mode) -> smartfox on linux. Same result: "SFS Handshake failure!".
But! When i use sfsAddr=127.0.0.1 and serverMode=stand-alone all works perfectly!

The results, which I got for myself:
1) At freebsd bluebox not working (neither embedded or stand-alone mode (stand-alone mode i trying with tomcat));
2) In linux bluebox work only in embedded mode or in stand-alone with sfsAddr=127.0.0.1

Now I use a temporary work scheme: real (not test) client -> nginx on freebsd -> bluebox on linux (stand-alone, sfsAddr=127.0.0.1) -> ssh-tunnel (proxy connect from 127.0.0.1 on linux to 127.0.0.1 on freebsd) -> smartfox on freebsd.

P.S.: Sorry for a complicated story, and bad English :).

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

Postby Lapo » 04 Mar 2009, 09:42

Can you show me the freebsd bluebox configuration file?
(it is located in Server/bluebox.properties)

thank you
Lapo
--
gotoAndPlay()
...addicted to flash games
avtogen
Posts: 5
Joined: 02 Mar 2009, 10:34

Postby avtogen » 04 Mar 2009, 10:19

For embedded mode it does not differ from the default:

Code: Select all

#:::::::::::::::::::::::::::::::::::::::::::::::::::::::
# {{ 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
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 04 Mar 2009, 11:52

It lacks one extra parameter which cannot be obtained from SFS in standalone mode, called client_idle_request_time.
Example:

Code: Select all

client_idle_request_time=300


Take a look at the BlueBox faq -> http://www.smartfoxserver.com/docs/docP ... x/faq.html
at the question "How do I run the BlueBox on a dedicated server?"
Lapo

--

gotoAndPlay()

...addicted to flash games
avtogen
Posts: 5
Joined: 02 Mar 2009, 10:34

Postby avtogen » 04 Mar 2009, 12:21

I have tried to use this option with no result :(
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 04 Mar 2009, 13:08

can you provide more details?
are you getting errors? if so which errors?
also what jre are you using under FreeBSD?
Lapo

--

gotoAndPlay()

...addicted to flash games
avtogen
Posts: 5
Joined: 02 Mar 2009, 10:34

Postby avtogen » 04 Mar 2009, 13:43

When running on freebsd in embedded mode - no errors (because I think that smartfox supress stdout from internal jetty).

On linux - error "SFS Handshake failure!" in external jetty (if stand-alone mode and sfsAddr<>127.0.0.1)

JRE:
java version "1.6.0_07"
Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02)
Diablo Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)

also tried vith:
java version "1.6.0_03-p4"
Java(TM) SE Runtime Environment (build 1.6.0_03-p4-root_19_feb_2009_12_58-b00)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_03-p4-root_19_feb_2009_12_58-b00, mixed mode)

This is latest version of java from FreeBSD ports collection.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 04 Mar 2009, 14:02

When running on freebsd in embedded mode - no errors (because I think that smartfox supress stdout from internal jetty).


1- Errors (if any) are anyways sent in the log files
2- If you simply point your browser to http://ipAddr:8080/BlueBox/HttpBox.do
You should see a simple welcome page
If you get an error, then I'd like to know the details.

Let me know if it works in regular, embedded mode, then we'll see what's wrong with the standalone
Lapo

--

gotoAndPlay()

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

Postby Lapo » 04 Mar 2009, 14:04

Forgot one question, where do you put (which folder) the bluebox.properties when in standalone mode?
Lapo

--

gotoAndPlay()

...addicted to flash games
avtogen
Posts: 5
Joined: 02 Mar 2009, 10:34

Postby avtogen » 05 Mar 2009, 10:10

1- Errors (if any) are anyways sent in the log files

Perhaps it does not flow to STDERR, because it's not a exception of java.
Anyway in stand-alone mode i see:
"WARNING: BlueBox<->SFS Handshake failure!"
In embedded mode, I do not see anything.

2- If you simply point your browser to http://ipAddr:8080/BlueBox/HttpBox.do
You should see a simple welcome page
If you get an error, then I'd like to know the details.

Yes, I see the page without errors.

Forgot one question, where do you put (which folder) the bluebox.properties when in standalone mode?

In ROOT forder jetty, or, in the current working directory while in tomcat.
Otherwise, the file is not located and the application does not start.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 06 Mar 2009, 08:04

We're installing FreeBSD on a virtual machine and we're going to perform a few tests. I will report our findings as soon as possible.
Also I am thinking of pre-packaging the standalone BlueBox to simplify the setup.

One more note... you have mentioned Tomcat. Actually the BlueBox can only be run under the Jetty web-server, because it uses special http-related features not available in most common servlet containers.
Lapo

--

gotoAndPlay()

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

Postby Lapo » 11 Mar 2009, 16:52

Update: After struggling for many hours with Freebsd under Virtual Box configuring the network I am sorry to say that we abandoned the idea of testing it :(
We tested under Linux and Windows to make sure and I can confirm that the steps provided in the BlueBox f.a.q for setting up a stand-alone BlueBox are correct.
With this said I would expect the same behavior under any other Sun Java Runtime implementation, since there aren't any other dependencies.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “BlueBox”

Who is online

Users browsing this forum: No registered users and 15 guests