Docker – Debian – Kernel panick – Automatic restart

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

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’

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

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 how your Linux system was booted (with what command)

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

If you would like to know how your linux system was booted type the following to give you the information that you need:

ERROR: could not open extension control file “/usr/share/postgresql/9.3/extension/plr.control”: No such file or directory

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

You are trying to install the PL/R extension to PostgreSQL, after install R in your linux ubuntu development environment, but when trying to install the extension inside your PostgresSQL with:

you are getting the following error:

Solution

Install the necessary package for your PostgreSQL version with the following, and install the extension in your psql:

No PostgreSQL clusters exist; see “man pg_createcluster”

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

After installing postgresql in a new Ubuntu 14.04 installation you get the error:

and when you try to start the server with:

you get the error that the server does not exist:

Solution

The solution can be found in the article here, and is to create manually the first cluster by:

Fixing a broken sudoers file without rebooting

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

If by accident you make a mistake in your sudoers file then you won’t be able to run sudo command after saving the file.

Solution

Following the answer here, you can simply run the command pkexec visudo, supply your password and provided you already had sudo permissions, fix the sudoers file, make sure that you save it using the Q when prompted, and you should be able to use sudo commands again.

Docker error – error response from daemon: Cannot start container….is not within /var/lib/docker/aufs/mnt

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

You are trying to use an image from Docker in your Ubuntu 14.04 system, but you are getting a error like the following:

Solution

Your docker version is outdated (ie 1.0.1) so you would need to upgrade your docker installation.
There is a script for this (information from here):

After running the following you should be able to use your images as normal with: sudo docker run -t -i image/name bin/bash:

rvm – Branch origin/ruby_2_1_0 not found.

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

You are trying to install the new ruby in your ubuntu rvm installation with rvm install 2.1 but you are getting the error:

Solution

If you are careful and you notice a warning message as:

then you would need to update your rvm installation to the latest one with:

And then you should be able to install the latest ruby version with:

WARNING: Nokogiri was built against LibXML version 2.9.0, but has dynamically loaded 2.9.1

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

You get the following warning after an update to your system (ie Ubuntu 13.10):

Solution

Uninstall your nokogiri versions:

and then run install it again (inside your application if you use bundler) with: