Error when trying to connect to bluebox

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

Moderators: Lapo, Bax

m-productions
Posts: 7
Joined: 02 Jun 2009, 22:33

Error when trying to connect to bluebox

Postby m-productions » 02 Jun 2009, 22:37

It seems that a few people that I had test my system could not connect, so i figured it was time to upgrade and try out "bluebox". I have downloaded pro, and recompiled my flash file, all is good. I have all settings as defualt, (and port forward 8080 to this comp (server))

In the swf file, I told it to connect to port 9330 to force a bluebox connection, the flash then outputs [ Send ]: connect, however, instead of connecting, the server log outputs this nice wall of text.

java.net.ConnectException: Connection refused: connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:507)
at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:81)
at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:65)
at org.xsocket.stream.io.impl.IoProvider.openSocket(IoProvider.java:346)

at org.xsocket.stream.io.impl.IoProvider.createClientIoHandler(IoProvide
r.java:209)
at org.xsocket.stream.Connection.<init>(Connection.java:160)
at org.xsocket.stream.NonBlockingConnection.<init>(NonBlockingConnection
.java:394)
at org.xsocket.stream.NonBlockingConnection.<init>(NonBlockingConnection
.java:209)
at it.gotoandplay.utils.net.xmlsocket.XMLSocket.connect(XMLSocket.java:5
4)
at it.gotoandplay.smartfoxserver.httpbox.util.SFSHandshake.<init>(SFSHan
dshake.java:29)
at it.gotoandplay.smartfoxserver.httpbox.filter.SessionIDFilter.doFilter
(SessionIDFilter.java:114)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1148)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
87)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
65)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
52)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:53
5)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:880)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:409)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
.java:451)
Invalid connection = null
java.lang.NullPointerException
at it.gotoandplay.utils.net.xmlsocket.XMLSocket.send(XMLSocket.java:93)
at it.gotoandplay.smartfoxserver.httpbox.util.SFSHandshake.<init>(SFSHan
dshake.java:30)
at it.gotoandplay.smartfoxserver.httpbox.filter.SessionIDFilter.doFilter
(SessionIDFilter.java:114)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
Handler.java:1148)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
87)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
a:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
81)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
65)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
lerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
52)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:53
5)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnectio
n.java:880)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
va:409)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
.java:451)




When trying to open http://(my ip):8080/BlueBox/HttpBox.do

HTTP ERROR 500

Problem accessing /BlueBox/HttpBox.do. Reason:

null

Caused by:

java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:415)
at java.lang.Integer.parseInt(Integer.java:497)
at it.gotoandplay.smartfoxserver.httpbox.util.ClientActivityMonitor.(ClientActivityMonitor.java:40)
at it.gotoandplay.smartfoxserver.httpbox.ConnectionManager.(ConnectionManager.java:62)
at it.gotoandplay.smartfoxserver.httpbox.ConnectionManager.getInstance(ConnectionManager.java:50)
at it.gotoandplay.smartfoxserver.httpbox.HttpBox.init(HttpBox.java:76)
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:431)
at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:478)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at it.gotoandplay.smartfoxserver.httpbox.filter.SessionIDFilter.doFilter(SessionIDFilter.java:195)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
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:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:451)



I am using SFS 1.6.6
BlueBox: 1.0.5

My BlueBox.properties
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

# Uncomment if you have set serverMode=stand-alone
# client_idle_request_time=300

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



UPDATE: When I switch my config.xml to
<!-- Server IP and port number
<ServerIP>192.168.0.199</ServerIP> -->
<ServerIP>127.0.0.1</ServerIP>
<ServerPort>9339</ServerPort>

(aka 127.0.0.1 and no my normal computer)
http://(my ip):8080/BlueBox/HttpBox.do now gives
BlueBox
1.0.5
(c) 2007-2008 gotoAndPlay()


so, what am I doing wrong when I have it set to 192.168.0.199


edit 2: http://localhost:8080/BlueBox/HttpBox.go?debugCmd=main shows
HTTP ERROR 404

Problem accessing /BlueBox/HttpBox.go. Reason:

NOT_FOUND

Powered by Jetty://

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

