Sunday, 26 August 2012

Running Jenkins CI on a Raspberry Pi

I've had this idea for some time of running my own Jenkins CI (continuous integration) server for building my mobile apps.  That was exactly what I intended to run on my Raspberry Pi when it arrived.  Now it has arrived, I thought I would share an issue I had so that others with the same problem can also solve it

My Raspberry Pi

My Pi is running Raspbian, which is Debian based, so theoretically installing Jenkins is as simple as running apt-get:
sudo apt-get install jenkins
This certainly installed it ok, but for some reason, it wouldn't start up.  Searching google revealed on possible issue regarding Java versions - specifically that Sun Java currently doesn't run on the Raspberry Pi.  A summary of how to fix that issue is:
sudo update-alternatives --config java
 
then chose OpenJDK followed by a reboot of the Pi.
Jenkins starts up as expected after boot.
However, my installation had already installed OpenJDK, so that wasn't my issue

As it turns out, the issue is a bug in Jenkins which leads Jenkins to attempt to extract itself into a full directory, resulting in a
java.io.IOException: No space left on device
in the logs (/var/log/jenkins/jenkins.log)

This issue was supposedly fixed in Jenkins version 1.443.  However my installation was 1.447, so it is still an issue (I have re-raised the bug as JENKINS-14934).  In the meantime the original bug JENKINS-11366 has a workaround which solved it for me:

Edit /etc/default/jenkins and change the line starting JENKINS_ARGS so that it references JENKINS_HOME instead of /var/run
JENKINS_ARGS="--webroot=$JENKINS_HOME/war --httpPort=$HTTP_PORT --ajp13Port=$AJP_PORT"
Jenkins on my Raspberry Pi

Monday, 13 August 2012

No cursor in Ubuntu linux 11.10

I've had this weird problem lately on Ubuntu 11.10 (64 bit) - I only seem to have a cursor in some windows and never in any of the system windows (desktop, unity bar etc). Well today it was winding me up so I decided to try and fix it

A quick google got me this page: No Cursor in Ubuntu 11.04 with a Legacy Nvidia Card. Not the right version of Ubuntu I know, and I have no idea what video card I have either, as the system info shows it as 'unknown'. But I figured I'd try it anyway

Steps from that page:
1. Open a terminal window 2.
Stop the x server: sudo service gdm stop
3 Uninstall the nouveau driver: sudo apt-get --purge remove xserver-xorg-video-nouveau
4. Reboot the machine

When I got the step 2 though, it said the gdm service wasn't found, so I just did step 3. This unfortunately stopped the cursor moving at all! So I reinstalled the nouveau driver, and now it works! Now idea why!

So for anyone who needs this, my steps were:

1. Open a terminal window
2 Uninstall the nouveau driver: sudo apt-get --purge remove xserver-xorg-video-nouveau
3. Reinstall the nouveau driver: sudo apt-get install xserver-xorg-video-nouveau

And all was well with the world again :)