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

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.

Thank you Rammstein and Spotify

spotify_logoTwo weeks ago I wrote how bands that are not on Spotify just don’t exist. I mentioned two bands that I have really been missing, AC/DC and Rammstein. They haven’t been on Spotify, so I haven’t been listening to their music. And they haven’t been getting any money from me.

And today, it felt like a miracle, like somebody had been reading my complaints. Rammstein has landed on Spotify!

Tack så mycket Spotify! Danke Schön Rammstein!

So AC/DC. It is now your move.



Dear artist, if you are not on Spotify, you don’t exist

spotify_logoLately there has been some discussion about Spotify and how much artists get money from Spotify plays. Is it even worth being on Spotify if you are either a successful artist or a so-far-never-heard-but-desperately-wannabe-artist?

Well, to put it shortly.

Dear artist, if you are not on Spotify, you just don’t exist.

And why is that?

Spotify is the perfect “tool” for finding new music. Back in the 1900s there was this thing called radio that was quite useful for finding new artists and music. Well, finding new artists who were already popular enough to get some airtime on radio. But it was totally ruined by playlists and “hit music only”-attitude. What if you are into some more obscure music genre, for example death metal or avant-garde rock? Sorry, there was no radio station for you. Radio was quite useful at the time, but I really don’t know what happened to radio stations after internet came to everybody 😉

Also, back in 1900s, there were all these music TV channels. One of the most popular channels was actually once upon a time called MTV for Music Television. But a long time ago it turned to reality TV channel where ancient rock stars are collecting dog poo (Ozzy, I love you) or pregnant teenagers got their fifteen minutes of fame. But even if there still is some TV channel showing music videos, who would be watching them? On short attention span internet age? Who would wait for one week for the special show that shows your kind of music when there is Youtube? And the death metal-avant-garde rock fans favourite music would not be shown on TV anyway. So also TV is quite obsolete for younger generation for finding interesting new music.

But now, we are in the 2010s. You know, even school kids have smart phones with video capabilities. And of course these streaming music services, like Spotify. It is just so convenient to be able to check out some music you’ve never heard and find something new. Some artists that I have found through Spotify are for example Mastodon, Opeth and oh.. The Who. Yes, the CSI band. Those young angry men. How could I have ever found those bands, if I had not been able to check out their music the way I wanted to, when I wanted to? Sometimes even by accident when clicking at the wrong link.

Yes, I have a cd collection. I have even bought cds from bands that I found on Spotify. But my cd collection is basically collecting dust. Spotify is everywhere I go. And how could you, as an artist, become a little part of my cd-collection if I have never heard about you. Basically, if you are not on Spotify, you don’t exist. I will never find out about you.There are some bands that I would love to listen to, but I won’t. I have your cd:s but yes, they are covered in dust. Yes, AC/DC and Rammstein. You are not on Spotify. You don’t exist anymore. Metallica and Led Zeppelin, thank you for making the wise decision of joining Spotify. I missed you so, it is great that you are back in my life.

So if you are an artist and you think that you gain something by NOT being on Spotify, I think you should think again. As far as I am considered, you don’t exist. I never hear your music, I will never come to see your show, you don’t get a penny of my money.

By the way, who is Taylor Swift?

Blood, sweat and tears at Talladega

Last week it was THAT week. iRacing oval series had a race on a superspeedway, at Talladega. Driving those totally silly NASCAR Gen 6 powerhouses. And as always, it was thrilling, exciting, sometimes it was almost like panic, even though on overall the race was quite boring. Driving about 50 second laps 80 times in a row, maybe one pit stop, on a track with only left turns and ridiculous banking which means that you never have to lift off the gas pedal (except for the pit stop…) How boring can it be?

Sounds boring, but especially on superspeedways the whole bunch of cars may stay together in a very tight pack all the way to the chequered flag. There is car right in front of you, another one right behind you. If the situation is really hairy, there is also car to your left and to your right. One wrong move and you are toast, and probably guilty of a big pile-up, chaos and mayhem. There is just no rest, you have to be careful all the time. And did you remember to check the engine temperatures…

There are basically three things you need to do:

  1. Stay in the leading group. Only the last few laps are important, everything before that is just foreplay.
  2. Make sure you have enough fuel. Save fuel whenever you can and check and double check the pit stop tactics during the race.
  3. Stay concentrated.

Talladega is so intense that it is easy to make some silly thing wrong that ruins your race. And ruins your whole week.

So yeah. The race was last week and I didn’t do my job properly. I failed at one of those three things. Guess which one?

Ok, I’ll tell you.

