Services fail to start after updating to v6.33.3

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

Hi,

many thanks for your message. What was the version you are updated from? Did you login as user root?

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

[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.

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

- 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

systemctl restart mariadb.service
journalctl -u mariadb
cat /var/log/mysql/error.log
readlink /var/lib/mysql
readlink -f /var/lib/mysql

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

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

-- 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

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

/mnt/dietpi_userdata/mysql

readlink -f /var/lib/mysql

/mnt/ebd99df1-1979-4f52-a467-6885fa2107d5/dietpi_userdata/mysql

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

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.

ls -la /mnt/dietpi_userdata/mysql

As well, you can try to write a dummy file to the directory

sudo -u mysql -g mysql touch /var/lib/mysql/demo.file

I ended up making a fresh install of dietpi. My nextcloud db was messed up also. Now is working fine. Thanks for the help

probably this was not needed, but good that it is working again now

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?

Hi,

can you post output of df -h. Looks like tmpfs is not created/mounted correctly during startup process

here it is:
root@pi4:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 29G 14G 14G 51% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 1.3M 1.9G 1% /dev/shm
tmpfs 1.9G 17M 1.9G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
tmpfs 50M 1.7M 49M 4% /var/log
tmpfs 2.0G 4.0K 2.0G 1% /tmp
/dev/mmcblk0p1 253M 61M 192M 24% /boot
//172.16.0.3/Data 5.5T 2.3T 3.2T 43% /mnt/nas

I don’t have any external drive apart from the microSD on which the os is installed…

thanks for your help

ok it seems /run is correctly mounted. Just to be sure. It’s empty right? pls can you check ls -la /run

I guess we would need support from the developer MichaIng.

/run is not empty, I think it’s just missing the dietpi folder…

root@pi4:~# ls -la /run
total 44
drwxr-xr-x 20 root root 700 Oct 29 12:26 .
drwxr-xr-x 21 root root 4096 Jun 8 11:05 …
-rw------- 1 root root 0 Oct 29 09:24 agetty.reload
drwxr-xr-x 2 root root 80 Oct 29 09:24 blkid
drwxr-xr-x 2 root root 80 Oct 29 09:24 console-setup
-rw-r–r-- 1 root root 4 Oct 29 09:24 crond.pid
---------- 1 root root 0 Oct 29 09:24 crond.reboot
drwxr-xr-x 2 root root 80 Oct 29 09:24 fail2ban
prw------- 1 root root 0 Feb 14 2019 initctl
-rw------- 1 root root 4 Oct 29 09:24 iscsid.pid
-rw-r–r-- 1 root root 4 Oct 29 09:24 lighttpd.pid
drwxrwxrwt 2 root root 40 Feb 14 2019 lock
drwxr-xr-x 3 root root 60 Feb 14 2019 log
drwxr-xr-x 2 www-data www-data 40 Oct 29 09:24 mono-xsp4
-rw-r–r-- 1 root root 4 Oct 29 09:24 mono-xsp4.pid
-rw-r–r-- 1 root root 68 Oct 29 12:26 motd.dynamic
drwxr-xr-x 2 root root 80 Oct 29 09:24 mount
drwxr-xr-x 2 mysql root 80 Oct 29 09:24 mysqld
drwxr-xr-x 2 root root 120 Oct 29 09:24 network
drwxr-xr-x 2 pihole pihole 60 Oct 29 09:24 pihole
-rw-r–r-- 1 pihole pihole 3 Oct 29 09:24 pihole-FTL.pid
-rw-r–r-- 1 pihole pihole 4 Oct 29 09:24 pihole-FTL.port
drwxr-sr-x 2 redis redis 80 Oct 29 09:24 redis
-rw-r–r-- 1 root root 4 Oct 29 09:24 rngd.pid
dr-xr-xr-x 11 root root 0 Feb 14 2019 rpc_pipefs
drwxr-x— 2 _rpc root 40 Oct 29 09:24 rpcbind
-r–r–r-- 1 root root 0 Oct 29 09:24 rpcbind.lock
srw-rw-rw- 1 root root 0 Feb 14 2019 rpcbind.sock
-rw-rw-rw- 1 root root 12 Oct 29 09:24 rpimonitord.pid
drwxr-xr-x 2 root root 40 Oct 29 09:24 sshd
-rw-r–r-- 1 root root 4 Oct 29 09:24 sshd.pid
drwxr-xr-x 2 root root 60 Feb 14 2019 sysconfig
drwxr-xr-x 11 root root 280 Oct 29 09:30 systemd
drwxr-xr-x 2 root root 60 Feb 14 2019 tmpfiles.d
drwxr-xr-x 7 root root 160 Oct 29 09:24 udev

ok quite strange, you are missing /run/dietpi/ as well as /run/php

let me open a GitHub issue to have the developer a look into it.

DONE: https://github.com/MichaIng/DietPi/issues/3877

That’s exactly what happened to me Now, i’m running v6.33.3 wich i dowloaded and installed. For now all is working fine.

/run/dietpi is created during boot via: /etc/tmpfiles.d/dietpi.conf
/run/php should be created by the same mechanism via: /usr/lib/tmpfiles.d/php7.3-fpm.conf
Depending on when PHP was (re)installed through dietpi-software also /run/php_sessions should exist, created via: /etc/tmpfiles.d/dietpi-php.conf

/run itself is mounted by systemd but I am not sure if there is any specific systemd unit responsible, or when this is done, to compare timestamps :thinking:.
However can you check if all above files exist with fine content and: journalctl -u systemd-tmpfiles-setup

/etc/tmpfiles.d/dietpi-php.conf is the only one missing. Here is the content:

root@pi4:/# cat /etc/tmpfiles.d/dietpi.conf
d /run/dietpi 0777
root@pi4:/# cat /usr/lib/tmpfiles.d/php7.3-fpm.conf
#Type Path Mode UID GID Age Argument
d /run/php 0755 www-data www-data - -
root@pi4:/# ls -la /etc/tmpfiles.d/
total 12
drwxr-xr-x 2 root root 4096 Jul 26 11:34 .
drwxr-xr-x 89 root root 4096 Oct 29 08:46 …
-rw-r–r-- 1 root root 19 Oct 29 08:44 dietpi.conf
root@pi4:/# journalctl -u systemd-tmpfiles-setup
– Logs begin at Thu 2019-02-14 10:11:58 GMT, end at Thu 2020-10-29 16:05:02 GMT. –
– No entries –
root@pi4:/#

Thanks a bunch for your help

hm there is no entry for the systemd-tmpfiles-setup service. :thinking:
Usually it should give something like this

root@DietPi3:~# journalctl -u systemd-tmpfiles-setup
-- Logs begin at Thu 2020-10-29 16:25:53 CET, end at Thu 2020-10-29 19:18:17 CET. --
Oct 29 16:25:55 DietPi3 systemd[1]: Starting Create Volatile Files and Directories...
Oct 29 16:25:55 DietPi3 systemd[1]: Started Create Volatile Files and Directories.
root@DietPi3:~#

pls can you check status

systemctl status systemd-tmpfiles-setup

root@pi4:~# systemctl status systemd-tmpfiles-setup
● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
Loaded: loaded (/lib/systemd/system/systemd-tmpfiles-setup.service; static; vendor preset: enabled)
Active: inactive (dead)
Docs: man:tmpfiles.d(5)
man:systemd-tmpfiles(8)

loaded but inactive?

can you try to restart the service?

systemctl restart systemd-tmpfiles-setup