BIND Foo Linux

BIND Journal Foo

After doing some updates to my DNS set up I ran some standard checks. And it took me a while to realize that for some reason my zone didn’t load correctly and the secondary server was used.

So I dove into the logs and low and behold I saw this:

zone journal rollforward failed: journal out of sync with zone
zone not loaded due to errors.

And it dawned on me. I am currently implementing my own little dynamic DNS updater and all the updates are stored in a journal. Fine, I can re-run my tests and simply remove that journal (.jnl files. In Debian based distributions they are in /var/lib/bind) before restarting BIND.

That works of course but should not the way how you should handle things. Especially not, if you need the content of the journal. So here is the correct way of doing it:

  1. rndc freeze
  2. apply changes to zone file
  3. rndc reload
  4. rndc thaw
Foo Linux MySQL

Re-Assign Host Access Permission For User In MySQL Foo

Changing the configuration of a VPN can have interesting side effects. In my case I had to open up the host permissions for my MySQL users and databases from a /24 to a /16 network. Should be easy… and it actually is. Here are the SQL commands you have to execute to perform such an update:

update mysql.user set host = '10.42.%' where host = '10.42.42.%;
update mysql.db set host = '10.42.%' where host = '10.42.42.%;
flush privileges;

You can of course go crazy in the where clause and in- or exclude everything you want.

Happy SQL-ing.

Foo Linux Ubuntu

Wicd On Ubuntu Fails To Start Foo

Running Ubuntu, like most mainstream Linux distribution, means nowadays automatically that your computer gets exposed to the NetworkManager and its sideeffects. Maybe this tool might work for some desktop users, but it definitely never worked for me. It is cumbersome to configure, doesn’t like if an interface is managed manually or you want to change it back to automatic. It has major problems with similar IP ranges for different locations…

Anyways, I digress. I tried a lot of versions of the NetworkManager and it actually got worse and worse. Switching back to manually editing /etc/network/interfaces is not really spouse compatible either. The decision was made, lets install an alternative: wicd.

I think there is enough on the internet on how to transition from NetworkManager to wicd, like this official one here from Ubuntu’s own help pages.

After all is set and done you should have wicd running and you should be able to use the widget of your favorite desktop environment to configure it. But not so in my case. All I saw was that wicd failed to start. And a lot of digging unvealed finally a bug and it is even filed (Launchpad Bug Report).

In short, it is a problem with how the symlinks for resolv.conf are set up. So here is the quick workaround to get wicd to work:

rm /etc/resolv.conf
ln -s /run/resolvconf/resolv.conf
rm /var/lib/wicd/resolv.conf.orig
ln -s /run/resolvconf/resolv.conf /var/lib/wicd/resolv.conf.orig

After that sequence you should be able to start wicd. Happy networking.

Foo Hardware Linux

Netgear PS121v2 Print Server Linux Foo

It is always fun to re-activate some old hardware. We had this HP laser printer sitting there with a Netgear PS121 (v2!) and it was just begging me to use it. So I thought, that is a quick and easy set up. Well it would’ve been if it didn’t have some nice surprises for me.

We had some other machines using that printer and it was an easy thing to get the configuration details from Windows. They all printed to a raw queue on port 9100. That sounds great. So I quickly set up the printer in a similar way using the PCL3 driver for the good old HP. The printer received data and started printing the test page. And it did a good job in starting it, but it printed only half the page. Afterwards the printer seemed dead. When I took a look at the print server I could see that it was switched off. Which is odd, because the print server does not have a power switch.

Anywhoo, I tried it again after restarting the print server. And I got the same result: Half a page printed and a switched off print server. A little bit digging on the internet revealed that I am not alone with that problem and that nobody knows how to fix it.

So I went with plan B and checked what ports are open so that I can try other options. Here is what nmap gave me:

Host is up (0.0078s latency).
Not shown: 993 closed ports
21/tcp   open  ftp
23/tcp   open  telnet
80/tcp   open  http
139/tcp  open  netbios-ssn
515/tcp  open  printer
631/tcp  open  ipp
9100/tcp open  jetdirect

Nmap done: 1 IP address (1 host up) scanned in 0.17 seconds

That looked promising and seeing ports 631 and 515 made me happy. But I knew out of experience that IPP will be most likely a pain in the behind to set up. So I went with LPD, but I needed the queue. So lets get into the web interface and read the queue information.

If I would’ve remembered the password for the print server web interface this would’ve been an easy task. Brute force password guessing gave me, after a lot of swearing, finally access to the server’s interface.

In the Server Status page you can find the queue name in the field Default Name in the form of PS******. Now comes the part that is important to know. You have to add a _P1, the port number, at the end in order to get the full queue name. This is of course not mentioned anywhere in the user manual and without it, it won’t print.

So your URI for the print server will look something like this:


Happy printing and don’t forget this applies only to v2 of the print server. The older v1 is supposedly a different piece of hardware with most likely different problems.

Foo Hardware Linux

Ubuntu Sleep Foo Resolved… Finally…

The deed is done!


If you don’t know what I am talking about, please read here, here and here.

