File './mysql/roles_mapping.MAD' not found (Errcode: 2 "No such file or directory") #1873

Closed
opened 2026-02-20 01:01:38 -05:00 by deekerman · 0 comments
Owner

Originally created by @CezaryDanielNowak on GitHub (Aug 28, 2023).

1. What is not working as documented?

After a week of idle I restarted the server and web UI stopped working. I'm getting ERR_CONNECTION_REFUSED.

When I run docker-compose I get following log

cezary@HP-T630-NAS:~$ sudo docker-compose up
[sudo] password for cezary:
Starting cezary_mariadb_1 ... done
Starting cezary_photoprism_1 ... done
Attaching to cezary_mariadb_1, cezary_photoprism_1
mariadb_1     | 2023-08-28 09:56:27+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.4+maria~ubu2204 started.
mariadb_1     | 2023-08-28 09:56:28+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
photoprism_1  | started 230719 as root (amd64-prod)
mariadb_1     | 2023-08-28 09:56:28+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.4+maria~ubu2204 started.
photoprism_1  | Problems? Our Troubleshooting Checklists help you quickly diagnose and solve them:
photoprism_1  | https://docs.photoprism.app/getting-started/troubleshooting/
photoprism_1  | file umask....: "0002" (u=rwx,g=rwx,o=rx)
photoprism_1  | home directory: /photoprism
photoprism_1  | assets path...: /opt/photoprism/assets
photoprism_1  | storage path..: /photoprism/storage
photoprism_1  | config path...: default
photoprism_1  | cache path....: default
photoprism_1  | backup path...: /photoprism/storage/backups
photoprism_1  | import path...: /photoprism/import
photoprism_1  | originals path: /photoprism/originals
photoprism_1  | running as uid 0
photoprism_1  | /opt/photoprism/bin/photoprism start
mariadb_1     | 2023-08-28 09:56:28+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
mariadb_1     | 2023-08-28  9:56:28 0 [Note] Starting MariaDB 10.11.4-MariaDB-1:10.11.4+maria~ubu2204 source revision 4e2b93dffef2414a11ca5edc8d215f57ee5010e5 as process 1
mariadb_1     | 2023-08-28  9:56:28 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mariadb_1     | 2023-08-28  9:56:28 0 [Note] InnoDB: Number of transaction pools: 1
mariadb_1     | 2023-08-28  9:56:28 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
mariadb_1     | 2023-08-28  9:56:28 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
mariadb_1     | 2023-08-28  9:56:28 0 [Note] InnoDB: Using liburing
mariadb_1     | 2023-08-28  9:56:28 0 [Note] InnoDB: Initializing buffer pool, total size = 512.000MiB, chunk size = 8.000MiB
mariadb_1     | 2023-08-28  9:56:28 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb_1     | 2023-08-28  9:56:28 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
mariadb_1     | 2023-08-28  9:56:28 0 [Note] InnoDB: 128 rollback segments are active.
mariadb_1     | 2023-08-28  9:56:28 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
mariadb_1     | 2023-08-28  9:56:28 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
mariadb_1     | 2023-08-28  9:56:28 0 [Note] InnoDB: log sequence number 2843577923; transaction id 13703841
mariadb_1     | 2023-08-28  9:56:28 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb_1     | 2023-08-28  9:56:28 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mariadb_1     | 2023-08-28  9:56:28 0 [ERROR] Could not open mysql.plugin table: "File './mysql/plugin.MAD' not found (Errcode: 2 "No such file or directory")". Some plugins may be not loaded
mariadb_1     | 2023-08-28  9:56:28 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
mariadb_1     | 2023-08-28  9:56:28 0 [ERROR] Can't open and lock privilege tables: File './mysql/servers.MAD' not found (Errcode: 2 "No such file or directory")
mariadb_1     | 2023-08-28  9:56:28 0 [Note] Server socket created on IP: '0.0.0.0'.
mariadb_1     | 2023-08-28  9:56:28 0 [Note] Server socket created on IP: '::'.
mariadb_1     | 2023-08-28  9:56:28 0 [ERROR] Fatal error: Can't open and lock privilege tables: File './mysql/roles_mapping.MAD' not found (Errcode: 2 "No such file or directory")
mariadb_1     | 2023-08-28  9:56:28 0 [ERROR] Aborting
mariadb_1     | Warning: Memory not freed: 280
mariadb_1     | 2023-08-28 09:56:30+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mariadb_1     | 2023-08-28 09:56:30+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.4+maria~ubu2204 started.
mariadb_1     | 2023-08-28 09:56:30+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
mariadb_1     | 2023-08-28  9:56:30 0 [Note] Starting MariaDB 10.11.4-MariaDB-1:10.11.4+maria~ubu2204 source revision 4e2b93dffef2414a11ca5edc8d215f57ee5010e5 as process 1
mariadb_1     | 2023-08-28  9:56:30 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mariadb_1     | 2023-08-28  9:56:30 0 [Note] InnoDB: Number of transaction pools: 1
mariadb_1     | 2023-08-28  9:56:30 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
mariadb_1     | 2023-08-28  9:56:30 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
mariadb_1     | 2023-08-28  9:56:30 0 [Note] InnoDB: Using liburing
mariadb_1     | 2023-08-28  9:56:30 0 [Note] InnoDB: Initializing buffer pool, total size = 512.000MiB, chunk size = 8.000MiB
mariadb_1     | 2023-08-28  9:56:30 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb_1     | 2023-08-28  9:56:30 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)

