��� CFAvatar.com

 

14 May 2007
Running Bluedragon 6.2 Headless
Ubuntu Dapper Drake
After having my blog spammed by some friendly russians (thanks for the porn links )

I decided to implement the captcha functionality on the blog software used in running this site. (BlogCFM v1.14).

Keen to stop the spammers I quickly enable the captchas within the admin. Unfortunately  only to be greeted with a nasty error message when opening the comment pages:
 java.awt.image.BufferedImage class not found error.
Seems this is a common problem when running a Linux server in headless mode, java insists on X server funtionality for certain function call for example the the awt class. After some messing around the error changed to  java complaining aboout:
 error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory
Here then is the final solution to get Bluedragon Working in headless mode.

First install the required X-Server libraries for the awt class:
sudo apt-get install xlibs libxt6 libxtst6

NOTE: The above only works on Ubuntu versions prior to Dapper Drake, seems that xlibs no longer exits on later systems, apparently this library has been split up into several packages. However no one seems to know which ones, a recommendation was to just install the library xlibs-dev instead of xlibs.

Then open up the file StartBlueDragon.sh file within the bluedragon bin folder, and add the following to the options line:

 -Djava.awt.headless=true
The final code then looks like this:
#!/bin/sh
cd /opt/bluedragon-6.2
JAVA_HOME=/opt/bluedragon-6.2/jre
NEW_CLASSPATH=/opt/bluedragon-6.2/lib/BlueDragonServer.jar:/opt/bluedragon-6.2/lib/BlueDragon.jar:
NEW_CLASSPATH=$NEW_CLASSPATH:/opt/bluedragon-6.2/classes:
HEAPSIZES="-Xms16384k -Xmx131072k"
OPTIONS="-XX:+UseParallelGC -Daxis.ClientConfigFile=./config/bd-client-config.wsdd -Daxis.ServerConfigFile=./config/bd-ser
ver-config.wsdd -Djava.awt.headless=true"
"$JAVA_HOME/bin/java" -server $HEAPSIZES $OPTIONS -classpath "$NEW_CLASSPATH" com.newatlanta.webserver.BlueDragon &
NEW_CLASSPATH=
JAVA_HOME=


now restart bluedragon and your good to go.

P.S. To get the galleries working in blogcfm you need to install the latest patch when running the free version of bluedragon 6.2.. The patch fixes a bug in the cffile tag which causes the blog code to crash when uploading images.
Posted by marcel at 11:11 PM | Link | 0 comments