Docker fails to initialize after updating to Windows 10 insider build 14342

Problem:

Docker for windows hates windows insider, it attempts to create a switch that already exists (DockerNAT) and then fails because it already exists.

Solution:

There are a few suggestions here but the one that worked for me was to open hyper v manager, then go to virtual switch manager, and rename the existing ‘DockerNAT’ switch to something else, then reinstall Docker.

Docker 404 during apt get update

Problem:

During build of ubuntu images, apt-get can’t resolve any archives (404’s or ‘Cannot initiate the connection’).

Solution:

The issue is caused by the docker bridge hanging, so try the following:
sudo apt-get install bridge-utils
pkill docker
iptables -t nat -F
ifconfig docker0 down
brctl delbr docker0
sudo service docker restart

Openresty/NGINX accessing Docker environment variables

Problem:

Docker supports passing in environment variables to your containers as a handy way to easily switch environments when using multiple docker-compose files. For example you may have a base docker-compose.yml with a docker-compose.dev.yml and docker-compose.prod.yml file that specify environment variables for database hostnames/credentials.
The issue is simply accessing these environment variables directly isn’t possible in openresty (e.g. using os.getenv()).

Solution:

The issue is caused by NGINX blocking all environment variables by default. To make them accessible again you need to re-define them in your nginx.conf, but with no values, e.g:

env APP_ENV;

You should then be able to access them as normal.

NGINX DNS in docker

Problem:

Docker runs its own container DNS that means you can easily link containers together just by specifying their names, instead of having to work out their dynamically assigned IP’s somehow. Unfortunately NGINX doesn’t read the /etc/hosts file that docker edits, and so can’t resolve hostnames of other containers.

Solution:

An earlier hacky solution was to bundle dnsmasq in with nginx and have it use 127.0.0.1 as a resolver, violating the one process per container best practice.

As of Docker 1.10 you can use the new embedded DNS feature by setting 127.0.0.11 as the resolver in nginx.conf, just be aware that there are issues with IPv6.

Zabbix Aggregate Checks and “Unsupported Item Key”

Problem:

Trying to create an aggregate check in Zabbix to measure total bandwidth in a group of servers using ‘grpsum’, get status ‘Not supported’ and error message ‘Unsupported item key.’

Solution:

It’s not anywhere obvious in the docs  or after googling the error, but the item type needs to be changed from ‘Zabbix agent’ to ‘Zabbix aggregate’

Interface lag on linux mint with some themes.

Problem:

Interface lag in linux mint when moving or resizing windows.

Solution:

Problem is caused by the theme needing equinox but it not being installed. MATE highlights this issue but cinnamon doesn’t. Can be solved by either installing equinox, or change to a theme that doesn’t need it.

Hide ‘attempt to remove non jni…’ logcat spam

Problem:

Tonnes of logcat spam in Eclipse ‘attempt to remove non jni local reference’

Solution:

edit filter configuration

^(?!.*(non-JNI)).*$

 

From http://stackoverflow.com/questions/16017356/how-to-hide-remove-filter-logs-in-the-logcat-in-eclipse-for-android

 

Converting InnoDB to MyISAM

Problem:

Trying to convert from InnoDB to MyISAM for smaller RAM footprint MySQL on a tiny VPS

Solution:

adding skip-innodb on its own didn’t work, had to add:

default-storage-engine = MYISAM

skip-innodb

And then run:

CONVERT_SCRIPT=Convert_InnoDB_to_MyISAM.sql
mysql -u... -p... -AN -e"SELECT CONCAT('ALTER TABLE ',table_schema,'.',table_name,' ENGINE=MyISAM;') FROM information_schema.tables WHERE engine ='InnoDB';" > ${CONVERT_SCRIPT}
mysql -u... -p... -A < ${CONVERT_SCRIPT}

Steam big picture controller shortcut windows 10

Problem:

Installed Windows 10, installed steam, xbox button on controller doesn’t open up Big Picture any more

Solution:

Need to disable DVR setting in the xbox application that comes with win10.

Can either login into the xbox app and disable the DVR option under settings, or if you can’t login for some reason, you can press the windows key and g in any program, and select “this is a game”, then turn off the dvr setting there.

 

Syntax error sending emails with Lua and Gmail

Got a fairly unhelpful error while trying to send an email using LuaSec and LuaSocket to connect to googles SMTP servers:

555 5.5.2 Syntax error. uc3sm9880237wib.2

Turns out google doesn’t like the recipient format

‘FirstName LastName <name@example.com>’

and instead prefers just

‘<name@example.com>’