I just upgraded from version 0.50 to 0.52 and noticed that my /admin and /mail pages will no longer load correctly. The IP address and DNS entries for my DigitalOcean instance did not change. I can also still send/receive mail through the server from my iPhone.
I updated with the regular curl -s https://mailinabox.email/setup.sh | sudo bash
execution and when I noticed the page loading issues, I attempted to rerun both that exact command as well as just mailinabox
while logged in as root, then a reboot. None of this resolved the issues.
In the Nginx logs, I can see the following whenever /mail is accessed:
/var/log/nginx/access.log
{REMOTE IP ADDRESS} - - [07/Feb/2021:22:33:17 -0800] "GET /mail/ HTTP/2.0" 500 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
/var/log/nginx/error.log
2021/02/07 22:34:19 [error] 19677#19677: *19 FastCGI sent in stderr: "PHP message: PHP Warning: session_start(): Failed to read session data: user (path: /var/lib/php/sessions) in /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_session.php on line 136
PHP message: PHP Fatal error: Uncaught Error: Undefined class constant 'MYSQL_ATTR_FOUND_ROWS' in /usr/local/lib/roundcubemail/program/lib/Roundcube/db/mysql.php:149
Stack trace:
#0 /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_db.php(152): rcube_db_mysql->dsn_options(Array)
#1 /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_db.php(138): rcube_db->conn_create(Array)
#2 /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_db.php(230): rcube_db->dsn_connect(Array, 'w')
#3 /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_db.php(416): rcube_db->db_connect('w', true)
#4 /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_db.php(379): rcube_db->_query('SELECT `vars`, ...', 0, 0, Array)
#5 /usr/local/lib/roundcubemail/program/lib/Roundcube/session/db.php(106): rcube_db->query('SELECT `vars`, ...', '{SESSION ID}')
#6 [internal function]: rcube_session_db->read('{SESSION ID}')
#7 /usr/local/lib/roundcubemail/program/lib/Roundcube/rcube_session.php(136): session_sta" while reading response header from upstream, client: {REMOTE IP ADDRESS}, server: {SERVER DNS NAME}, request: "GET /mail/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock:", host: "{SERVER DNS NAME}"
The following is seen when /admin is accessed:
/var/log/nginx/access.log
{REMOTE IP ADDRESS} - - [07/Feb/2021:22:38:27 -0800] "GET /admin HTTP/2.0" 200 36619 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
{REMOTE IP ADDRESS} - - [07/Feb/2021:22:38:27 -0800] "GET /admin/assets/bootstrap/css/bootstrap.min.css HTTP/2.0" 403 124 "https://{SERVER DNS NAME}/admin" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
{REMOTE IP ADDRESS} - - [07/Feb/2021:22:38:27 -0800] "GET /admin/assets/bootstrap/css/bootstrap-theme.min.css HTTP/2.0" 403 124 "https://{SERVER DNS NAME}/admin" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
{REMOTE IP ADDRESS} - - [07/Feb/2021:22:38:27 -0800] "GET /admin/assets/jquery.min.js HTTP/2.0" 403 124 "https://{SERVER DNS NAME}/admin" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
{REMOTE IP ADDRESS} - - [07/Feb/2021:22:38:27 -0800] "GET /admin/assets/bootstrap/js/bootstrap.min.js HTTP/2.0" 403 124 "https://{SERVER DNS NAME}/admin" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0"
/var/log/nginx/error.log
2021/02/07 22:41:12 [error] 19677#19677: *24 open() "/usr/local/lib/mailinabox/vendor/assets/bootstrap/css/bootstrap.min.css" failed (13: Permission denied), client: {REMOTE IP ADDRESS}, server: {SERVER DNS NAME}, request: "GET /admin/assets/bootstrap/css/bootstrap.min.css HTTP/2.0", host: "{SERVER DNS NAME}", referrer: "https://{SERVER DNS NAME}/admin"
2021/02/07 22:41:12 [error] 19677#19677: *24 open() "/usr/local/lib/mailinabox/vendor/assets/bootstrap/css/bootstrap-theme.min.css" failed (13: Permission denied), client: {REMOTE IP ADDRESS}, server: {SERVER DNS NAME}, request: "GET /admin/assets/bootstrap/css/bootstrap-theme.min.css HTTP/2.0", host: "{SERVER DNS NAME}", referrer: "https://{SERVER DNS NAME}/admin"
2021/02/07 22:41:12 [error] 19677#19677: *24 open() "/usr/local/lib/mailinabox/vendor/assets/jquery.min.js" failed (13: Permission denied), client: {REMOTE IP ADDRESS}, server: {SERVER DNS NAME}, request: "GET /admin/assets/jquery.min.js HTTP/2.0", host: "{SERVER DNS NAME}", referrer: "https://{SERVER DNS NAME}/admin"
2021/02/07 22:41:12 [error] 19677#19677: *24 open() "/usr/local/lib/mailinabox/vendor/assets/bootstrap/js/bootstrap.min.js" failed (13: Permission denied), client: {REMOTE IP ADDRESS}, server: {SERVER DNS NAME}, request: "GET /admin/assets/bootstrap/js/bootstrap.min.js HTTP/2.0", host: "{SERVER DNS NAME}", referrer: "https://{SERVER DNS NAME}/admin"
/mail does not load at all due to the 500 error and /admin partially loads but is missing all of its styling and interface because of the access issues.
In the journal logs for the mailinabox daemon, each GET for the admin page looks like this:
Feb 07 23:11:24 {SERVER DNS NAME} start[20219]: 127.0.0.1 - - [07/Feb/2021 23:11:24] "GET / HTTP/1.0" 200 -
If there are any recommended troubleshooting steps from this point, please let me know!