systemd User Service Failures

You may receive one of the following errors when upgrading or when running initialize-tsm during a fresh installation:

  • "Failed to get D-Bus connection: No such file or directory"
  • "$XDG_RUNTIME_DIR not found"
  • "systemd unit user@<userID> is not running. Check /var/log/messages or /var/log/syslog."

Background

As of 2018.1, Tableau Server uses the systemd user service to manage processes. This means there is a systemd process that runs as the unprivileged user. By default, Tableau Server Setup creates an unprivileged account named tableau. The Tableau Server processes are spawned from the systemd process and not the system-wide systemd process, which runs as root.

Important: This troubleshooting note applies primarily to RHEL 7-based distros. However, if you see one of these errors, it's possible that the same issues exist on Ubuntu distros.

The systemd user service is not used as commonly as the normal systemd process manager. Red Hat disabled the systemd user service in RHEL 7 (and thereby all distros that come from RHEL, like CentOS, Oracle Linux 7, Amazon Linux 2). However, RedHat has assured Tableau that running the systemd user service is supported as long as the service is re-enabled.

Upgrading from Tableau Server on Linux 10.5

If you are upgrading from Tableau Server 10.5, check that the unprivileged user has a valid shell and home directory. For Tableau Server 10.5, Tableau deliberately created the unprivileged user with shell set to /sbin/nologin and home directory "/". If the unprivileged user was created by initialize-tsm, then during upgrade to 2018.1 Tableau updates the shell and home directory.

However, if you created the unprivileged user during the initial installation of 10.5, then you will get an error when trying to upgrade.

To fix this, you must set the shell to /sbin/nologin and the home directory "/", and then run upgrade again.

Fresh installation error troubleshooting

Verify that the systemd user service is running.

Check by running the command, ps -fww $(pgrep -f "systemd --user")

If the systemd user service is not running, then something prevented it from starting.

Follow this list to troubleshoot:

  • Check the logs in /var/log/messages

  • Run journalctl

  • Verify that any customization that you may have done to your PAM configuration includes has not removed pam_systemd.so.

    If the RHEL 7 PAM file, /etc/pam.d/system-auth is missing the following line:

    -session optional pam_systemd.so

    then it must be added back for Tableau Server to function.

  • If -session optional pam_systemd.so is present in your PAM configuration, the user service cannot start, and the error message $XDG_RUNTIME_DIR not found is showing in /var/log/messages , do not attempt to set the environmental variable. In this scenario, the error is not accurate.

    The real error is that the PAM module pam_systemd.so is unable to allocate the user session. The default configuration suppresses error messages from pam_systemd.so. To surface error messages and debug messages, change the line in /etc/pam.d/system-auth from -session optional pam_systemd.so to session optional pam_systemd.so debug. (Removing the leading hyphen will surface the error messages, and adding debug will surface more verbose logging.)

    Now you can look in /var/log/messages, /var/log/secure and /var/log/audit/audit.log files to see error messages.

Example

You may see the following error message:

systemd-logind: Failed to mount per-user tmpfs directory /run/user/0: Permission denied

In this case, searching the error online leads to the Redhat KB article, https://access.redhat.com/solutions/2460611(Link opens in a new window).

The article recommends updating the selinux-policy package by running sudo yum update selinux-policy.

In some cases, upgrading from version 3.12.X to 3.13.X fixes a $XDG_RUNTIME_DIR not found problem. Be sure to run sudo reboot after updating the package.

Thanks for your feedback!Your feedback has been successfully submitted. Thank you!