No more systemd on server.

Some time ago I’ve tried to solve a ‘funny’ issue with PowerDNS. It refused to start on one of my backup VPS. After apt-get dist-upgrade, it first stopped to work with very meaningful ‘Failed at step ADDRESS_FAMILIES‘  error. Well, I’ve managed to solve it somehow, but then another ‘funny’ problem popped out…

PowerDNS + systemd fail

I encountered this problem again, so let’s write it down to avoid googling it. Problem: PowerDNS fails to start with pdns.service: Failed at step ADDRESS_FAMILIES spawning /usr/sbin/pdns_server: Invalid argument Solution: edit /lib/systemd/system/pdns.service comment out RestrictAddressFamilies comment out ProtectSystem=full possibly kill systemd-resolved systemctl daemon-reload ask yourself again, why are you using debian with systemd on server […]

Selective routing on Linux

Sometime it’s needed to selectively route specified IPs or networks via different interface – i.e. if you want to route private addresses over VPN (a.k.a split tunnel routing) or to route some public IPs over VPN to unblock some nationally restricted sites (Netflix). Here are simple scripts to achieve this.

firefox 31 + self-signed certificate = sec_error_ca_cert_invalid

If you are trying to access site with self-signed certificate with Firefox 31 (or later) and get Issuer certificate is invalid error (sec_error_ca_cert_invalid), you have to disable new mozilla::pkix certificate verification. In about:config set security.use_mozillapkix_verification = false To find out more about mozilla::pkix and why your firefox just got so super secure and paranoid, that […]

Fixing pg_dump invalid memory alloc request size

I’ve encountered unusual problem while dumping one of the bigger PostgreSQL databases. Every try to run pg_dump resulted in this: sam@cerberus:~/backup$ pg_dump -v -c js1 >x pg_dump: Error message from server: ERROR: invalid memory alloc request size 18446744073709551613 pg_dump: The command was: COPY job.description (create_time, job_id, content, hash, last_check_time) TO stdout; pg_dump: *** aborted because […]

Monitoring disk drives via collectd

I’ve made two simple (but useful) disk drive monitoring scripts for collectd exec plugin. You can find them on This script monitors SMART attributes of given disks using smartctl (smartmontools). This one monitors some interesting values of MegaRaid adapter physical drives using MegaCli tool.   Description how to use them can be […]