[MXS-663] MaxScale 1.4.1 fails to start on Debian 8 (Jessie) Created: 2016-04-05  Updated: 2016-04-11  Resolved: 2016-04-11

Status: Closed
Project: MariaDB MaxScale
Component/s: init script
Affects Version/s: 1.3.0, 1.4.1
Fix Version/s: 1.4.1

Type: Bug Priority: Major
Reporter: Arthur Dali Assignee: Timofey Turenko
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Debian 8.4



 Description   

Opening a new bug as suggested in the comments of MXS-578.

MaxScale 1.4.1 still fails to start on Debian 8 using systemd. This issue I've had in 1.2 and 1.3 also. In 1.3 I was able to bypass it by adding

export _SYSTEMCTL_SKIP_REDIRECT="true"

to /etc/init.d/maxscale

However that is no longer working with MaxScale 1.4.1.

I am able to successfully start MaxScale from the command line manually using:

/usr/bin/maxscale --user=maxscale

When using systemd the service won't start and log files under /var/log/maxscale do not get updated with any new info whatsoever:

  1. systemctl start maxscale.service
    Job for maxscale.service failed. See 'systemctl status maxscale.service' and 'journalctl -xn' for details.
  1. systemctl status maxscale.service
    ● maxscale.service - MariaDB MaxScale Database Proxy
    Loaded: loaded (/lib/systemd/system/maxscale.service; enabled)
    Active: failed (Result: exit-code) since Tue 2016-04-05 05:38:30 UTC; 24s ago
    Process: 30051 ExecStart=/usr/bin/maxscale --user=maxscale (code=exited, status=1/FAILURE)
    Process: 30048 ExecStartPre=/usr/bin/install -d /var/run/maxscale -o maxscale -g maxscale (code=exited, status=0/SUCCESS)

Apr 05 05:38:30 look systemd[1]: maxscale.service: control process exited, code=exited status=1
Apr 05 05:38:30 look systemd[1]: Failed to start MariaDB MaxScale Database Proxy.
Apr 05 05:38:30 look systemd[1]: Unit maxscale.service entered failed state.

  1. journalctl -xn
    • Logs begin at Tue 2016-04-05 05:14:31 UTC, end at Tue 2016-04-05 05:39:01 UTC. –
      Apr 05 05:38:21 look maxscale[15886]: MaxScale shutdown completed.
      Apr 05 05:38:30 look systemd[1]: maxscale.service: control process exited, code=exited status=1
      Apr 05 05:38:30 look systemd[1]: Failed to start MariaDB MaxScale Database Proxy.
    • Subject: Unit maxscale.service has failed
    • Defined-By: systemd
    • Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    • Unit maxscale.service has failed.
    • The result is failed.
      Apr 05 05:38:30 look systemd[1]: Unit maxscale.service entered failed state.
      Apr 05 05:39:01 look CRON[31786]: pam_unix(cron:session): session opened for user root by (uid=0)
      Apr 05 05:39:01 look CRON[31787]: pam_unix(cron:session): session opened for user root by (uid=0)
      Apr 05 05:39:01 look CRON[31788]: (root) CMD (command -v pidof > /dev/null && pidof -s cmon >/dev/null || /etc/in
      Apr 05 05:39:01 look CRON[31789]: (root) CMD ( [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
      Apr 05 05:39:01 look CRON[31786]: pam_unix(cron:session): session closed for user root
      Apr 05 05:39:01 look CRON[31787]: pam_unix(cron:session): session closed for user root


 Comments   
Comment by Timofey Turenko [ 2016-04-06 ]

I can't reproduce it.

Which package do you use? is it maxscale-1.4.1-1.debian_jessie.x86_64.deb ?
Anything in Maxscale log (see /var/log/maxscale/)?

Comment by Arthur Dali [ 2016-04-06 ]

The package was installed using apt from the following repository:

  1. MariaDB MaxScale
    deb http://downloads.mariadb.com/enterprise/4d7m-n51s/mariadb-maxscale/latest/debian jessie main

Here's the package information:

$ apt-cache show maxscale
Package: maxscale
Version: 1.4.1
Architecture: amd64
Maintainer: MariaDB Corporation Ab
Installed-Size: 170227
Depends: libaio1 (>= 0.3.93), libc6 (>= 2.17), libcurl3 (>= 7.16.2), libgcc1 (>= 1:4.1.1), libpcre3 (>= 1:8.35), libssl1.0.0 (>= 1.0.1), libstdc++6 (>= 4.1.1), zlib1g (>= 1:1.1.4)
Filename: dists/jessie/main/binary-amd64//maxscale-1.4.1-1.debian_jessie.x86_64.deb
Size: 31643594
MD5sum: 02cd85ca7d2004668179ac4082d5dfdd
SHA1: 9b8e7a7d0774e0df8bb2a6f4b5a380774623d7e8
SHA256: 5ea8e82b3f9247c95b6a5b8a50c58aaee74fdd295ffa15967b480423af350af4
Section: devel
Priority: optional
Description: MaxScale
Description-md5: 3cb6f3b4fb6ec25683a17d09f584adcd

--------------------
Nothing gets logged under the /var/log/maxscale/ folder when attempting to start maxscale using systemctl.

Comment by Stefan Rubner [ 2016-04-07 ]

Since I'm able to run MaxScale on Jessie using systemd I suspect this is a simple matter of file/directory permissions, most likely on stuff in the /var/log/maxscale and/or /var/lib/maxscale directory. Make sure those directories and the files/directories within are owned by the maxscale:maxscale user. That fixed similar problems for me.

Comment by Timofey Turenko [ 2016-04-07 ]

I suspect this issue is connected also to MXS-621

In case of access permission problem (to directories, configuration file) Maxscale fails silently, without any output to console or log.

Just checked now:

vagrant@maxscale:~$ sudo /usr/bin/maxscale --user=maxscale
vagrant@maxscale:~$ echo $?
1

Comment by Arthur Dali [ 2016-04-09 ]

You are correct. My /etc/maxscale.cnf was owned by root:root and had 640 permissions, thus maxscale failed to start.

I've changed the owner to maxscale:maxscale and the issue is now resolved.

Add a verbose error when config file cannot be read perhaps?

Cheers.

Comment by Timofey Turenko [ 2016-04-11 ]

we have bug about error message and empty log MXS-621.

Comment by Timofey Turenko [ 2016-04-11 ]

The problem is connected to MXS-621 (no any error message if maxscale.cnf is not readable). Maxscale can't start due to lack of access to configuration file, but due to MXS-621 there is no any error message

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