I think that something broke around Fatal error: Can't open and lock privilege tables: File './mysql/roles_mapping.MAD' but I have no idea how to fix it

2. How can we reproduce it?

It just happened with no reason.

3. What behavior do you expect?

Stuff working

4. What could be the cause of your problem?

sudo shutdown -r now ?

5. Can you provide us with example files for testing, error logs, or screenshots?

As above

6. Which software versions do you use?

(a) PhotoPrism Architecture & Build Number: AMD64

(b) Database Type & Version: MariaDB/MySQL

(c) Operating System Types & Versions: Linux Xubuntu with no xwindow

(d) Browser Types & Versions: Does not apply

(e) Ad Blockers, Browser Plugins, and/or Firewall Software? Does not apply

You can find the version/build number of the app in Settings by scrolling to the bottom. Note that MySQL 8 support has been discontinued, see system requirements at https://docs.photoprism.app/getting-started/#system-requirements.

Always provide database and operating system details if it is a backend, import, or indexing issue. Should it be a frontend issue, at a minimum we require you to provide web browser and operating system details. When reporting a performance problem, we ask that you provide us with complete information about your environment, as there may be more than one cause.

7. On what kind of device is PhotoPrism installed?

(a) Device / Processor Type: Terminal HP T630

(b) Physical Memory & Swap Space in GB: 4GB RAM, 4GB Swap

(c) Storage Type: HDD, SSD, RAID, USB, Network Storage: SATA SSD

8. Do you use a Reverse Proxy, Firewall, VPN, or CDN?

No