I finally had the time to get down and dirty (literally!) and change the power supply. Well, the old one died on me and I had to replace it. Now the old 650W rests in peace while a brand new 850W does the job. And guess what, I was right. Replacing the power supply solved the “random” sleep problems of my server.

Finally I can watch TV, leave the office and do other stuff without having to fear that my server is in stand by.

And now to the next step. Get the OS moved to the new SSD. Not only a non-sleeping server, but also a fast one.

Although… my wife most likely to first clean the carpet…

Foo Hardware Linux

Harddisk Foo

I had my fair share of harddisk failures in the past and last night I got hit again. If anybody had problems accessing my site, then please accept my apologies. One of the hard drives in my server failed, which in itself is covered by the software RAID. But for an unknown reason the MySQL server had some issues coming back to life. The InnoDB structures were destroyed and I had to recover all databases from backup.

All is back up and running now, except of course for the failed drive. And I am working on moving everything to a different machine as soon as possible.

I’ll keep you posted.

Foo Linux Medibuntu

R.I.P. Medibuntu

While trying to update my desktop box, which is still running Quantal, I saw these nice error messages:

W: Failed to fetch  404  Not Found

W: Failed to fetch  404  Not Found

W: Failed to fetch  404  Not Found

W: Failed to fetch  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.

If course I first suspected my flaky TWC internet connection to be the issue here. But after trying to access the URL’s in /etc/apt/sources.list.d/ I saw… nothing.

Long story, short, medibuntu reached it’s end of life and after all, it is not needed anymore. All but good ol’ libdvdcss is part of the standard Ubuntu repository now. Here is the official blog post from Medibuntu’s maintainer Gauvain Pocentek: The end of Medibuntu.

Please refer to Jonathan Ridell’s blog post Medibuntu to Disappear, libdvdcss now direct from VideoLan on how to get libdvdcss to work on Ubuntu from now on.

Foo Linux

Missing modules for paramiko and gio in duplicity foo

Since I upgraded some of my servers to the latest LTS of Ubuntu, I saw nice warning messages in my duplicity backup reports. I know, these are just warnings and no errors, but I don’t like to see any warning in a backup report of mine. Here is a sample:

Import of duplicity.backends.giobackend Failed: No module named gio
Import of duplicity.backends.sshbackend Failed: No module named paramiko

The paramiko problem was resolved easily by installing the python-paramiko package. The gio warning was not so easy to find. But after some digging I found the culprit in python-gobject-2. The following command line fixes the above warnings on a Debian based distribution:

apt-get install python-paramiko python-gobject-2
Foo Linux

Eclipse Huge Tab Bar Foo

On my odyssey to find the right desktop environment for me I am back in Gnome land. In its latest incarnation Gnome 3 it looks nice and seems to be actually usable. I still don’t like that they removed more or less all useful configuration options. But finally there are some tools that make up for that (i.e. Gnome Tweak Tool).

But I am digressing. One of the many issues that I had afterwards was Eclipse. I don’t like using Eclipse (or in this case MyEclipse) in the first place but after the switch to Gnome it was worse than ever. And it was not so much Eclipse in itself it was more the fonts and the way the widgets were drawn. The fonts I fixed with a general font settings overhaul for the desktop. But certain parts of the UI just were huge and didn’t scale nicely. The toolbar on top fit always in one row but now I have two rows. And although the fonts were smaller the tabs and toolbars were drawn like they had to accommodate a much huger font. It is just an utter waste of space.


The solution was actually quite easy. Just open or create the GTK 2.0 configuration file (.gtkrc-2.0) in your home directory and add the following lines:

style "compact-toolbar"
  GtkToolbar::internal-padding = 0
  xthickness = 1
  ythickness = 1

style "compact-button"
  xthickness = 0
  ythickness = 0

class "GtkToolbar"                       style "compact-toolbar"
widget_class "*<GtkToolbar>*<GtkButton>" style "compact-button"

Afterwards restart Eclipse and all is good.

eclipse-tab-foo-after-1 eclipse-tab-foo-after-2

CloudPress Foo Linux Owncloud Projects Wordpress

CloudPress Foo

In the wake of all the NSA scandals I finally took the time and created a full blown cloud solution for my family. I used a lot of components that are readily available (Owncloud, Roundcube, WordPress, etc.) and could create a very well rounded solution for us. In order to integrate everything I used the Roundcube plugin for Owncloud and CloudPress to integrate with WordPress.

But of course I ran into trouble. The Roundcube plugin worked out of the box and I have no problem letting people set up their own accounts. But the CloudPress plugin to sync the user accounts made some trouble.

After some digging the problem was obvious. The file that you can download contains conflict tags from a CVS update. This is kinda odd but easy to fix. After I removed the tags and the broken/old code the sync worked fine but still some images of the plugin didn’t show up.

Some more digging and that was resolved as well. Now I have a nice solution for my family to write blog posts and collaborate. To make life easier for other people I decided to release the fixes that I applied. So please give a warm welcome to my own patches for CloudPress. And now click here to go to my project page.