FreeBSD gets unresponsive on commands touching disk

Imagine your server hangs even on simple, seemingly unrelated commands such as cat file, ps aux or top. This is the issue I’ve been dealing with today. Short version: it was MySQL/MariaDB server clogging the VPS I/O. Important: even though a terminal window with an established SSH connection would freeze, I could always open a… Continue reading FreeBSD gets unresponsive on commands touching disk

Icecast: auth to server failed with could not resolve host

The problem Consider this configuration in icecast.xml /your-mount … resulting in this error: WARN auth_url/url_add_listener auth to server http://example.com/auth_mount failed with Could not resolve host: example.com To debug, you wget -O /dev/null http://example.com/auth_mount on the same server and it works file. That means it’s Icecast itself (the daemon) that cannot resolve the hostname. This typically… Continue reading Icecast: auth to server failed with could not resolve host

FreeBSD Certbot: AttributeError: ‘Meta’ object has no attribute ‘profiles’

The problem Requesting a certificate for example.com An unexpected error occurred: AttributeError: ‘Meta’ object has no attribute ‘profiles’ The solution Upgrade or reinstall py311-acme Debugging Check /var/log/letsencrypt/letsencrypt.log for JSON dump of the Directory object: DEBUG:acme.client:Sending GET request to https://acme-v02.api.letsencrypt.org/directory. DEBUG:acme.client:Received response: { "keyChange": "https://acme-v02.api.letsencrypt.org/acme/key-change", "meta": { "caaIdentities": [ "letsencrypt.org" ], "profiles": { "classic": "https://letsencrypt.org/docs/profiles#classic", "shortlived":… Continue reading FreeBSD Certbot: AttributeError: ‘Meta’ object has no attribute ‘profiles’

Server migration cheat sheet

Have history with timestamps May not be enabled by default on a new server ~/.bash_profile: if [ -f ~/.bashrc ]; then . ~/.bashrc fi ~/.bashrc: # Enable timestamp in history export HISTTIMEFORMAT=”%F %T ” # Make history append instead of overwrite shopt -s histappend # Increase history size export HISTSIZE=1000000 export HISTFILESIZE=2000000 (optional) Automatically cd… Continue reading Server migration cheat sheet

Reisntalling package with default config files

If you delete a package using e.g. pkg delete nginx it will leave the configuration files behind. If you then delete /usr/local/etc/nginx manually and reinstall the package using e.g. pkg install nginx, it will not restore the default configs, because it thinks this is not the first install of said package on the system and… Continue reading Reisntalling package with default config files

Connecting to Github from Debian Jessie in 2024

Upgrade everything that still upgrades. Add these to your /etc/apt/sources.list: deb [trusted=yes] http://archive.debian.org/debian jessie main deb [trusted=yes] http://archive.debian.org/debian-security jessie/updates main Optionally, you can comment out the old entries you may already have there. Run apt-get update && apt-get upgrade Chances are, if you try to connect with what you got, Github will complain: ERROR: You’re… Continue reading Connecting to Github from Debian Jessie in 2024

Tar complaining about “You must specify one of the options”

If you’re trying to create a backup using tar but you’re getting this error tar: You must specify one of the ‘-Acdtrux’, ‘–delete’ or ‘–test-label’ options Try ‘tar –help’ or ‘tar –usage’ for more information. … check your options order. In my case, I was using –exclude. It turns out, if the paths you provide… Continue reading Tar complaining about “You must specify one of the options”