Description

This article provides troubleshooting steps when Junos Space is stuck in maintenance mode because of incorrect permissions on the /tmp directory, which prevents MySQL from initializing.

Symptoms

User is unable to exit maintenance mode, even after clicking the Exit out of maintenance mode and startup Junos Space option from the web page.

Solution

The permissions of the / tmp directory may get changed due to an abrupt reboot or power outage on the Junos Space server.

Troubleshoot and correct the issue:

  1. Check the following logs:
    /var/chroot/mysql/var/log/mysqld.log

    If error messages similar to the following appear  in /var/chroot/mysql/var/log/mysqld.log, then  MySQL cannot create a file in /var/chroot/mysql/tmp directory.

    131205 17:45:05 InnoDB: Using Linux native AIO
    ^G/usr/sbin/mysqld: Can't create/write to file '/tmp/ibe2i1kx' (Errcode: 13)
    131205 17:45:05 InnoDB: Error: unable to create temporary file; errno: 13
  2. Check the permission and ownership of /var/chroot/mysql/tmp. It should be:
    drwxrwxrwt 19 root root 4096 Dec 21 05:42 tmp
  3. If it not as mentioned above then change it to:
    chown root:root /var/chroot/mysql/tmp
    chmod 1777 /var/chroot/mysql/tmp
  4. Restart the MySQL service
    service mysql restart
  5. Log in to the Junos Space WebGUI.
  6. If the issue does not resolve, open a case and attach the Junos Space Troubleshooting logs to the case. Refer to  KB17407- How to collect error log files in Junos Space [juniper.net] .

Modification History

2019-07-06:  Fixed paths.
2019-06-23:  Content reviewed for accuracy.