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.
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.
The permissions of the / tmp directory may get changed due to an abrupt reboot or power outage on the Junos Space server.
tmp
/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
/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.
/var/chroot/mysql/var/log/mysqld.log,
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
drwxrwxrwt 19 root root 4096 Dec 21 05:42 tmp
chown root:root /var/chroot/mysql/tmp chmod 1777 /var/chroot/mysql/tmp
chown root:root
chmod 1777
service mysql restart
2019-07-06: Fixed paths. 2019-06-23: Content reviewed for accuracy.