Page 1 of 1

BlueBox and FreeBSD

Posted: 02 Mar 2009, 11:52
by avtogen
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.

Posted: 04 Mar 2009, 09:42
by Lapo
Can you show me the freebsd bluebox configuration file?
(it is located in Server/bluebox.properties)

thank you

Posted: 04 Mar 2009, 10:19
by avtogen
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

Posted: 04 Mar 2009, 11:52
by Lapo
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?"

Posted: 04 Mar 2009, 12:21
by avtogen
I have tried to use this option with no result :(

Posted: 04 Mar 2009, 13:08
by Lapo
can you provide more details?
are you getting errors? if so which errors?
also what jre are you using under FreeBSD?

Posted: 04 Mar 2009, 13:43
by avtogen
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.

Posted: 04 Mar 2009, 14:02
by Lapo
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

Posted: 04 Mar 2009, 14:04
by Lapo
Forgot one question, where do you put (which folder) the bluebox.properties when in standalone mode?

Posted: 05 Mar 2009, 10:10
by avtogen
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.

Posted: 06 Mar 2009, 08:04
by Lapo
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.

Posted: 11 Mar 2009, 16:52
by Lapo
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.