Page 1 of 1

Bluebox - simple how do I use it?

Posted: 04 Mar 2008, 08:04
by mixart
I have upgraded to SFPro 1.6.0 and recompiled my SWF with the latest API. From what I have read "no code adjustments need to be made to use bluebox, simply recompile".

However, when I got to my SFS Admin tool and click the bluebox monitor it always says "HTTP Server: Not Running". Does that just mean that bluebox is turned off? If I turn it on will it just start accepting bluebox connections?

Posted: 04 Mar 2008, 16:48
by Lapo
Yes, all you need is to enable the embedded web-server. To do so, simply open the config.xml file and scroll down until you reach the web-server settings.

Alternatively you can start it directly from the Admin Tool

Posted: 04 Mar 2008, 20:22
by mixart
After turning on the web server I get this message in my log file...

2008/03/04 16:02:36.001 - [ WARNING ] [id: 39] (WebServer.setCfgFile): Error while reading webserver config file: java.lang.NullPointerException

my jetty.xml is in place (and it just whatever the default settings were when I installed SFS).

My config.xml file looks like this (edited to remove some info):

<SmartFoxConfig>

<ServerSetup>

<ServerIP>xxxxxxxx</ServerIP>
<ServerPort>9339</ServerPort>

<AutoSendPolicyFile>true</AutoSendPolicyFile>
<PolicyAllowedDomains>
<AllowedDomain>mysite.com</AllowedDomain>
</PolicyAllowedDomains>

<MaxUserIdleTime>1800</MaxUserIdleTime>


<!-- Server Variables limits (-1 = unlimited) -->
<MaxRoomVars>-1</MaxRoomVars>
<MaxUserVars>-1</MaxUserVars>

<AntiFlood active="true">
<MinMsgTime tolerance="5">1000</MinMsgTime>
<MaxRepeatedMessages>3</MaxRepeatedMessages>
<WarningsBeforeKick>2</WarningsBeforeKick>
<WarningMessage><![CDATA[No flooding allowed!)]]></WarningMessage>
<KickMessage><![CDATA[You've been warned! No flooding! Now you're kicked]]></KickMessage>
<BanMessage><![CDATA[Stop Flooding!! You're being banned]]></BanMessage>
<BanAfter timeSpan="1">5</BanAfter>
</AntiFlood>

<BadWordsFilter active="true">
<FilterMode>filter</FilterMode> <!-- REMOVE or FILTER -->
<StripCharacters><![CDATA[,.;:_!$%&/#*-+]]></StripCharacters>
<Warnings>true</Warnings>
<FilterRoomNames>true</FilterRoomNames>
<FilterUserNames>true</FilterUserNames>
<WarningsBeforeKick>3</WarningsBeforeKick>
<WarningMessage><![CDATA[No swearing!)]]></WarningMessage>
<KickMessage><![CDATA[You've been warned! No Swearing! Now you're kicked]]></KickMessage>
<BanMessage><![CDATA[Stop Swearing! You're being banned!]]></BanMessage>
<BanAfter timeSpan="1">5</BanAfter>

<BadWordsList>
<badWord>blah</badWord>
</BadWordsList>
</BadWordsFilter>


<BanDuration>15778463</BanDuration> <!-- 6 months -->
<BannedLoginMessage>You have been banned!</BannedLoginMessage>

<OutQueueThreads>1</OutQueueThreads>
<ExtHandlerThreads>1</ExtHandlerThreads>
<MaxWriterQueue>50</MaxWriterQueue>
<MaxIncomingQueue>8000</MaxIncomingQueue>
<DeadChannelsPolicy>strict</DeadChannelsPolicy>

<MaxMsgLen>20000</MaxMsgLen>

<LogMaxSize>5000000</LogMaxSize>
<LogMaxFiles>5</LogMaxFiles>

<FileLoggingLevel>WARNING</FileLoggingLevel>
<ConsoleLoggingLevel>INFO</ConsoleLoggingLevel>

<AdminLogin>xxx</AdminLogin>
<AdminPassword>xxx</AdminPassword>

<AdminAllowedAddresses>
<AllowedAddress>*.*.*.*</AllowedAddress>
</AdminAllowedAddresses>

<IpFilter>10</IpFilter>

<!-- Enable / Disable remote zone info -->
<EnableZoneInfo>false</EnableZoneInfo>

</ServerSetup>

<WebServer active="true">
<CfgFile>webserver/cfg/jetty.xml</CfgFile>
</WebServer>

<zone config continued...

Posted: 06 Mar 2008, 23:52
by mixart
I moved:

<WebServer active="true">
<CfgFile>webserver/cfg/jetty.xml</CfgFile>
</WebServer>

to inside the <ServerSetup> tag in my config.xml and it seems to have removed the LOG errors I was having.

From what I can tell bluebox is working - how can I test it's working? I've not noticed any users in the BlueBox monitor in the Admin tool out of the 200 that have logged in today.

Posted: 07 Mar 2008, 06:49
by Lapo
to inside the <ServerSetup> tag in my config.xml and it seems to have removed the LOG errors I was having.

Off course, that's where it is supposed to be.
From what I can tell bluebox is working - how can I test it's working? I've not noticed any users in the BlueBox monitor in the Admin tool out of the 200 that have logged in today.

First of all your application must be compiled with the latest API coming with SFS 1.6.x
Once this is done the API will do the work of checking the socket connection and if it's not available use the BlueBox

how can I test it's working?

Simply block port 9339 (or whatever port you use with SFS) with a firewall and try connecting

Posted: 08 Mar 2008, 22:11
by mixart
Everything appears to be working now since I did a clean install of the latest 1.6.1. I've tested bluebox myself and it is working.

Thanks as always for your help.