[MXS-3349] maxscale does not consider log location Created: 2020-12-21  Updated: 2020-12-22  Resolved: 2020-12-22

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 2.5.6
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Oli Sennhauser Assignee: Johan Wikman
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Linux, Debian 10, n.a.



 Description   

MaxScale does not consider my options and want to write/create into /var/log/maxscale:

maxscale --nodaemon --config=/home/mysql/etc/maxscale_load_split.cnf --log=stdout --libdir=${BASEDIR}/lib/x86_64-linux-gnu/maxscale --persistdir=/home/mysql/tmp --datadir=/home/mysql/tmp --logdir=/home/mysql/log/maxscale_load_split.log --config-check
alert  : Cannot create log directory '/var/log/maxscale': Permission denied.
alert  : Can't access '/home/mysql/log/maxscale_load_split.log/'.



 Comments   
Comment by Johan Wikman [ 2020-12-22 ]

The primary problem is logdir=/home/mysql/log/maxscale_load_split.log because the argument to --logdir should be an existing directory and not the name of a file.

The log directory is set immediately when the flag is encountered and as --config-check has not been seen at that point, MaxScale will attempt to log it to the default log, which is that /var/log/maxscale and fail.

You can fix the problem by

  • Putting --config-check first, in which case MaxScale will just complain about that non-existent /home/mysql/log/maxscale_load_split.log, or
  • provide an existing directory as argument to --logdir in which case there will be nothing to complain about the arguments themselves.
Generated at Thu Feb 08 04:20:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.