New FreeBSD Screencast Episode about CARP

Today I’ve tried out CARP, the Common Address Redundancy Protocol, which allows you to easily set up automatic failover for machines which usually become single points of failure in your infrastructure like loadbalancers, firewalls and routers.

It was so easy and quick that I made a short video demonstrating it:

Commands

# Machine 1
ifconfig carp0 create
ifconfig carp0 vhid 1 advskew 100 pass foobartralala 10.8.0.130/24


# Machine 2
ifconfig carp0 create
ifconfig carp0 vhid 1 advskew 200 pass foobartralala 10.8.0.130/24

If you want to make that set up permanent put something similar to your /etc/rc.conf:

cloned_interfaces="carp0"
ifconfig_carp0="vhid 1 advskew 100 pass foobartralala 10.8.0.130/24"

Erlang R16 64Bit on OS X 10.9 with wxWidgets

A lot of people have tried to get Erlang running on OSX with 64Bit and wxWidgets and there are plenty of guides out there but most of them claim that it doesn’t work with 64Bit.

I just successfully compiled it as 64Bit on 10.9.2 and here is how I did it:

1. I installed wxWidgets and Erlang from homebrew and deinstalled them again, just to get all the dependencies conveniently
2. Then I fetched the sources for wxWidgets 3.0 from sourceforge and the sources for Erlang R16 from the erlang website
3. I configured them with a blend of options from the official docs and the other guides

Configure and Compile wxWidgets

./configure --with-cocoa --prefix=/usr/local \
            --with-macosx-version-min=10.9 --disable-shared

make
make install

Configure and Compile Erlang

./configure --disable-debug --without-javac --enable-shared-zlib \
            --enable-dynamic-ssl-lib --enable-hipe \
            --enable-smp-support --enable-threads \
            --enable-kernel-poll --with-wx --enable-darwin-64bit

make
make install

Thats was it. I hope that helps.

Getting Started with FreeBSD

I’m a huge FreeBSD fan. My very first home router ran FreeBSD back in the late 90’s and since then I have installed it on every single server I worked with. I do realize that this is some kind of niche since almost everybody else is running Linux these days. This is why I thought to make FreeBSD a little bit more approachable to the curious people.

Why? Because FreeBSD offers a lot of cool features like ZFS, Jails, reliability, stable API and a great network stack which makes it a really superb server operating system. In fact I just realized I never had to clean install any of the many FreeBSD machines I have operated. They just kept running flawlessly unless some hardware died of course.

To get you started I have recorded a little screencast to show how easy and painless it is to install FreeBSD 10.0 with a ZFS root filesystem on a remote machine even if the hosting provider does not provide FreeBSD rescue images.

In the next videos I’ll show you how to install software, set up a web server and other common, server related tasks.

For that I have created a FreeBSD Guides channel on vimeo.

Additional Links:
* http://www.freebsd.org
* http://www.freebsd.org/releases/10.0R/hardware.html
* http://en.wikipedia.org/wiki/FreeBSD

FreeBSD: Authentication Error when fetching ports from github

For people who have the same problem:

I have tried to install a port that fetches its source from github and it failed to fetch it.

When I tried the fetch command manually for the given URL I saw the following error:

fetch https://github.com/nicolargo/glances/archive/v1.7.3.tar.gz
Certificate verification failed for /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV CA-1
34380826280:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed:/usr/src/secure/lib/libssl/../../../crypto/openssl/ssl/s3_clnt.c:1168:
fetch: https://github.com/nicolargo/glances/archive/v1.7.3.tar.gz: Authentication error

I assume its related to githubs latest improvement to their HTTPS/SSL infrastructure.

To solve this I installed the very latest version of OpenSSL on my FreeBSD 10 machine and afterwards the installation just went fine.

Resampling / Converting Audio Files

Here is a little tip. I have just finished mixing concert recording. The mixing was done in Reaper at 24bit/48kHz and now I needed to convert / downsample it to 16bit/44.1kHz. If you leave that up to black box encoders you can actually hear a change in tonality or loudness even with untrained ears. At least I noticed sometimes that inside the DAW it sounds different than what I had rendered out to 16bit/44.1kHz.

Reaper, like any other DAW, has this feature built in, however it presented me many different options on how to actually do it. I also watched an interview with Bob Katz (Loudness War fighter and author of this this awesome book on mastering
) who talked about how he used to do it.

So apparently there are multiple options and as a beginner in mixing / audio processing it was totally unclear which option would be the best. I started googling and stumbled upon this comparison website (http://src.infinitewave.ca) for SRC engines and it turned out none of the options in Reaper was on par with the pricy industry standard iZotope. In fact many of the popular DAWs don’t perform as good as that particular piece of software. (Hint: Click the help button for explanations of the graphs)

After researching some more I found out about SoX, which is an open source audio converter which is superb at sample rate conversion. It was awailable in homebrew and within a few seconds I was able to convert my 24bit/48kHz files with the following command line:

sox 24bit_48khz_infile.wav -b 16 \
16bit_44.1khz_outfile.wav rate -v -s 44100

This should correspond to the SoX VHQ Linear setting on http://src.infinitewave.ca.

Of course you can ask whether you’d actually able to hear any difference … well I’d have to do a double blind test and would probably fail but I don’t see any reason not to use the superior and free tool when I have the choice.

Also I’ve just donated a few bucks to the Sox project and I hope you’ll do the same for open source software which makes your job easier!