New domain name

Posted in General on August 24th, 2007 by Johan Huysmans – Be the first to comment

My personal domain name raskas.be has just been activated!

This means that all my websites are move to http://www.raskas.be.
The specific url for my blog is: http://www.raskas.be/blog
The RSS of my blog is now: feed:http://www.raskas.be/blog/feed/

Please update all your bookmarks and rss feed readers to point to the correct url!

With some mod_rewrite magic you can still browse to the old url but you will be automatically redirected to my new domain name.

RewriteEngine on
RewriteRule ^(.*)$ http://www.raskas.be/$1

On http://www.ilovejackdaniels.com/apache/mod_rewrite-cheat-sheet/ i found some nice cheat sheet about apache’s mod_rewrite.

Updated full backup script

Posted in Backup on August 19th, 2007 by Johan Huysmans – Be the first to comment

This week I updated the full backup page. We jumped from version 0.4 to 0.8.
Thanks to my colleagues: Raf, Fred and Jos the script is updated to meet our requirements.

Here are some of the major features added to the newest version:

  • You can choose if you want to keep a history (= full weekly backups and daily incrementals) or only 1 backup.
  • All information will be written to a logfile which can be mailed to some addresses when the script is done (previously this was done by an extra command in the cron).
  • After the backup we will check the size of the local data and the size of the backup, printed to the logfile.
  • We will check the free space on the backupdisk and print it to the logfile.

The behavior of the script can be configured with the variables at the top of the script.

Heartbeat error: Cannot write to media pipe 0

Posted in Linux SysAdmin on July 17th, 2007 by Johan Huysmans – Be the first to comment

Today I tested a heartbeat setup. Everything went fine until…

I performed a reboot of one of the hosts. The host came back and started to communicate with the other heartbeat. At that moment heartbeat started to generate ERROR messages. The load of heartbeat and the load of syslog increased because of the amount of error messages and my /var/log/messages file grew quite a bit.

When the problem started heartbeat was printing lots of information in the log files, but after some time only this messages appeared in the logs.


Jul 17 16:27:33 heartbeat: [2893]: ERROR: Cannot write to media pipe 0: Resource temporarily unavailable
Jul 17 16:27:33 heartbeat: [2893]: ERROR: Shutting down.
Jul 17 16:27:33 heartbeat: [2893]: ERROR: Message hist queue is filling up (200 messages in queue)

20 minutes after the first occurrence of this message the master heartbeat process killed itself. During this time it generated over 30000 times the above error.

The guys of #linux-ha helped me with this error and explained that it is caused by the serial link. The messages sent over the cable didn’t arrive in time.
The fix for it is easy, increase the baud in your ha config file.

My baud was first configured at 9600 and increasing it to 19200 fixed this error.

Hackergotchi

Posted in General on July 2nd, 2007 by Johan Huysmans – Be the first to comment

I recently learned a new word ;)

Hackergotchi

A hackergotchi is a picture of a writer used as an avatar to identify the author of a given RSS feed in blog aggregators.

http://en.wikipedia.org/wiki/Hackergotchi

You can see the Hackergotchi of each X-Tend blogger, including mine, on http://planet.x-tend.be

Create GPX files with your TomTom (2)

Posted in TomTom on June 28th, 2007 by Johan Huysmans – 3 Comments

An other application for the TomTom devices is nmealogger. This logger will log all the data received from the gps device into a file. This data includes the actual position, the current date and time, the amount and reception of the satellites, …
The format of information which is generated by a gps device is mostly in the NMEA format, it is also stored in a file in that format. The information of these files can be converted to any other format by gpsbabel.

The zip file you can download from the site contains a .cab file and a .toc file. The files are provided in that format because it can be installed from the TomTom HOME application.
That TomTom application isn’t working on linux therefore you must install it manually.
The .cab file is the only file we need. It is an archive file containing all files which need to be stored on the cf of the TomTom device. These files need to be extracted and the directory structure has to be intact.

[johan@raskas ~]$ file nmealogger_v1.4.cab
nmealogger_v1.4.cab: Microsoft Cabinet archive data, 686973 bytes, 16 files
[johan@raskas ~]$ cabextract nmealogger_v1.4.cab
Extracting cabinet: nmealogger_v1.4.cab
extracting nmealogger/nmealogger
extracting skin/Arial.ttf
...
extracting skin/tomtom.bmp
extracting sdkregistry/nmealogger.bmp
extracting sdkregistry/nmealogger.cap

