Bluebox Server exception

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

Moderators: Lapo, Bax

TonyHsieh
Posts: 4
Joined: 24 May 2006, 19:04

Bluebox Server exception

Postby TonyHsieh » 19 Mar 2008, 08:03

Hi -

I'm using SmartFox Server 1.61 and it works fine.

But having problems with BlueBox (I don't know how to discern the version but the filesize of the BlueBox.war is 253968 )
BlueBox runs on port 7081 and I have iptables routing anything from 8080 and 80 to BlueBox.
SmartFox is running on 9336 and I have iptable routing 443 to Smartfox.

Prefer not to run Smartfox as root. (BTW the admin tool runs fine through this configuration via port 443)

Smartfox tries to use Bluebox.

The /BlueBox/HttpBox.do?debugCmd=main is giving us a 503 - service unavailable.

And it is giving us a 500 server error when we try to use it.

</head>
<body><h2>HTTP ERROR: 500</h2><pre>java.lang.NumberFormatException: null</pre>

<p>RequestURI=/BlueBox/HttpBox.do</p><h3>Caused by:</h3><pre>javax.servlet.ServletException: java.lang

.NumberFormatException: null

at it.gotoandplay.smartfoxserver.httpbox.HttpBox.init(HttpBox.java:84)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433)
at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:342)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:463)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1098)
at it.gotoandplay.smartfoxserver.httpbox.filter.SessionIDFilter.doFilter(SessionIDFilter.java:180)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:368)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Caused by: java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at it.gotoandplay.smartfoxserver.httpbox.util.ClientActivityMonitor.<init>(ClientActivityMonitor.java:40)
at it.gotoandplay.smartfoxserver.httpbox.ConnectionManager.<init>(ConnectionManager.java:62)
at it.gotoandplay.smartfoxserver.httpbox.ConnectionManager.getInstance(ConnectionManager.java:50)
at it.gotoandplay.smartfoxserver.httpbox.HttpBox.init(HttpBox.java:73)

... 22 more

</pre>

<h3>Caused by:</h3><pre>java.lang.NumberFormatException: null

at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at it.gotoandplay.smartfoxserver.httpbox.util.ClientActivityMonitor.<init>(ClientActivityMonitor.java:40)
at it.gotoandplay.smartfoxserver.httpbox.ConnectionManager.<init>(ConnectionManager.java:62)
at it.gotoandplay.smartfoxserver.httpbox.ConnectionManager.getInstance(ConnectionManager.java:50)
at it.gotoandplay.smartfoxserver.httpbox.HttpBox.init(HttpBox.java:73)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433)
at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:342)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:463)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1098)
at it.gotoandplay.smartfoxserver.httpbox.filter.SessionIDFilter.doFilter(SessionIDFilter.java:180)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:368)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
</pre>

<p><i><small><a href="http://jetty.mortbay.org/">Powered by Jetty://</a></small></i></p><br/>


bluebox.properties:
============
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::
# {{ 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=9336

# 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

Any help would be appreciated!

Thank you!
-- Tony
User avatar
Lapo
Site Admin
Posts: 20896
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 20 Mar 2008, 09:00

Hi Tony,
But having problems with BlueBox (I don't know how to discern the version but the filesize of the BlueBox.war is 253968 )

You can see the version number when the server starts, or you can check the server logs and look for the server-boot section.

Expected version is 1.0.3
(Btw, we're soon publishing a small update these days, keep checking the boards or make sure you subscribe to the newsletter)

From what you have explained it seems that everything is configured properly. The various iptables rules shouldn't affect the server and the only requirement is that the BlueBox points to the right TCP port in order to talk to SFS.

As a simple test can you double check that telnet 127.0.0.1 9336 works correctly?
Also do you see any errors at server start?
Can you send us the logs of the server boot?
Lapo
--
gotoAndPlay()
...addicted to flash games
TonyHsieh
Posts: 4
Joined: 24 May 2006, 19:04

Postby TonyHsieh » 21 Mar 2008, 06:38

Hi Lapo -

I downloaded your new BlueBox 1.0.4 and it all works now!

Except my Flash client keeps looking to port 8080 when it tries to find the BlueBox.

I updated the line 211 in SmartFoxClient.as and recompiled...

public var httpPort:Number = 80;

but it still calls BlueBox/HttpBox.do:8080.

What have I missed?

Thanks,
-- Tony
User avatar
Lapo
Site Admin
Posts: 20896
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 21 Mar 2008, 07:26

You don't need to do that. If you check the docs ( http://www.smartfoxserver.com/docs/docP ... index.html ) you will see the you can specify the blueBoxPort property from outside, and you can also use the external xml configuration mechanism to configure your client parameters (including the bbox settings)

cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
TonyHsieh
Posts: 4
Joined: 24 May 2006, 19:04

Postby TonyHsieh » 24 Mar 2008, 05:37

It is odd.

I'm sure my corporate firewall blocks everything except 80 and 443

Firebug tells me that it is attempting to use BlueBox for port 8080 even though I set blueBoxPort to 80 (also httpPort to 80).

But it (client using port 8080 for BlueBox) somehow works so I guess I can't complain.

Thanks Lapo!
-- Tony
User avatar
Lapo
Site Admin
Posts: 20896
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 24 Mar 2008, 06:58

TonyHsieh wrote:It is odd.
Firebug tells me that it is attempting to use BlueBox for port 8080 even though I set blueBoxPort to 80 (also httpPort to 80).

mmm, quite strange. But if it works it's probably Firebug that has gone bananas :D
Lapo

--

gotoAndPlay()

...addicted to flash games
teonicel
Posts: 7
Joined: 29 Feb 2008, 07:01
Location: Romania
Contact:

an workaround with bluebox port settings

Postby teonicel » 31 Mar 2008, 14:59

i've had the same problem, i've set the port on 443, in the jetty configuration file, in the application i've set smartfox.httpPort=443 before the smatfox.connect().

But when i checked my netstat the application still tried to connect on 8080, so after hours of trying to debug, me and my colleague give up and modified the SmartFoxClient.as and http.HttpConnection.as and changed the default 8080 port into 443, and after the port was changed it started working encountering no problem.

Also very important we had changed the crossdomain.xml with the new format for the latest flash player(if you see in the netstat trying to connect to port 843 it 's because of the flash player seaking for the socket configuration, but if you left it the old way it will work but you won't get any security).

Hope this helps you
there is always something to learn

Return to “BlueBox”

Who is online

Users browsing this forum: No registered users and 2 guests