Page 1 of 1

Where exactly is BlueBox looking for bluebox.properties?

Posted: 20 Nov 2009, 22:37
by sneedsquatch
I am trying to get a standalone BlueBox running on a dedicated server. I have followed the directions in the BlueBox faq:
http://www.smartfoxserver.com/docs/docPages/blueBox/faq.html

I am running Debian linux (squeeze/testing) and performed the following:
    Installed sun's jre: aptitude install sun-java6-jre
    Installed Jetty: "aptitude install jetty"
    Copied BlueBox.war to /usr/share/jetty/webapps
    Modified bluebox.properties and copied it to /usr/share/jetty
It appears that jetty is not able to find the bluebox.properties file:
674 [main] INFO org.mortbay.log - jetty-6.1.x
778 [main] INFO org.mortbay.log - Deploy /etc/jetty/contexts/javadoc.xml -> org.mortbay.jetty.handler.ContextHandler@12d7a10{/javadoc,file:/usr/share/doc/libjetty-java/api/}
45242 [main] INFO org.mortbay.log - Extract file:/var/lib/jetty/webapps/BlueBox.war to /var/cache/jetty/data/Jetty__8080_BlueBox.war__BlueBox__.mc3dy0/webapp
::::::::::: { BlueBox INITED } ::::::::::::
: :
: Version 1.0.5 -- (c) 2008 gotoAndPlay() :
: :
:::::::::::::::::::::::::::::::::::::::::::
java.io.FileNotFoundException: bluebox.properties (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at it.gotoandplay.smartfoxserver.httpbox.util.LibUtil.<clinit>(LibUtil.java:32)
at it.gotoandplay.smartfoxserver.httpbox.filter.SessionIDFilter.init(SessionIDFilter.java:59)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:534)
at org.mortbay.jetty.start.daemon.Bootstrap.start(Bootstrap.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)


Note that the exception shows the path to BlueBox.war as /var/lib/jetty/webapps/BlueBox.war. This is because /var/lib/jetty/webapps is a link to /usr/share/jetty/webapps.

I have tried copying bluebox.properties in any place I thought it may be accessible and restarting jetty:
    /etc/jetty
    /usr/share/jetty/webapps
    /usr/share/jetty/webapps/root
    /usr/share/jetty/lib
    /usr/share/jetty/lib/ext
    /usr/share/java/lib
    /var/cache/jetty

There has got to be a simple answer to this, such as "copy the file to this directory". If this has never been done on Debian before, then what linux operating systems have you had success with?

Posted: 23 Nov 2009, 11:46
by Lapo
Hi there,
we have never tested under Debian using "aptitude" and I suspect the problem might come from that, because the Jetty files are not all contained under the same folder.

We normally recommend to simply download the Jetty package directly from their website and unarchive it to a folder of your choice.
Next step is copying the BlueBox .war as you did correctly and deploy the bluebox.properties file at the root level of Jetty, in other words at the same level of the start.jar file (I am going by memory, hope to be right on file names)

Finally you should edit the properties file, changing the BlueBox mode, pointing it to the SmartFoxServer instance and uncommenting the last line.

Posted: 04 Sep 2010, 11:23
by m4io
Same problem here. Trying Jetty on Debian in stand-alone mode.

BlueBox.war can't find the bluebox.properties and I've copied it into nearly all directories that are related to jetty. Perhaps it would be nice if you could display in the log from which absolute path BlueBox tried to load the properties file.

Installing Jetty from source or by downloading binaries and bypassing the package installers is basically Bad Practise on production machines.

In other words ; from which path does BlueBox try to load the bluebox.properties ?

Posted: 07 Sep 2010, 08:37
by Lapo
My recommendation for the installation is the following:

1- unzip the Jetty distribution under any folder in your home directory
2- copy the BlueBox.war file from the SFS distribution to your {jetty-folder}/webapps/
3- copy the bluebox.properties file to the {jetty-folder}/ and apply the necessary changes

This should work no matter what OS you are using. I tested under MacOS and Windows and didn't find any problems. I am also sure that my colleagues have done the same under Linux many times while we were testing.

IMPORTANT NOTE:
You will need to request a license update to use the BlueBox on an IP other than its default --> 127.0.0.1

The above installation process must work even without the license update but the client will probably perform very slowly.