Category Archives: IT

Fixing daily cron “DB Update failed, database locked” error in Ubuntu

I had a problem with my Ubuntu 14.04 servers daily cron job sending an error mail every day which basically says just this:

DB Update failed, database locked

It seems that I am not alone. There are many posts on several forums about this problem. None of the suggested fixes worked in my case though the symptoms are basically the same. When the /etc/cron.daily/apt is run manually, it seems to work but when cron runs the the daily cron job, I always get the error email.

This error message email is quite useless and useless error emails can actually be dangerous as I had the habit of automatically deleting those cron.daily mails without even looking at them. “Yeah, it’s just the same old thing”. You shouldn’t do that, as you might one day miss some real problems.

Finally I got too frustrated with this and decided to take a deeper look at this and found a solution which fixed this in my case.

Executive summary

Uninstalling apt-xapian-index package fixed the problem:

sudo apt-get remove apt-xapian-index

Uhh, why?

I turned on verbose logging for the apt cron job. That way I was able to figure out that the problem occurs when the /etc/cron.daily/apt script tries to run update-apt-xapian-index.

     ...
     # now run apt-xapian-index if it is installed to ensure the index
     # is up-to-date
     if [ -x /usr/sbin/update-apt-xapian-index ]; then
         nice ionice -c3 update-apt-xapian-index -q -u
     fi
     ...

I had no idea what update-apt-xapian-index is and what it does. The man page didn’t really help. “update-apt-xapian-index – rebuild the Apt Xapian Index”. Oh really.

Googling didn’t help too at first. Wikipedia has some info about Xapian. But it seems that Synaptic, the Ubuntu graphical package manager probably uses Xapian. On my Ubuntu server I don’t use Synaptic so I don’t care if the Apt Xapian index is not updated. The usual apt-tools should still work perfectly. So I just removed the apt-xapian-index package and get no more daily reports about this “problem” 🙂

Disclaimer: Works for me. YMMV.

Windows 8.1 and the crippled Easy Transfer

My wife bought a new laptop and unfortunately it came with Windows 8 pre-installed. But… well… Lets just say that I would have preferred something else.

But anyway… Her previous laptop had Windows 7 and Microsoft has made a nice tool for transferring your files from one computer to another,  the Windows Easy Transfer tool. So copying all the important stuff  from the old Windows 7 laptop to the new Windows 8 laptop really was quick and easy using WLAN connection on our home network.

Then I updated the operating system of the new laptop to Windows 8.1. And then I remembered that Firefox and Thunderbird settings were not copied, but I knew that I could copy them using Windows Easy Transfer using some advanced settings.

Except that Windows Easy Transfer in Windows 8.1 was not so easy anymore. There was no way to connect to the old computer and after some googling I found this.

Windows 8.1 accepts Windows Easy Transfer files stored on a portable drive, but it doesn’t support the Easy Transfer Cable or the network location.

So thank you very much Microsoft. Seriously. WHY? Do you really think everybody is using your SkyDrive?

Fortunately the only data I still needed to transfer were those Firefox and Thunderbird data, and for that purpose there is a nice tool called MozBackup.

Garageband 6 still available after updating to the latest version

Photo by Gordon Irving is licensed under CC BY-NC-ND 3.0In December I updated my MacBook Air to OS X Mavericks and at the same time also the iLife applications to their newest versions. I’ve been only using GarageBand with BFD Eco as audio unit when playing drums and for a while I had no time for drums. One day I wanted to play drums but I just couldn’t get BFD Eco working with the new GarageBand version 10. BFD Eco as audio unit inside GarageBand 10 could not find its licence manager. GarageBand offered a nice dialog for lowering some security settings but I just couldn’t get it all to work. It seems that the new sandboxed GarageBand has caused problems for other audio unit users too.

Then I noticed that there was Garageband 6.0.5 folder in the Applications folder. The upgrade to GarageBand 10 had been so nice that it did not overwrite the earlier version of GarageBand! Fantastic! I could easily revert to the old version. Well, it is not that old as the version number jumped from 6 to 10, so it is really the previous released version of GarageBand 😉 But with GarageBand 6, BFD Eco worked right away and I was more familiar with the user interface. In GarageBand 10 some important features seemed to be very well hidden.

Well, I also lost some features, like support for Logic remote control iPad application, but fortunately I had not even tried it yet, so I don’t know what I am missing 😀