Postby Lapo » 03 Jun 2009, 12:42

The problem is in the SFS config:
<ServerIP>192.168.0.199</ServerIP>

should be
<ServerIP>*</ServerIP>


Supposing that you're running SFS 1.6.5 or higher
Lapo
--
gotoAndPlay()
...addicted to flash games
m-productions
Posts: 7
Joined: 02 Jun 2009, 22:33

Postby m-productions » 03 Jun 2009, 17:53

haha, to think of all the things I tried and all the post I read for it to be something so simple. Thank you very much for your time!
gsv
Posts: 6
Joined: 15 Jan 2009, 21:08

Postby gsv » 29 Jun 2009, 15:32

Is there is a way to run BlueBox and have SmartFoxServer sitting on a single IP?
We have a server with SFS binding to one IP and apache on another, so we need to specify a single IP for SFS...

Lapo wrote:The problem is in the SFS config:
<ServerIP>192.168.0.199</ServerIP>

should be
<ServerIP>*</ServerIP>


Supposing that you're running SFS 1.6.5 or higher
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 30 Jun 2009, 13:11

Yes it is.
You only need to configure the BlueBox as "stand-alone" instead of "embedded" mode. (It is highly recommended that the IP is a private one, not a public one.)

Open your bluebox.properties file under the Server/ folder and change the following:

Point to SFS address

Code: Select all

sfsAddr=ww.xx.yy.zz


Change BlueBox mode

Code: Select all

serverMode=stand-alone


Uncomment this line and set the value to the <MaxUserIdleTime> setting you have in your SFS config.xml

Code: Select all

client_idle_request_time=300


It should be all.
The same steps are explained in the BlueBox f.a.q in section 9 of the documentation.
http://www.smartfoxserver.com/docs
Lapo

--

gotoAndPlay()

...addicted to flash games
gsv
Posts: 6
Joined: 15 Jan 2009, 21:08

Postby gsv » 30 Jun 2009, 21:44

I did that you suggested, but still no luck :(
Is there is a special way to start bluebox in standalone mode, or I just start SFS and it'll start the rest?
Also, is there is a log file for it, to see if it's working?

I can see jetty is listening on port 80 and admin interface is saying it's running...

My setup is:
apache @ IP1:80 as well on port 443
SFS @ IP2:443
jetty @ IP2:80

The way I test it: I close outgoing port 443 on my net and see if it'll tunnel trough BlueBox...


Another question, why is it "highly recommended that the IP is a private one, not a public one"? If I understand correctly if it'll be private IP, when everybody will have to go trough BlueBox, no? Is it a security issue?

Thanks in advance,


Lapo wrote:Yes it is.
You only need to configure the BlueBox as "stand-alone" instead of "embedded" mode. (It is highly recommended that the IP is a private one, not a public one.)

Open your bluebox.properties file under the Server/ folder and change the following:

Point to SFS address

Code: Select all

sfsAddr=ww.xx.yy.zz


Change BlueBox mode

Code: Select all

serverMode=stand-alone


Uncomment this line and set the value to the <MaxUserIdleTime> setting you have in your SFS config.xml

Code: Select all

client_idle_request_time=300


It should be all.
The same steps are explained in the BlueBox f.a.q in section 9 of the documentation.
http://www.smartfoxserver.com/docs
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 01 Jul 2009, 06:07

Is there is a special way to start bluebox in standalone mode, or I just start SFS and it'll start the rest?

This is correct. Only start SFS.

My setup is:
apache @ IP1:80 as well on port 443
SFS @ IP2:443
jetty @ IP2:80

This looks good.
Have you specified from client side that the BlueBox listens on port 80?
blueBoxIpAddress is the name of the property to set on the SmartFoxClient object.
Alternatively you can use an external configuration: http://www.smartfoxserver.com/docs/docP ... loadConfig

Another question, why is it "highly recommended that the IP is a private one, not a public one"? If I understand correctly if it'll be private IP, when everybody will have to go trough BlueBox, no? Is it a security issue?

I am referring to the IP that the BlueBox uses to talk to SmartFoxServer, not the public BlueBox address.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “BlueBox”

Who is online

Users browsing this forum: No registered users and 23 guests