Docker – Debian – Kernel panick – Automatic restart

Problem

You have a remote server (Debian) running some Docker containers and you want to make sure that they all restart in the event of a kernel panick.

solution

  • Add an automatic restart after a kernel panick by running:

  • Emulate a kernel panick by running the following (SysRq more info here :

  • Check that the containers have restarted again with docker ps (NOTE: the containers should have been enabled to autorestart)

failed to execute ‘/lib/udev/socket:@/org/freedesktop/hal/udev_event’ ‘socket:@/org/freedesktop/hal/udev_event’

Problem

Looking at your /var/log/syslog you see entries every few seconds like the following:

Solution

Seems that hal is not used in newer Ubuntu versions, so you can remove it:

Taken from the answer here

Find out the tables storage engine in your MySQL database

Problem

You would like to check the storage engine in a MySQL database.

Solution

Use the following query after logging in to the server:

Taken from here

Creating routable OpenStreet maps for Garmin

Problem

You would like to use OpenStreet maps in your Garmin GPS, and be able to use navigation.

Solution

  1. Download the program mkgmap from here
  2. Download the map for the country you want from here
  3. Unzip the downloaded files to a folder ie (map_for_a_country)
  4. Unzip the mkgmap and run the following to create a map that you can upload to your Garmin’s SD /Garmin/ directory
  5. Rename gmapsupp.img to country_name.img and upload to your Garmin

Docker Debian locales installation

Problem

You want to install some default locales in a Docker image, and the suggestion is to use locale-gen to do so, but it does not work as expected.

Solution

In order to be able to use the locale-gen and install the locales you need you will have to uncomment the ones needed from /etc/locale.gen first and then use the locale-gen. Example below:

Dockercloud-agent error: …Error creating default \”bridge\” network:…

Problem

When trying to use the dockercloud-agent with docker you have the following error in the /var/log/dockercloud/agent.log

Solution

If you remove the file var/lib/docker/network/files/local-kv.db as suggested here, then if you look again at the log files, it should be a message that the docker daemon has been started:

Clearing unused (dangling) docker volumes

Problem

After you start using and building Docker images, there is a case that there is a lot of space used even after deleting images and containers (a few GB maybe).

Solution

To clean out the volumes that are no longer used (ie dangling) use the following: