Not a blog

Install Terminator on a Minimal CentOS 7

To remotly start terminator on a minimal CentOS install these packages:

yum install terminator xauth dbus-x11.x86_64 dejavu-sans-fonts.noarch dejavu-sans-mono-fonts.noarch

Without the font packages you’ll only see boxes.

Ssh X11 Forwarding Fails on IPv4 Only Host

If ssh -X fails with X11 forwarding request failed on channel 0 when connecting to an IPv4 only host, check your /etc/ssh/sshd_config for AddressFamily inet:

Specifies which address family should be used by sshd(8). Valid arguments are “any”, “inet” (use IPv4 only), or “inet6” (use IPv6 only). The default is “any”.

PuppetDB Start Failing With ‘java.lang.AssertionError: Assert Failed: (Keyword? Kw)’

Is your puppetdb failing with something like this:

java.lang.AssertionError: Assert failed: (keyword? kw)
 at puppetlabs.kitchensink.core$without_ns.invokeStatic (core.clj:613)
    puppetlabs.kitchensink.core$without_ns.invoke (core.clj:613)
    puppetlabs.trapperkeeper.core$main.invokeStatic (core.clj:175)
    puppetlabs.trapperkeeper.core$main.doInvoke (core.clj:159)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:646)
    clojure.core$apply.invoke (core.clj:641)
    puppetlabs.puppetdb.cli.services$_main.invokeStatic (services.clj:468)
    puppetlabs.puppetdb.cli.services$_main.doInvoke (services.clj:465)

make sure your postgresql setup works.

Building (Semi-)static Subversion 1.9 for EPEL 7

Setup mock:

mock -r epel-7-x86_64 --rootdir /tmp/mock --init
mock -r epel-7-x86_64 --rootdir /tmp/mock -i yum
mock -r epel-7-x86_64 --rootdir /tmp/mock --shell

Install dependencies:

yum install wget scons apr-devel apr-util-devel zlib-devel openssl-devel sqlite-devel perl-ExtUtils-Embed autoconf libtool

Download and build serf:

cd /tmp
wget https://www.apache.org/dist/serf/serf-1.3.9.tar.bz2
tar -xjf serf-1.3.9.tar.bz2
cd serf-1.3.9

Download and build subversion:

cd /tmp
wget http://ftp.heikorichter.name/apache/subversion/subversion-1.9.7.tar.bz2
tar -xjf subversion-1.9.7.tar.bz2
cd subversion-1.9.7
./configure --disable-shared --enable-static --with-serf=/tmp/serf-1.3.9 CPPFLAGS="-I/tmp/serf-1.3.9" LDFLAGS="/tmp/serf-1.3.9/libserf-1.a"

Edit Makefile and change

SVN_SERF_LIBS = -lserf-1




make -j5 svn

You will get a couple of unresolved symbols errors e.g.:

/tmp/subversion-1.9.7/subversion/libsvn_ra_serf/.libs/libsvn_ra_serf-1.a(serf.o): In function `ra_serf_get_description':
/tmp/subversion-1.9.7/subversion/libsvn_ra_serf/serf.c:75: undefined reference to `serf_lib_version'

Rerun the last command, but append /tmp/serf-1.3.9/libserf-1.a -lssl -lcrypto

The result is not a completely static build

# ldd ./svn | grep serf

but it contains serf:

# ./subversion/svn/svn --version
    svn, version 1.9.7 (r1800392)
    * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
      - using serf 1.3.9 (compiled with 1.3.9)
      - handles 'http' scheme
      - handles 'https' scheme

Debian Jessie and Mock

I recently needed to build a CentOS package on Debian Jessie, however mock from jessie-backports gave me this error:

ImportError: No module named six

Turns out, I was missing the package python3-six.

Debian Jessie, Systemd and LVM Mount Failure

Is your Debian Jessie dropping you into an emergency shell on boot due to LVM mount problems? Check that your /etc/udev/rules.d/70-persistent-net.rules is valid. Also look at ip l to see if you have no interface called rename[0-9].

Raspbian, Icinga2 and Illegal Instruction

While installing icinga2 from debmon.org on a Raspberry Pi 1 running Raspbian I was getting:

Job for icinga2.service failed. See 'systemctl status icinga2.service' and 'journalctl -xn' for details.
invoke-rc.d: initscript icinga2, action "start" failed.
Jan 26 15:16:01 pi1 prepare-dirs[3995]: Could not fetch RunAsUser variable.  Error ''. Exiting.

When running the icinga2 binary directly I got

Illegal instruction

Turns out Raspbian’s armhf is not quite armhf. Luckily I had a Raspberry Pi 2 available and with the help of rpi23-gen-image I could create a Jessie image and install icinga2.

Grub-mount Eating All the RAM

While updating from Debian wheezy to jessie, one installation hung with grub-mount using all RAM and SWAP until it got OOM killed. Disabling the grub os prober part helped.

Roundcube, Connection to Storage Server Failed

Using imaps and getting:

Could not connect to ssl://localhost:993: Unknown reason in

check that your configured servername matches the certificate’s cn.

Hiera, Puppet and Invalid Yaml Files

If you are running into this error:

Error: Could not run: undefined method `[]' for false:FalseClass

one of your yaml files in hiera is invalid, maybe empty.