./lnms migrate error - "Cache Locks table is ready only"

Hi guys,

Currently we are having troubles updating our librenms.
When we try to fix the issues we get following error:

librenms@monitoring:/opt/librenms$ ./validate.php

Component Version
LibreNMS 23.9.1-122-g651a437e5 (2023-10-24T21:00:56+02:00)
DB Schema 2023_08_02_120455_vendor_ouis_unique_index (255)
PHP 8.1.11
Python 3.8.10
Database MariaDB 10.3.38-MariaDB-0ubuntu0.20.04.1
RRDTool 1.7.2
SNMP 5.8
===========================================

[OK] Composer Version: 2.6.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] Your database is out of date!
[FIX]:
./lnms migrate
Attempt to fix this issue (y or n)?:y

In Connection.php line 795:

SQLSTATE[HY000]: General error: 1036 Table ‘cache_locks’ is read only (Conn
ection: mysql, SQL: update cache_locks set owner = VU5VCF16S9y35zf1, e xpiration = 1698222960 where key = laravel_cache_framework/command-migra
te and (owner = VU5VCF16S9y35zf1 or expiration <= 1698219360))

In Connection.php line 605:

SQLSTATE[HY000]: General error: 1036 Table ‘cache_locks’ is read only

librenms@monitoring:/opt/librenms$ ./daily.sh
Updating to latest codebase OK
Updating Composer packages OK
Updating SQL-Schema FAIL

In Connection.php line 795:

SQLSTATE[HY000]: General error: 1036 Table ‘cache_locks’ is read only (Connection: mysql, SQL: update cache_locks set owner = HyKSxiaCPmBea01K, expiration = 1698223384 where key = laravel_cache_framework/command-migrate and (owner = HyKSx
iaCPmBea01K or expiration <= 1698219784))

In Connection.php line 605:

SQLSTATE[HY000]: General error: 1036 Table ‘cache_locks’ is read only

Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK

How do we fix “Cache_locks”?

Thanks!

I suggest you do a web search for General error: 1036 Table is read only

(from my search seems like it could be permissions or a damaged file)

Hi Murrant,

Unfortunatly I tried to reset some permissions but to no result. the user “librenms” has all privileges to the database.

Tried multiple solutions like:
Changing the enginge to innodb
Tried setting permissions to differtent users
Commenting out “innodb_force_recovery >”

Does anyone had previous encounters like this one with Librenms?

Thanks!

@Jesk I would search generically for anything related to mariadb (or mysql whatever you are using). Your problem isn’t specifically related to LibreNMS.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.