[MXS-829] When the config file isn't readable or doesn't exist, maxscale silently ends Created: 2016-08-11  Updated: 2016-09-20  Resolved: 2016-09-07

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 1.4.3
Fix Version/s: 2.0.1

Type: Bug Priority: Minor
Reporter: Anders Karlsson Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux CentOS x86_64


Issue Links:
Duplicate
is duplicated by MXS-621 MaxScale fails to start silently if c... Closed

 Description   

When starting MaxScale with no commandline arguments at all and the configuration file isn't in it's default localtion or cannot be read, maxscale still silently ends. I don't know why the fix for MXS-621 didn't fix this or why the test for that didn't catch this. If the default config file is specified, maxscale does show an error as appropriate:

$ sudo chmod 600 /etc/maxscale.cnf
$ maxscale
$ maxscale -f /etc/maxscale.cnf
*
* Error : Failed to open read access to config file.
*

Note that putting the message for this in the log file is rather meaningless as we don't know what the name of that should be unless we can open the config file. I think it is best to show this message to stderr, like in the above case when the filename is specified in the -f option.



 Comments   
Comment by markus makela [ 2016-09-07 ]

Running MaxScale from the command line with no options now generates a proper error message.

Generated at Thu Feb 08 04:02:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.