loopylab

Ansible Docker - Docker API Error

If you try to run a playbook with the ansible-docker plugin, and you get an error like this

failed: [192.168.2.xxx] => {"changed": false, "failed": true}
msg: Docker API Error: client and server don't have same version (client : 1.19, server: 1.18)

FATAL: all hosts have already failed -- aborting

Solution

You can set the api version to a fixed version. The better way is to use the “auto” feature from docker-py:

- name: start ....
    docker:
      docker_api_version: auto
      image: ....

NGINX "host not found in upstream"

If you find lines like this in your nginx error.log and your nginx is not starting on a reboot, you might have a DNS/network problem:

2015/03/29 11:17:50 [emerg] 1482#0: host not found in upstream "xxxx.io" in /etc/nginx/sites-enabled/xxxx:12
2015/03/29 11:17:50 [emerg] 1483#0: host not found in upstream "xxxx.io" in /etc/nginx/sites-enabled/xxxx:12
2015/03/29 11:17:51 [emerg] 1504#0: host not found in upstream "xxxx.io" in /etc/nginx/sites-enabled/xxxx:12

Nginx with default values is started, before the network in completely up. My quickfix is to restart nginx after the network is available:

$ cat /etc/network/if-up.d/nginx
#!/bin/sh
 
/etc/init.d/nginx restart

Archlinux - Big Cursor

After the last archlinux update, my cursor was about 3 to 4 times bigger than normal. First it only occurred in skype, but after a reboot it affected the cursor everywhere.

After searching a bit I found this post in the Arch Linux forum. The most practical answer is to comment out the Inherits=Adwaita, which is set through new dependencies:

$ nano /usr/share/icons/default/index.theme

[Icon Theme]
#Inherits=Adwaita

Then restart X and your cursor should be normal again. The problem only occurs, when no other theme is set, so it’s likely that only users with basic/uncommon display environments are affected (like in my case xmonad).

IPMI with port forwarding

I recently had the problem, that the IPMI virtual console was not working on one of my servers.

After searching the problem in icedtea I discovered errors while downloading files:

...
JAR https://localhost:443/liblinux_x86_64.jar not found. Continuing.
...
JAR https://localhost:443/iKVM.jar not found. Continuing.
...

I missed that the console works on other ports than 80 and that was the only forwarded port. So I changed my ssh command line to forward all IPMI ports:

sudo ssh -L 80:192.168.205.115:80 -L 443:192.168.205.115:443 \
  -L 623:192.168.205.115:623 -L 5900:192.168.205.115:5900 root@example.com

LED Wall Light

Here is a LED light I built a few months ago.

It’s built of plywood, some wallpaper and a few LED strips.

Preparation

I searched a nice figure I want to cut. On wikipedia I found a triskele as svg so it could be easily resized and printed.

For printing I couldn’t find a program for printing images on DIN A4 paper for linux, so I used Easy Poster Printer for Windows.

Then I glued the paper on the wood and used a pin to stick through the paper and mark the form in the wood.

To cut the wood I used a fretsaw to be more accurate than with a jigsaw and sandpaper for rounding.

Decoration

Then the wallpaper is glued to the wood and the paper flaps are wrapped around the edges to prevent it from separating.

Wallmount

To mount the light on the wall I planned to use two metal hooks, but the distance to the wall was a bit too far. So I used a perforated foundation tie and bend it, so that it holds the metal bracket.

Electrics

As backlight I used a RGB-LED strip with 60 LEDs/m from ebay. They can be cut every few centimeters and have a self-adhesive background. If you chose a form with less curves you avoid a few cuts from the strip, which is not bendable.

I currently use the provided controller and remote, which has limited functions but enough for daily usage. Someday I’ll replace the controller with ip capability.