Once you’re device is booted with the nmealogger files installed you will find a new menu entry. There you can start / stop the logging.

Create GPX files with your TomTom

Posted in TomTom on June 5th, 2007 by Johan Huysmans – 2 Comments

I wanted to turn my TomTom One GPS device into a tracking device, producing gpx files that can be used in several programs.

The TomTom software delivered with the device isn’t capable of producing these files, luckely it is possible to add software.

In my first TomTom blog post I mentioned Event Logger. This is such software you can install on top of your tomtom device, while still using your navigation sofware like before.
The Event Logger software is capable of syncing your time with the gps-satellites, automatically switching between day and night colors, logging events, logging tracks, …
The packages also includes a build of top which proves that the device is really running Linux.

The functionality of Event Logger can be tuned in a configuration file. Some basic actions, like enabling or disabling of features, can be triggered from a button within the graphical menu on your device.

The downside of this extra program on your navigation device is that it takes longer to boot and shutdown.
Recently I noticed that when the device is powered off it automatically reboots. Still haven’t found why it is rebooting, I hope I find the problem or it gets fixed in the next release.

Beryl and Java apps

Posted in Fedora, Xen on May 28th, 2007 by Johan Huysmans – 1 Comment

While using Beryl as my default window manager, I noticed that some java applications didn’t work correctly, for example the XenServer Client.
The application started correctly but I only saw a gray screen.
Whenever my Metacity window manager (that’s the one of gnome) was active, instead of Beryl, the application works as it was meant to be.

This problem is explained in the beryl wiki.
The solution is also mentioned there.

Because I’m using java 5 (1.5.0u11 from Sun) the fix is very simple.
I added following line at the end of /etc/bashrc.

export AWT_TOOLKIT=MToolkit

After restarting the X server the java applications works without any problems.

Reverse proxy with an internal https server

Posted in Linux SysAdmin on May 15th, 2007 by Johan Huysmans – 2 Comments

In my Reverse proxy of virtual hosts with apache 2 blog entry I showed how you can configure a reverse proxy. The only limitation is that the internal webserver must be http.

This limitation can be solved with 1 easy configuration line: SSLProxyEngine on.
All configuration lines needed to enable reverse proxy to an internal https servers are:

ProxyRequests off
SSLProxyEngine on
ProxyPass / https://blue.internal.x-tend.be/
ProxyPassReverse / https://blue.internal.x-tend.be/

If you want encryption between the clients on the internet and your proxy you have to configure you vhosts on the proxy to work with https. This doesn’t change anything about the reverse proxy configuration. You can still use both http and https on your internal connection.

Less than minimal

Posted in Fedora, Linux SysAdmin, Xen, kickstart on March 7th, 2007 by Johan Huysmans – 1 Comment

Last week I updated my CentOS base image document.
One important change was in the yum line.

Previously it would do a groupinstall of Base, which results in a total of 300 packages. This is the same amount of packages when it is installed from cd and minimal install is checked.
But this minimal install includes way to much and useless packages like pcmcia, irda, isdn, …
The groupinstall of Core gives a better result. Now only a bit more than 100 packages are installed. Even yum or openssh aren’t installed. So you will have to add some extra packages but at least you’re not stuck with all those unused packages and running services.

The same happens when you kickstart. By default it will install the base and core groups. But again this results in 300 packages. Just mentioning core or not mentioning base in the packages section doesn’t solve the problem.
Luckily there is an, undocumented, option for the packages section. You can pass –nobase if you don’t want to install the complete Base group. But now you will have to mention the Core group or it will install not enough packages.
This is how your packages section in the kickstart file can look like:

% packages --nobase
@ Core
yum
openssh-clients
openssh-server

Input/Output redirection

Posted in Linux SysAdmin on February 26th, 2007 by Johan Huysmans – 2 Comments

Everybody knows and uses output redirection to get the output of a command to a file.

With > you redirect STDOUT, with 2> you redirect STDERR and with &> you redirect both at the same time.

ls > output.txt
ls 2> error.txt
ls &> output_and_error.txt

But how do you get the output written to the screen AND to a file?

“tee” answers this question. This little program will accept text from STDIN and put in on STDOUT and write it to a file.
This is how you use it:

ls | tee output.txt