I failed at the fuel-issue. Half way through the race I made my scheduled pit stop. Some other cars entered the pit lane at the same time. I broke hard, got a bit sideways, but managed to control the car. Stopped at my pit stall, got my pit service. Exited out of the pits, everything seemed to go smoothly, I think I even overtook some cars on the pit stop. Hit the gas, move from apron to the track after turn 2. Approaching turn 3 the spotter wants to say something.

What did he say?

Did he say I have fuel for one lap?

Oh… The pit crew didn’t refuel the car.

Re-enter the pits. Lose one lap to the leaders. My race destroyed.

This was my third race on the season and twice I have failed to refuel at the pit stop. Why? Why me? Well, maybe the next time.

Fortunately this is ONLY sim racing!


Why does Spotify break my playlists?

Diary of a madman

Sometimes when listening to my favorite Spotify playlists, some song just stops playing. You wonder what is going on, you album name of the songand everything looks ok. The album where the song originally appears look correct, the song is there on the album. You click on the song on the album page but the song is not played.

But then you search for the album and notice that there is now yet another remastered rerelease and the old release has been just somehow disabled on Spotify. So you have to replace the old song on the playlist with the new one from the latest rerelease.

Now it happened with Diary of a madman album by Ozzy Osbourne. My playlist just stopped working with the Diary of a madman songs. Annoying.

