Services fail to start after updating to v6.33.3

Having issues with your DietPi installation, or, found a bug? Post it here.
claudiuh
Posts: 5
Joined: Wed Oct 21, 2020 9:29 pm

Services fail to start after updating to v6.33.3

Post by claudiuh »

Hey i updated my pi model 3b to v6.33.3 today and after that some of the dietpi services fail to start.
The services are: nmbd, smbd, redis-server and php7.3-fpm.

Also im getting the following error (info after i login):
- LAN IP : mawk: cannot open /run/dietpi/.network (No such file or directory)
/boot/dietpi/func/dietpi-banner: line 223: /run/dietpi/.dietpi_motd: No such file or directory

Does anyone have a clue about what went wrong? Thanks
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Services fail to start after updating to v6.33.3

Post by Joulinar »

Hi,

many thanks for your message. What was the version you are updated from? Did you login as user root?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
claudiuh
Posts: 5
Joined: Wed Oct 21, 2020 9:29 pm

Re: Services fail to start after updating to v6.33.3

Post by claudiuh »

Hey, probably was the previous one because i set up my pi 1 month ago. Yes i logged in as root.

Btw this are the errors when running dietpi-services status

Code: Select all

[FAILED] DietPi-Services | ● mariadb.service - MariaDB 10.3.25 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-10-22 09:51:41 BST; 9s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
  Process: 4607 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
  Process: 4608 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 4610 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
  Process: 4667 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=1/FAILURE)
 Main PID: 4667 (code=exited, status=1/FAILURE)
   Status: "MariaDB server is down"

Oct 22 09:51:37 DietPi systemd[1]: Starting MariaDB 10.3.25 database server...
Oct 22 09:51:38 DietPi mysqld[4667]: 2020-10-22  9:51:38 0 [Note] /usr/sbin/mysqld (mysqld 10.3.25-MariaDB-0+deb10u1) starting as process 4667 ...
Oct 22 09:51:38 DietPi mysqld[4667]: 2020-10-22  9:51:38 0 [Warning] Could not increase number of max_open_files to more than 16384 (request: 32186)
Oct 22 09:51:41 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Oct 22 09:51:41 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 22 09:51:41 DietPi systemd[1]: Failed to start MariaDB 10.3.25 database server.
[FAILED] DietPi-Services | ● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-10-22 09:51:41 BST; 9s ago
     Docs: man:php-fpm7.3(8)
  Process: 4724 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf (code=exited, status=78)
 Main PID: 4724 (code=exited, status=78)

Oct 22 09:51:41 DietPi systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
Oct 22 09:51:41 DietPi php-fpm7.3[4724]: [22-Oct-2020 09:51:41] ERROR: unable to bind listening socket for address '/run/php/php7.3-fpm.sock': No such file or directory (2)
Oct 22 09:51:41 DietPi php-fpm7.3[4724]: [22-Oct-2020 09:51:41] ERROR: FPM initialization failed
Oct 22 09:51:41 DietPi systemd[1]: php7.3-fpm.service: Main process exited, code=exited, status=78/CONFIG
Oct 22 09:51:41 DietPi systemd[1]: php7.3-fpm.service: Failed with result 'exit-code'.
Oct 22 09:51:41 DietPi systemd[1]: Failed to start The PHP 7.3 FastCGI Process Manager.
I can't start mariadb and php. I uninstalled them and installed again... Nothing. Theres one thing maybe it's related to that. I have my user data on an ssd.
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Services fail to start after updating to v6.33.3

Post by Joulinar »

let's try to check them separat. Probably the SSD could be an issue, let's see.

PHP issue as well as login script issue seems to be having same root cause. At least they share similar error message

Code: Select all

- LAN IP : mawk: cannot open /run/dietpi/.network (No such file or directory)
/boot/dietpi/func/dietpi-banner: line 223: /run/dietpi/.dietpi_motd: No such file or directory
ERROR: unable to bind listening socket for address '/run/php/php7.3-fpm.sock': No such file or directory (2)
Seems you are missing directories on /run. Can you check if they are existing pls.

For MariaDB pls can you do following to get some more information

Code: Select all

systemctl restart mariadb.service
journalctl -u mariadb
cat /var/log/mysql/error.log
readlink /var/lib/mysql
readlink -f /var/lib/mysql
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
claudiuh
Posts: 5
Joined: Wed Oct 21, 2020 9:29 pm

Re: Services fail to start after updating to v6.33.3

Post by claudiuh »

So, If i create the folder php inside run, php runs but if i reboot the folder disappears and it stops working again.

