[Maria-discuss] adding syslog crashes container
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. 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. Cheers paul
On Tue, Oct 30, 2018 at 08:58:35AM +1100, Paul Chubb 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.
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.
Do you have enough space for the log?
Cheers paul
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
-- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com Being so tracked is for FARM ANIMALS and and extermination camps, but incompatible with living as a free human being. -RI Safir 2013
On Tue, 30 Oct 2018 08:58:35 +1100 Paul Chubb <paul@kinetic.com.au> 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 program.
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.
sounds good.
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.
Thanks, I'll check it out. On Tue, Oct 30, 2018 at 12:02 PM Daniel Black <daniel@linux.ibm.com> wrote:
On Tue, 30 Oct 2018 08:58:35 +1100 Paul Chubb <paul@kinetic.com.au> 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 program.
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.
sounds good.
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.
participants (3)
-
Daniel Black
-
Paul Chubb
-
Ruben Safir