Sometimes in these situations you get the “chain” icon next to the song name on the playlist. In this case the “substitute” for the song is available and automatically handled by Spotify so the playlist works ok (well, in some cases the substitute version of the song is not exactly what you had wanted but that is not so critical. But this does not seem to always work.

Why? Spotify please. Why do you break my playlists?

Kimi interview generator

From the department of slightly silly: Kimi interview generator.

Now is your chance to interview a real fictious formula 1 driver called Kimi using the interactive Kimi interview generator. You get the answers from the fictious Kimi very quickly, it is almost like you are there actually interactively talking to our great fictious F1 driver! Now is your chance to experience what it really feels like to be a real F1 journalist.

Hankalaa tuo laskuttaminen

By Alex E. Proimos ( [CC-BY-2.0 (], via Wikimedia Commons, licensed under the terms of the cc-by-2.0Tämä tarina on remasteroitu klassikko vuosilta 2007-2008.

Vuoden 2007 alussa silloinen työnantajani alkoi tarjoamaan erään suuren operaattorin laajakaistayhteyttä työsuhde-etuna, joten liittymä siirtyi firman piikkiin enkä nähnyt enää yhtään laskua.

Syyskussa 2007 kun vaihdoin työnantaja, siirsin liittymän taas takaisin minun nimiin. Syyskuussa tuli ensimmäinen lasku vajaan kuukauden ajalta, eli syyskuun alusta noin syyskuun 20. päivään asti. En siinä vaiheessa kiinnittänyt laskun summaan isompaa huomiota kun oli vajaan kuukauden lasku.

Lokakuun laskussa sitten oli kyse kokonaisen kuukauden laskusta (syyskuun 20.-lokakuun 20.) ja siitä sitten huomasin että laskun summahan on liian iso. Yritin soittaa operaattorin laskutusasiakaspalveluun mutta “laskutusasiakaspalveluun on nyt yli 30 minuutin jono, odota…” No en odottanut. Jätin operaattorin www-sivujen kautta yhteydenottopyynnön.

Pari viikkoa kului eikä tullut yhteydenottoa joten yritin soittaa operaattorin laskutusasiakaspalveluun uudestaan kun laskun eräpäivä alkoi pukkaamaan päälle. Todella yllättäen pääsinkin melkein heti sisään. Selitin asiakaspalvelijahenkilölle että laskun summa on väärä ja hän sitten siinä katseli ja selvitteli asiaa ja sieltä sitten löytyikin että minulla kun on 2 megan yhteys niin jostain syystä laskutusryhmäni on 8 megaisen liittymän mukainen mutta sitten olin saanut vielä jonkun mystisen 10% alennuksen. Samalla asiakaspalvelija laski että olen syyskuussa siis maksanut liikaa ja lokakuun laskussakin on liikaa mutta tämä voidaan hyvittää lokakuun laskussa niin että maksan 15.58e vähemmän mitä siihen on merkitty niin nuo molemmat liian suuret laskut kuittaantuvat sillä (minä laskin tuon uudestaan puhelun jälkeen ja totesin että ystävällinen asiakaspalvelija laski väärin, tuo olisi ollut 15.58e jos mulla olis 1 megan yhteys).

No, koska asiakaspalvelija on aina oikeassa, maksoin sitten lokakuun laskun vähennettynä 15.58e:llä.

Kaksi päivää myöhemmin operaattorilta soitti asiakaspalvelija tuon pari viikkoa aiemmin www-sivuilla jättämäni yhteydenottopyynnön takia… Taitaa siellä olla vähän ruuhkaa… No selitin että tämä homma hoidettiin kuntoon pari päivää sitten puhelimitse. Asiakaspalvelija katseli että “ei täällä kyllä mitään näy”… Hienoa. Selitin asian juurta jaksain uudestaan ja mainitsin vielä vittuillakseniystävällisesti että minusta tuo 15.58e vähennys on liikaa mutta tämä asiakaspalvelija totesi että kun tästä nyt on harmia tullut jo niin eiköhän se ole ihan sopiva ja merkitään tämä nyt tänne järjestelmiin ja homma on sillä selvä. Samalla hän mainosti että tuommoinen e-lasku olisi kätevä ettei tarvitsisi paperilaskuja ottaa. Voisi internetissä käydä klikkaamassa vain jotain linkkiä niin lasku hoituisi ja laskuista tulisi vain sms-muistutus. Sanoin että no otetaan tuo sitten.

Ja sitten tuli jopa yksi paperinen laajakaistalasku jossa summat olivat ihan oikein.

Kaikki menikin hyvin kunnes… Tuli maksukehoitus. Olen maksanut 15.58e liian vähän. Juuri sen aiemmin sovitun hyvityksen verran… No ei kun taas soittamaan asiakaspalveluun. “No ei täällä mitään hyvitystä näy mutta yritän selvittää ja soitan kohta sinulle takaisin”. Hetken kuluttua asiakaspalveluhenkilö soitti takaisin että “joo, ei tuota tosiaan löydy mistään mutta korjataan tämä ja ei sinun tarvitse sitä maksukehoitusta huomioida.” Homma oli taas ns. kunnossa.

Kunnes tuli sitten tammikuun laajakaistalasku. Siinä oli boonuksena 5 euron “maksukehoitusmaksu”. Ja taas puhelin käteen. “Oho, onpas käynyt hassusti, no ei sitä tarvitse maksaa.”

Tämän jälkeen laskutukset menivät ihan niin kuin pitivät. Laskut tulivat suurinpiirtein odotettuun aikaan, summat olivat niin kuin pitivät, maksukehoitusmaksuja ei tullut ja niin edelleen.

Paitsi se yksi pieni juttu vielä. Tuolla mainitsinkin että yhden puhelun yhteydessä mulle kytkettiin paperilaskujen sijaan e-lasku. Kaikki laskut tulivat kuitenkin paperilaskuina…

Hyvät systeemit…

Enää en ole kyseisen operaattorin asiakas.

Miksi sisällön ostaminen on niin hankalaa?

Seuraan mielelläni urheilua. En toki kaikkia lajeja mutta joitakin lajeja hyvin mielelläni ja joitakin kyllä jos vaan on tilaisuus. Nyt paikallisen jääkiekkoseuran SaiPan päästyä playoffeihin jokin naksahti minullakin päässä ja oli pakko päästä seuraamaan SaiPan playoff-pelejä TV:stä tai netin kautta. Mutta ei sitä ole liian helpoksi tehty.

Continue reading

A modest proposal for the Formula 1 noise problem

This year there has been two hot topics Formula 1. The noses and the noises. The nose-topic has of course been about the ugly noses. And it does not mean that Alain Prost has made a comeback, it is the noses of the 2014 cars that are considered ugly. Well, I guess I could drop that word “considered” from that sentence, because they really are ugly.

The other issue has been the noise, or the lack of noise. And this is what I am really writing about. The noise of Formula 1 cars has been really big issue this year. Because there is no noise. The cars just hum along on the track as the new spec engines just… THEY ARE SO DAMN QUIET! Some people are even complaining that the F1 fans are being ripped of because they don’t get permanent ear damage at the F1 races anymore.

This all sounds (pun intended) a bit silly. But having experienced the brutal noise of a F1 race (only once, back in 2004)… It was really something special, you just sort of felt the power of the cars. That sound is not really captured on TV. I claim that my little pocket camera with its simple video recording capability somehow captured the raw sounds of F1 better than the TV broadcasts. So I sort of understand the disappointment caused by the new cars.

So here is my modest proposal for getting the noise back to F1. Lets take the loudest heavy metal band in the world, Manowar, and offer them the job of being the “Formula 1 house band”. They would play at every F1 race, during every practice session, qualifying session and of course during the race. PA would broadcast the thunderous sound of heavy metal as the F1 cars hum quietly on the track.

Nobody would anymore complain that there is not enough noise. Problem solved.

Photo by Sergio Alcántara is licensed under CC BY-NC-SA 2.0

Manowar – The Formula 1 house band?

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.