piler can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11.
Hey there,
got a problem upon configuration:
- centos-7
- piler-1.3.8, 2020.03.14
- mysql Ver 15.1 Distrib 10.4.12-MariaDB, for Linux (x86_64) using
readline 5.1 - sphinx 3.2.1
Everythings seems to work, except that piler will not work after
starting mariadb:
Apr 07 17:07:22 archive03 piler[1361]: Got ERROR: "unknown: Can't lock
aria control file '/var/lib/mysql/aria_log_control' for exclusive use,
error: 11. Will retry for 30 seconds" errno: 2000
Apr 07 17:07:53 archive03 piler[1361]: Got ERROR: "unknown: Got error
'Could not get an exclusive lock; file is probably in use by another
process' when trying to use aria control file
'/var/lib/mysql/aria_log_control'" errno: 2000
Apr 07 17:07:53 archive03 piler[1361]: Got ERROR: "Plugin 'Aria' init
function returned error." errno: 2000
Apr 07 17:07:53 archive03 piler[1361]: Got ERROR: "Plugin 'Aria'
registration as a STORAGE ENGINE failed." errno: 2000
Apr 07 17:07:53 archive03 piler[1361]: Got ERROR: "InnoDB: Unable to
lock /var/lib/mysql/ibdata1 error: 11" errno: 2000
Starting piler before mariadb works, IF: /var/lib/* has permission for
piler and will be corrected after initializing.
However, once it runs, pilerimport will not work, because it needs an
exclusive lock to the files, which ist not possible, because mariadb
holds them...
I can supply needed config-files, just let me know (my.cnf,
piler.service, mariadb.service, chown/mod of /var/lib/mysql)...
Thank you in advance,
greetings,
T.
Comments (8)
-
repo owner -
reporter Hi Janos.
According to your advices, I did the following.
piler & searchd are stopped at the beginning
root@archive03:~$ systemctl start mariadb root@archive03:~$ mysql -u piler -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 8 Server version: 10.4.12-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show tables from piler; +-------------------+ | Tables_in_piler | +-------------------+ | archiving_rule | | attachment | | audit | | . | <- more entries | . | | . | +-------------------+ 42 rows in set (0.001 sec) MariaDB [(none)]> exit Bye root@archive03:~$ /etc/init.d/rc.piler start starting piler-smtp . . . starting piler . . . Got ERROR: "unknown: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds" errno: 2000 Got ERROR: "unknown: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/var/lib/mysql/aria_log_control'" errno: 2000 Got ERROR: "Plugin 'Aria' init function returned error." errno: 2000 Got ERROR: "Plugin 'Aria' registration as a STORAGE ENGINE failed." errno: 2000 Got ERROR: "InnoDB: Unable to lock /var/lib/mysql/ibdata1 error: 11" errno: 2000 Got ERROR: "InnoDB: Unable to lock /var/lib/mysql/ibdata1 error: 11" errno: 2000 Got ERROR: "InnoDB: Unable to lock /var/lib/mysql/ibdata1 error: 11" errno: 2000 Got ERROR: "InnoDB: Unable to lock /var/lib/mysql/ibdata1 error: 11" errno: 2000 [... to be continued ...] root@archive03:~$ ls -la /var/lib/mysql/ total 221284 drwxr-xr-x 5 mysql mysql 286 Apr 9 12:47 ./ drwxr-xr-x. 32 root root 4096 Mar 30 16:45 ../ drwxrwx--- 2 mysql mysql 4096 Mar 30 13:47 mysql/ drwx------ 2 mysql mysql 20 Mar 30 13:47 performance_schema/ drwxrwx--- 2 mysql mysql 4096 Mar 30 13:17 piler/ -rw-rw---- 1 mysql mysql 5 Apr 9 12:44 archive03.pid -rw-rw---- 1 mysql mysql 73728 Apr 9 12:42 aria_log.00000001 -rw-rw---- 1 mysql mysql 52 Apr 9 12:42 aria_log_control -rw-rw---- 1 mysql mysql 2955 Apr 9 12:42 ib_buffer_pool -rw-rw---- 1 mysql mysql 79691776 Apr 9 12:42 ibdata1 -rw-rw---- 1 mysql mysql 67108864 Apr 9 12:44 ib_logfile0 -rw-rw---- 1 mysql mysql 67108864 Apr 8 10:22 ib_logfile1 -rw-rw---- 1 mysql mysql 12582912 Apr 9 12:44 ibtmp1 -rw-rw---- 1 mysql mysql 0 Mar 24 16:34 multi-master.info srwxrwxrwx 1 mysql mysql 0 Apr 9 12:44 mysql.sock= -rw-rw-r-- 1 mysql mysql 16 Mar 30 13:47 mysql_upgrade_info
-- > Rights & Ownership are inherited for contained folders.
- Once mariadb is running, piler will not start, because the lock can't
be done. - If piler starts before mariadb, it messes up the file-ownership, but
starts up. - If this happens, piler holds locks on some files as seen by lsof.
- If ownership and rights are fixed after piler starts, mariadb starts too.
- Piler then is accessible and can use it database, as testet by
creating archiving rules. - If then pilerimport is run, it will not work, as it wants also to get an
exclusive lock as seen above.
It looks like piler wants to start the database again, or i
missunderstood something within
the configuration files, what is indeed possible, but as this is a
"migration" from an older
system, i checked the configs against the old ones.Summary:
- If mariadb runs, piler will not start.
- The database is accessible for the piler user.
Any advice would be really appreciated.
Thanks und Greetings,
T.
- Once mariadb is running, piler will not start, because the lock can't
-
repo owner Please attach /etc/init/rc.piler
-
reporter - attached rc.piler
Here you go, however, it just calls the following:
root@archive03:~$ /usr/local/sbin/piler -d Got ERROR: "unknown: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds" errno: 2000
-
repo owner OK. Please do the following. Stop any piler related processes. Then run the following command manually:
/usr/local/sbin/piler-smtp
it should not return the prompt, we are testing for now. Then run the following command:
ls -la /usr/local/sbin/piler
/usr/local/sbin/piler
I’d like to see all outputs as well as the last entries from the mail log.
-
reporter All piler services are stopped, just the database is running.
Ok, this is it:
/usr/local/sbin/piler-smtp ->
no prompt, runningls -la /usr/local/sbin/piler ->
-rwxr-xr-x 1 root root 96672 Mar 24 14:10 /usr/local/sbin/piler*/usr/local/sbin/piler ->
Got ERROR: "unknown: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds" errno: 2000
Got ERROR: "unknown: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/var/lib/mysql/aria_log_control'" errno: 2000
Got ERROR: "Plugin 'Aria' init function returned error." errno: 2000
Got ERROR: "Plugin 'Aria' registration as a STORAGE ENGINE failed." errno: 2000
Got ERROR: "InnoDB: Unable to lock /var/lib/mysql/ibdata1 error: 11" errno: 2000
... continues ...tail /var/log/maillog ->
Apr 9 16:44:16 archive03 piler-smtp[5805]: got signal: 2, Interrupt
Apr 9 16:44:16 archive03 piler-smtp[5805]: piler-smtp has been terminated
Apr 9 16:44:28 archive03 piler-smtp[5975]: reloaded config: /usr/local/etc/piler/piler.conf
Apr 9 16:44:28 archive03 piler-smtp[5975]: piler-smtp 1.3.8, build 998 startingThats all.
-
reporter Ok,
I've found the problem and I beg your pardon.
I mistakenly linked a wrong file within /usr/lib64/ , I've corrected this and did a new configure --opts; make clean ; make install and now piler starts the way it should. Thank you for your attention, anyway.
-
repo owner - changed status to invalid
- Log in to comment
Hello Torsten. Something is not right with your setup. User piler needs no permission for /var/lib at all. Pilerimport has nothing to do with mysql datafiles. I believe that /var/lib/mysql permissions and ownership is invalid that’s why mysqld complains.
So fix it first, then verify that mysqld runs properly, and no error message. Then try connecting with the mysql client to the piler database as the mysql user piler. Don’t proceed to pilerimport until this works.