[MXS-57] MaxScale should write a message to the error log when config is not found Created: 2015-03-26  Updated: 2015-10-14  Resolved: 2015-03-30

Status: Closed
Project: MariaDB MaxScale
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1.0

Type: Bug Priority: Minor
Reporter: Kolbe Kegel (Inactive) Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

[root@max1 mariadb-maxscale]# service maxscale start
Starting MaxScale: [FAILED]

error log:
MariaDB Corporation MaxScale /usr/local/mariadb-maxscale/log/skygw_err1.log Fri Mar 20 22:42:12 2015
-----------------------------------------------------------------------
— Logging is enabled.
2015-03-20 22:42:12 MaxScale is shut down.
-----------------------------------------------------------------------

msg log:
MariaDB Corporation MaxScale /usr/local/mariadb-maxscale/log/skygw_msg1.log Fri Mar 20 22:42:12 2015
-----------------------------------------------------------------------
— Logging is enabled.
2015-03-20 22:42:12 MaxScale is shut down.
-----------------------------------------------------------------------

syslog:
Mar 20 22:42:12 max1 MaxScale[8911]: Warning : Failed to read the configuration file /usr/local/mariadb-maxscale/etc/MaxScale.cnf due to 2, No such file or directory.

MaxScale has already opened and is already writing to the error and msg logs, so it should be able to write something there if the config file can't be found.



 Comments   
Comment by markus makela [ 2015-03-28 ]

The fact that the message is in syslog means that the log message is written but for some reason isn't flushed to disk before maxscale closes.

Comment by markus makela [ 2015-03-30 ]

We haven't been able to replicate this, could you give more details about your system and the configuration you used?

Comment by Kolbe Kegel (Inactive) [ 2015-03-30 ]

This issue occurs when MaxScale can't find the config at all, so I don't know how I'd meaningfully share more details about the configuration I used.

[root@max1 ~]# cat /etc/redhat-release
CentOS release 6.6 (Final)
[root@max1 ~]# rpm -q maxscale
maxscale-1.1.0-1.x86_64
[root@max1 ~]# rm /usr/local/mariadb-maxscale/etc/MaxScale.cnf
rm: remove symbolic link `/usr/local/mariadb-maxscale/etc/MaxScale.cnf'? y
[root@max1 ~]# service maxscale status
Checking MaxScale status: MaxScale dead but pid file exists[WARNING]
[root@max1 ~]# pgrep maxscale
[root@max1 ~]# service maxscale start
Starting MaxScale:                                         [FAILED]
[root@max1 ~]# tail /usr/local/mariadb-maxscale/log/skygw_err1.log
2015-03-27 13:43:51   Error : Unable to load users from 0.0.0.0:4011 for service tee test frontend.
2015-03-27 13:43:51   Error : Failed to start service 'tee test frontend'.
2015-03-27 13:43:51   Error : Failed to start service 'tee test backend'.
 
 
MariaDB Corporation MaxScale    /usr/local/mariadb-maxscale/log/skygw_err1.log Mon Mar 30 09:09:17 2015
-----------------------------------------------------------------------
---     Logging is enabled.
2015-03-30 09:09:17   MaxScale is shut down.
-----------------------------------------------------------------------
[root@max1 ~]# tail /usr/local/mariadb-maxscale/log/skygw_msg1.log
2015-03-27 13:43:51   Started MaxScale log flusher.
2015-03-27 13:44:02   Loaded module MySQLBackend: V2.0.0 from /usr/local/mariadb-maxscale/modules/libMySQLBackend.so
2015-03-27 13:44:02   Loaded module dbfwfilter: V1.0.0 from /usr/local/mariadb-maxscale/modules/libdbfwfilter.so
 
 
MariaDB Corporation MaxScale    /usr/local/mariadb-maxscale/log/skygw_msg1.log Mon Mar 30 09:09:17 2015
-----------------------------------------------------------------------
---     Logging is enabled.
2015-03-30 09:09:17   MaxScale is shut down.
-----------------------------------------------------------------------
[root@max1 ~]# tail /var/log/messages
Mar 30 09:07:34 max1 kernel: ADDRCONF(NETDEV_UP): eth1: link is not ready
Mar 30 09:07:34 max1 kernel: e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Mar 30 09:07:34 max1 kernel: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
Mar 30 09:07:34 max1 kernel: type=1305 audit(1427731654.181:3): audit_pid=941 old=0 auid=4294967295 ses=4294967295 res=1
Mar 30 09:07:34 max1 rpc.statd[1006]: Version 1.2.3 starting
Mar 30 09:07:34 max1 sm-notify[1007]: Version 1.2.3 starting
Mar 30 09:07:34 max1 acpid: starting up
Mar 30 09:07:34 max1 acpid: 1 rule loaded
Mar 30 09:07:34 max1 acpid: waiting for events: event logging is off
Mar 30 09:09:17 max1 MaxScale[1575]: Warning : Failed to read the configuration file /usr/local/mariadb-maxscale/etc/MaxScale.cnf due to 2, No such file or directory.

Comment by Peter McLarty [ 2015-10-14 ]

I experienced this problem with a version 1.2.1 install I just did. the cnf when I created it as chmod 600 user root so the maxscale user was unable to read it.
Zero feedback that cnf was unreadable
I had previously encountered the same issue with something else, although strace in that case gave up the answer with a bit of digging.

Generated at Thu Feb 08 03:56:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.