As for mariadb here are the results:

systemctl restart mariadb.service

Code: Select all

Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
journalctl -u mariadb

Code: Select all

-- Logs begin at Thu 2019-02-14 10:11:59 GMT, end at Thu 2020-10-22 13:17:50 BST. --
Oct 22 11:47:56 DietPi systemd[1]: Starting MariaDB 10.3.25 database server...
Oct 22 11:47:57 DietPi mysqld[460]: 2020-10-22 11:47:57 0 [Note] /usr/sbin/mysqld (mysqld 10.3.25-MariaDB-0+deb10u1) starting as process 460 ...
Oct 22 11:48:01 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Oct 22 11:48:02 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 22 11:48:02 DietPi systemd[1]: Failed to start MariaDB 10.3.25 database server.
Oct 22 11:48:13 DietPi systemd[1]: Starting MariaDB 10.3.25 database server...
Oct 22 11:48:13 DietPi mysqld[655]: 2020-10-22 11:48:13 0 [Note] /usr/sbin/mysqld (mysqld 10.3.25-MariaDB-0+deb10u1) starting as process 655 ...
Oct 22 11:48:16 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Oct 22 11:48:16 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 22 11:48:16 DietPi systemd[1]: Failed to start MariaDB 10.3.25 database server.
Oct 22 13:14:42 DietPi systemd[1]: Starting MariaDB 10.3.25 database server...
Oct 22 13:14:42 DietPi mysqld[1263]: 2020-10-22 13:14:42 0 [Note] /usr/sbin/mysqld (mysqld 10.3.25-MariaDB-0+deb10u1) starting as process 1263 ...
Oct 22 13:14:45 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Oct 22 13:14:45 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 22 13:14:45 DietPi systemd[1]: Failed to start MariaDB 10.3.25 database server.
Oct 22 13:17:22 DietPi systemd[1]: Starting MariaDB 10.3.25 database server...
Oct 22 13:17:22 DietPi mysqld[1395]: 2020-10-22 13:17:22 0 [Note] /usr/sbin/mysqld (mysqld 10.3.25-MariaDB-0+deb10u1) starting as process 1395 ...
Oct 22 13:17:25 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Oct 22 13:17:25 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 22 13:17:25 DietPi systemd[1]: Failed to start MariaDB 10.3.25 database server.
Oct 22 13:17:46 DietPi systemd[1]: Starting MariaDB 10.3.25 database server...
Oct 22 13:17:47 DietPi mysqld[1486]: 2020-10-22 13:17:47 0 [Note] /usr/sbin/mysqld (mysqld 10.3.25-MariaDB-0+deb10u1) starting as process 1486 ...
Oct 22 13:17:50 DietPi systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Oct 22 13:17:50 DietPi systemd[1]: mariadb.service: Failed with result 'exit-code'.
Oct 22 13:17:50 DietPi systemd[1]: Failed to start MariaDB 10.3.25 database server.
cat /var/log/mysql/error.log

Code: Select all

