Twitter Weekly Updates for 2011-12-25
- Op kantoor: "Computers werken op rook, want als die eruit is, doet ie het niet meer." #
Powered by Twitter Tools
Twitter Weekly Updates for 2011-12-18
- Htc desire update broke my desktop settings :-( #
Powered by Twitter Tools
Twitter Weekly Updates for 2011-12-11
- @woutlemmens Gefeliciteerd met jullie zoon! in reply to woutlemmens #
- Zei ik gister nog dat ik een foto van Aagje op canvas wil laten drukken, word ik op mijn wenken bediend door GroupOn: http://t.co/AVgQTeXB #
- Batman Live is nice. The fighting is a bit silly, but the show is good. Part 2 in 15 minutes I guess. #
- Ok, Batman Live was a lot of fun. On our way home now. #
Powered by Twitter Tools
Tags: activemq, puppet, puppetqd, python, queue, stomp, Uncategorized
leave a comment
Debugging puppet queueing
Today we ran into a problem where the data put in ActiveMQ by the puppetmaster seemed corrupted in some way. When running the puppet queue daemon on the foreground (with –debug –verbose –no-daemonize), we noticed messages like these:
info: Loaded queued catalog in 22.16 seconds debug: Searched for resources in 0.31 seconds err: Could not save queued catalog for web1.ourserver.com: syntax error on line 68, col 34: ` serverversion: 2.7.6 sshdsakey: [long string]' notice: Processing queued catalog for web1.ourserver.com in 0.41 seconds
It seemed like for some reason there’s a newline missing there, but what exactly is it trying to do? It would be helpful if we could check the message in total, to see which resource is doing this. Python to the rescue!
On the machine that’s running the ActiveMQ, install python-stompy (we’re on Debian Squeeze). Open a python interactive shell and do this:
>>> from stompy.simple import Client
>>> stomp = Client()
>>> stomp.connect()
>>> stomp.subscribe("/queue/catalog")
>>> message = stomp.get_nowait()
>>> f = open("message","w")
>>> f.write(message.body)
>>> f.close()
>>> stomp.unsubscribe("/queue/catalog")
>>> stomp.disconnect()
You know have a file called message that contains the message. You might want to make the file a little bit easier to read by executing the following: sed -i 's/{/\n{/g' message, which adds a newline in front of each opening accolade. Now to search for the problem and the resource that causes it.
I hope this helps someone!
Twitter Weekly Updates for 2011-12-04
- If the installed version is as polished as the installer, I'm sold to #linux #mint12! #
- @Dankjewelske nu wel! in reply to Dankjewelske #
- Piepte toen ze vanmorgen ging liggen en heeft een stevige knobbel op haar middenrif. Verliest ook controle achterkant. Niet goed. #
- Daag Aagje, bedankt voor de heerlijke jaren. Ik zal je missen, lieve meid. #
- Really enjoying #Skyrim but it does crash quite often! :( #
Powered by Twitter Tools