Originally created by @CezaryDanielNowak on GitHub (Aug 28, 2023). #### 1. What is not working as documented? After a week of idle I restarted the server and web UI stopped working. I'm getting ERR_CONNECTION_REFUSED. When I run docker-compose I get following log ``` cezary@HP-T630-NAS:~$ sudo docker-compose up [sudo] password for cezary: Starting cezary_mariadb_1 ... done Starting cezary_photoprism_1 ... done Attaching to cezary_mariadb_1, cezary_photoprism_1 mariadb_1 | 2023-08-28 09:56:27+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.4+maria~ubu2204 started. mariadb_1 | 2023-08-28 09:56:28+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' photoprism_1 | started 230719 as root (amd64-prod) mariadb_1 | 2023-08-28 09:56:28+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.4+maria~ubu2204 started. photoprism_1 | Problems? Our Troubleshooting Checklists help you quickly diagnose and solve them: photoprism_1 | https://docs.photoprism.app/getting-started/troubleshooting/ photoprism_1 | file umask....: "0002" (u=rwx,g=rwx,o=rx) photoprism_1 | home directory: /photoprism photoprism_1 | assets path...: /opt/photoprism/assets photoprism_1 | storage path..: /photoprism/storage photoprism_1 | config path...: default photoprism_1 | cache path....: default photoprism_1 | backup path...: /photoprism/storage/backups photoprism_1 | import path...: /photoprism/import photoprism_1 | originals path: /photoprism/originals photoprism_1 | running as uid 0 photoprism_1 | /opt/photoprism/bin/photoprism start mariadb_1 | 2023-08-28 09:56:28+00:00 [Note] [Entrypoint]: MariaDB upgrade not required mariadb_1 | 2023-08-28 9:56:28 0 [Note] Starting MariaDB 10.11.4-MariaDB-1:10.11.4+maria~ubu2204 source revision 4e2b93dffef2414a11ca5edc8d215f57ee5010e5 as process 1 mariadb_1 | 2023-08-28 9:56:28 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 mariadb_1 | 2023-08-28 9:56:28 0 [Note] InnoDB: Number of transaction pools: 1 mariadb_1 | 2023-08-28 9:56:28 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions mariadb_1 | 2023-08-28 9:56:28 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts) mariadb_1 | 2023-08-28 9:56:28 0 [Note] InnoDB: Using liburing mariadb_1 | 2023-08-28 9:56:28 0 [Note] InnoDB: Initializing buffer pool, total size = 512.000MiB, chunk size = 8.000MiB mariadb_1 | 2023-08-28 9:56:28 0 [Note] InnoDB: Completed initialization of buffer pool mariadb_1 | 2023-08-28 9:56:28 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes) mariadb_1 | 2023-08-28 9:56:28 0 [Note] InnoDB: 128 rollback segments are active. mariadb_1 | 2023-08-28 9:56:28 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ... mariadb_1 | 2023-08-28 9:56:28 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB. mariadb_1 | 2023-08-28 9:56:28 0 [Note] InnoDB: log sequence number 2843577923; transaction id 13703841 mariadb_1 | 2023-08-28 9:56:28 0 [Note] Plugin 'FEEDBACK' is disabled. mariadb_1 | 2023-08-28 9:56:28 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool mariadb_1 | 2023-08-28 9:56:28 0 [ERROR] Could not open mysql.plugin table: "File './mysql/plugin.MAD' not found (Errcode: 2 "No such file or directory")". Some plugins may be not loaded mariadb_1 | 2023-08-28 9:56:28 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work. mariadb_1 | 2023-08-28 9:56:28 0 [ERROR] Can't open and lock privilege tables: File './mysql/servers.MAD' not found (Errcode: 2 "No such file or directory") mariadb_1 | 2023-08-28 9:56:28 0 [Note] Server socket created on IP: '0.0.0.0'. mariadb_1 | 2023-08-28 9:56:28 0 [Note] Server socket created on IP: '::'. mariadb_1 | 2023-08-28 9:56:28 0 [ERROR] Fatal error: Can't open and lock privilege tables: File './mysql/roles_mapping.MAD' not found (Errcode: 2 "No such file or directory") mariadb_1 | 2023-08-28 9:56:28 0 [ERROR] Aborting mariadb_1 | Warning: Memory not freed: 280 mariadb_1 | 2023-08-28 09:56:30+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' mariadb_1 | 2023-08-28 09:56:30+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.4+maria~ubu2204 started. mariadb_1 | 2023-08-28 09:56:30+00:00 [Note] [Entrypoint]: MariaDB upgrade not required mariadb_1 | 2023-08-28 9:56:30 0 [Note] Starting MariaDB 10.11.4-MariaDB-1:10.11.4+maria~ubu2204 source revision 4e2b93dffef2414a11ca5edc8d215f57ee5010e5 as process 1 mariadb_1 | 2023-08-28 9:56:30 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 mariadb_1 | 2023-08-28 9:56:30 0 [Note] InnoDB: Number of transaction pools: 1 mariadb_1 | 2023-08-28 9:56:30 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions mariadb_1 | 2023-08-28 9:56:30 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts) mariadb_1 | 2023-08-28 9:56:30 0 [Note] InnoDB: Using liburing mariadb_1 | 2023-08-28 9:56:30 0 [Note] InnoDB: Initializing buffer pool, total size = 512.000MiB, chunk size = 8.000MiB mariadb_1 | 2023-08-28 9:56:30 0 [Note] InnoDB: Completed initialization of buffer pool mariadb_1 | 2023-08-28 9:56:30 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes) ``` I think that something broke around `Fatal error: Can't open and lock privilege tables: File './mysql/roles_mapping.MAD'` but I have no idea how to fix it #### 2. How can we reproduce it? It just happened with no reason. #### 3. What behavior do you expect? Stuff working #### 4. What could be the cause of your problem? `sudo shutdown -r now` ? #### 5. Can you provide us with example files for testing, error logs, or screenshots? As above #### 6. Which software versions do you use? (a) PhotoPrism Architecture & Build Number: AMD64 (b) Database Type & Version: MariaDB/MySQL (c) Operating System Types & Versions: Linux Xubuntu with no xwindow (d) Browser Types & Versions: Does not apply (e) Ad Blockers, Browser Plugins, and/or Firewall Software? Does not apply You can find the version/build number of the app in *Settings* by scrolling to the bottom. Note that MySQL 8 support has been discontinued, see system requirements at <https://docs.photoprism.app/getting-started/#system-requirements>. *Always provide database and operating system details if it is a backend, import, or indexing issue. Should it be a frontend issue, at a minimum we require you to provide web browser and operating system details. When reporting a performance problem, we ask that you provide us with complete information about your environment, as there may be more than one cause.* #### 7. On what kind of device is PhotoPrism installed? (a) Device / Processor Type: Terminal HP T630 (b) Physical Memory & Swap Space in GB: 4GB RAM, 4GB Swap (c) Storage Type: HDD, SSD, RAID, USB, Network Storage: SATA SSD #### 8. Do you use a Reverse Proxy, Firewall, VPN, or CDN? No
deekerman 2026-02-20 01:01:38 -05:00
  • closed this issue
  • added the
    question
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#1873
No description provided.