Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

openthread/environment docker rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted

Tags:

openthread

I am running openthread/environment:latest docker image (as of 2019-06-15)

When starting on a fresh ubuntu 18.04 with docker 18.09 using the command

ubuntu@ip-172-31-37-198:~$ docker run -it --rm openthread/environment bash

I get the following output

  • Stopping system message bus dbus [ OK ]
  • Starting system message bus dbus [ OK ]
  • Starting enhanced syslogd rsyslogd

rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted

rsyslogd: activation of module imklog failed [v8.32.0 try http://www.rsyslog.com/e/2145 ]

Anyone knows whether this is related to ubuntu setup or the docker container or how to fix.

like image 409
Kim Nyholm Avatar asked Jun 15 '19 09:06

Kim Nyholm


2 Answers

@Reto's answer will work, but you will be editing that file every time you build your container. Put this in your Dockerfile and you're all set. The edit will be performed automatically while the container is being built.

RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf
like image 105
WillHaslett Avatar answered Nov 08 '22 04:11

WillHaslett


You will also get rid of this warning if you just comment out the line

module(load="imklog")

inside your Docker container (edit /etc/rsyslog.conf).

I doubt you want to read the kernel messages inside a container ;-)

like image 20
Reto Schär Avatar answered Nov 08 '22 05:11

Reto Schär