2020-10-22 13:17:22 0 [Note] InnoDB: Using Linux native AIO
2020-10-22 13:17:22 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-10-22 13:17:22 0 [Note] InnoDB: Uses event mutexes
2020-10-22 13:17:22 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-10-22 13:17:22 0 [Note] InnoDB: Number of pools: 1
2020-10-22 13:17:22 0 [Note] InnoDB: Using generic crc32 instructions
2020-10-22 13:17:22 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-10-22 13:17:22 0 [Note] InnoDB: Completed initialization of buffer pool
2020-10-22 13:17:22 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-10-22 13:17:22 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:22 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:22 0 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/gtid_slave_pos.ibd' OS error: 81
2020-10-22 13:17:22 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:22 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:22 0 [ERROR] InnoDB: Could not find a valid tablespace file for ``mysql`.`gtid_slave_pos``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
2020-10-22 13:17:22 0 [Warning] InnoDB: Ignoring tablespace for `mysql`.`gtid_slave_pos` because it could not be opened.
2020-10-22 13:17:22 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:22 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:22 0 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/innodb_index_stats.ibd' OS error: 81
2020-10-22 13:17:22 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:22 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:22 0 [ERROR] InnoDB: Could not find a valid tablespace file for ``mysql`.`innodb_index_stats``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
2020-10-22 13:17:22 0 [Warning] InnoDB: Ignoring tablespace for `mysql`.`innodb_index_stats` because it could not be opened.
2020-10-22 13:17:22 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:22 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:22 0 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/innodb_table_stats.ibd' OS error: 81
2020-10-22 13:17:22 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:22 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:22 0 [ERROR] InnoDB: Could not find a valid tablespace file for ``mysql`.`innodb_table_stats``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
2020-10-22 13:17:22 0 [Warning] InnoDB: Ignoring tablespace for `mysql`.`innodb_table_stats` because it could not be opened.
2020-10-22 13:17:22 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:22 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:22 0 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/transaction_registry.ibd' OS error: 81
2020-10-22 13:17:22 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:22 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:22 0 [ERROR] InnoDB: Could not find a valid tablespace file for ``mysql`.`transaction_registry``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
2020-10-22 13:17:22 0 [Warning] InnoDB: Ignoring tablespace for `mysql`.`transaction_registry` because it could not be opened.
2020-10-22 13:17:22 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-10-22 13:17:22 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-10-22 13:17:22 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-10-22 13:17:22 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-10-22 13:17:22 0 [Note] InnoDB: Waiting for purge to start
2020-10-22 13:17:22 3 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`innodb_index_stats` in the cache. Attempting to load the tablespace with space id 2
2020-10-22 13:17:22 3 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:22 3 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:22 3 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/innodb_index_stats.ibd' OS error: 81
2020-10-22 13:17:22 3 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:22 3 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:22 3 [ERROR] InnoDB: Could not find a valid tablespace file for ``mysql`.`innodb_index_stats``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
2020-10-22 13:17:22 4 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`innodb_table_stats` in the cache. Attempting to load the tablespace with space id 1
2020-10-22 13:17:22 4 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:22 4 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:22 4 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/innodb_table_stats.ibd' OS error: 81
2020-10-22 13:17:22 4 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:22 4 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:22 4 [ERROR] InnoDB: Could not find a valid tablespace file for ``mysql`.`innodb_table_stats``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
2020-10-22 13:17:22 0 [Note] InnoDB: 10.3.25 started; log sequence number 288349105; transaction id 1003249
2020-10-22 13:17:22 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/ebd99df1-1979-4f52-a467-6885fa2107d5/dietpi_userdata/mysql/ib_buffer_pool
2020-10-22 13:17:22 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-10-22 13:17:22 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2020-10-22 13:17:22 0 [Note] Recovering after a crash using tc.log
2020-10-22 13:17:22 0 [ERROR] Bad magic header in tc log
2020-10-22 13:17:22 0 [ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
2020-10-22 13:17:22 0 [ERROR] Can't init tc log
2020-10-22 13:17:22 0 [ERROR] Aborting

2020-10-22 13:17:47 0 [Note] InnoDB: Using Linux native AIO
2020-10-22 13:17:47 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-10-22 13:17:47 0 [Note] InnoDB: Uses event mutexes
2020-10-22 13:17:47 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-10-22 13:17:47 0 [Note] InnoDB: Number of pools: 1
2020-10-22 13:17:47 0 [Note] InnoDB: Using generic crc32 instructions
2020-10-22 13:17:47 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-10-22 13:17:47 0 [Note] InnoDB: Completed initialization of buffer pool
2020-10-22 13:17:47 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-10-22 13:17:47 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:47 0 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/gtid_slave_pos.ibd' OS error: 81
2020-10-22 13:17:47 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:47 0 [ERROR] InnoDB: Could not find a valid tablespace file for ``mysql`.`gtid_slave_pos``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
2020-10-22 13:17:47 0 [Warning] InnoDB: Ignoring tablespace for `mysql`.`gtid_slave_pos` because it could not be opened.
2020-10-22 13:17:47 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:47 0 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/innodb_index_stats.ibd' OS error: 81
2020-10-22 13:17:47 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:47 0 [ERROR] InnoDB: Could not find a valid tablespace file for ``mysql`.`innodb_index_stats``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
2020-10-22 13:17:47 0 [Warning] InnoDB: Ignoring tablespace for `mysql`.`innodb_index_stats` because it could not be opened.
2020-10-22 13:17:47 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:47 0 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/innodb_table_stats.ibd' OS error: 81
2020-10-22 13:17:47 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:47 0 [ERROR] InnoDB: Could not find a valid tablespace file for ``mysql`.`innodb_table_stats``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
2020-10-22 13:17:47 0 [Warning] InnoDB: Ignoring tablespace for `mysql`.`innodb_table_stats` because it could not be opened.
2020-10-22 13:17:47 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:47 0 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/transaction_registry.ibd' OS error: 81
2020-10-22 13:17:47 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:47 0 [ERROR] InnoDB: Could not find a valid tablespace file for ``mysql`.`transaction_registry``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
2020-10-22 13:17:47 0 [Warning] InnoDB: Ignoring tablespace for `mysql`.`transaction_registry` because it could not be opened.
2020-10-22 13:17:47 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-10-22 13:17:47 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-10-22 13:17:47 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-10-22 13:17:47 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-10-22 13:17:47 0 [Note] InnoDB: 10.3.25 started; log sequence number 288349114; transaction id 1003249
2020-10-22 13:17:47 1 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`innodb_index_stats` in the cache. Attempting to load the tablespace with space id 2
2020-10-22 13:17:47 0 [Note] InnoDB: Loading buffer pool(s) from /mnt/ebd99df1-1979-4f52-a467-6885fa2107d5/dietpi_userdata/mysql/ib_buffer_pool
2020-10-22 13:17:47 1 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 1 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:47 1 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/innodb_index_stats.ibd' OS error: 81
2020-10-22 13:17:47 1 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 1 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:47 1 [ERROR] InnoDB: Could not find a valid tablespace file for ``mysql`.`innodb_index_stats``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
2020-10-22 13:17:47 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-10-22 13:17:47 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2020-10-22 13:17:47 0 [Note] Recovering after a crash using tc.log
2020-10-22 13:17:47 0 [ERROR] Bad magic header in tc log
2020-10-22 13:17:47 0 [ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
2020-10-22 13:17:47 0 [ERROR] Can't init tc log
2020-10-22 13:17:47 0 [ERROR] Aborting

2020-10-22 13:17:47 2 [ERROR] InnoDB: Failed to find tablespace for table `mysql`.`innodb_table_stats` in the cache. Attempting to load the tablespace with space id 1
2020-10-22 13:17:47 2 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 2 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:47 2 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/innodb_table_stats.ibd' OS error: 81
2020-10-22 13:17:47 2 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 2 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-10-22 13:17:47 2 [ERROR] InnoDB: Could not find a valid tablespace file for ``mysql`.`innodb_table_stats``. Please refer to https://mariadb.com/kb/en/innodb-data-dictionary-troubleshooting/ for how to resolve the issue.
readlink /var/lib/mysql

Code: Select all

/mnt/dietpi_userdata/mysql
readlink -f /var/lib/mysql

Code: Select all

/mnt/ebd99df1-1979-4f52-a467-6885fa2107d5/dietpi_userdata/mysql
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Services fail to start after updating to v6.33.3

Post by Joulinar »

yeah /run is a tmpfs that's created/mounted during boot. That's why your folder you created was gone after a reboot. Can you post output of df -h

For MariaDB, it looks you have permission issues to read the database file system

Code: Select all

2020-10-22 13:17:47 2 [ERROR] InnoDB: Cannot open datafile for read-only: './mysql/innodb_table_stats.ibd' OS error: 81
2020-10-22 13:17:47 2 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-10-22 13:17:47 2 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
Pls can you post following.

Code: Select all

ls -la /mnt/dietpi_userdata/mysql
As well, you can try to write a dummy file to the directory

Code: Select all

sudo -u mysql -g mysql touch /var/lib/mysql/demo.file
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
claudiuh
Posts: 5
Joined: Wed Oct 21, 2020 9:29 pm

Re: Services fail to start after updating to v6.33.3

Post by claudiuh »

I ended up making a fresh install of dietpi. My nextcloud db was messed up also. Now is working fine. Thanks for the help
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Services fail to start after updating to v6.33.3

Post by Joulinar »

probably this was not needed, but good that it is working again now
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Ale
Posts: 7
Joined: Thu Oct 29, 2020 10:47 am

Re: Services fail to start after updating to v6.33.3

Post by Ale »

Hello, I have the same issue. I have just updated to 6.33 from 6.32, and at boot I get this:
/boot/dietpi/func/obtain_network_details: line 143: /run/dietpi/.network: No such file or directory
- LAN IP : mawk: cannot open /run/dietpi/.network (No such file or directory)
/boot/dietpi/func/dietpi-banner: line 223: /run/dietpi/.dietpi_motd: No such file or directory

After a bit of investigating I've noticed that there is no dietpi folder in /run.
Among my services only php7.3-fpm.service fails, but it's enough to get my nextcloud offline.
Does anyone know how to fix it? can I copy the dietpi folder from somewhere else maybe?
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Services fail to start after updating to v6.33.3

Post by Joulinar »

Hi,

can you post output of df -h. Looks like tmpfs is not created/mounted correctly during startup process
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply