maria-discuss team mailing list archive
Mailing list archive
Re: adding syslog crashes container
On Tue, 30 Oct 2018 08:58:35 +1100
Paul Chubb <paul@xxxxxxxxxxxxxx> wrote:
> hi I am trying to get Mariadb to log to syslog - this is for log
> consolidation etc. I am using Maria in a docker container from docker
> hub. Other things from the container are successfully logging to
> syslog on my logging server but Maria isn't.
> If I add the word 'syslog' to a [mysqld_safe] section the
> configuration is not read (as reported by mysqld --print-defaults).
> The container init script calls mysqld rather than mysqld_safe
> If I change the init script to call mysqld_safe instead of mysqld,
> syslog is set as reported by --print-defaults however the container
> continually crashes after restart.
The mysqld_safe script really only executed mysqld piped to the logger
> If I add the word 'syslog' to [mysqld] the configuration is read
> however after restart, mariadb continually crashes - at least the
> container does.
> I have checked for log-error statements, when checking global vars
> log_error is empty and it is not reported on the print-defaults
> output. If I setup to log to a file, this works fine.
> The container is running Ubuntu 18.04
> Mariadb version is 10.3.10
> rsyslog version is kinetic 8.32.0
> Not sure what you want to see to help me, advise and I will do my
> best to give it to you.
I suggest using the syslog driver in docker
https://docs.docker.com/config/containers/logging/configure/ will get
to the syslog on the host, and then configure the redirection to the log
server from there.
The default of mysqld output going to stdout should then be
handled by docker pushing that output to the syslog.