[MCOL-1166] rpm/debian packages installed from buildbot via repo fail to launch - mysql-bin.index' not found (Errcode: 13 Created: 2018-01-15  Updated: 2018-02-16  Resolved: 2018-02-15

Status: Closed
Project: MariaDB ColumnStore
Component/s: Build
Affects Version/s: 1.1.3
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: David Hill (Inactive) Assignee: David Hill (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2018-02, 2018-03, 2018-04

 Description   

any set of rpms or debian packages that is built from the columnstore buildbot machine can get installed using a yu/apt-get report setup, but they are fail to start in postConfigure. Error ruuing the post-mysqld-install scripts...

This command is being run in the script, which points to the error:

/usr/local/mariadb/columnstore/mysql/scripts/mysql_install_db --rpm --user=mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf --basedir=/usr/local/mariadb/columnstore/mysql
2018-01-15 19:24:20 140465003727744 [ERROR] mysqld: File '/usr/local/mariadb/columnstore/mysql/db/mysql-bin.index' not found (Errcode: 13 "Permission denied")

NOTES: the index file doesnt exist and the directory its looking for it in to locate or creast it has permissions of mysqld:mysql

ls -l db/
total 110608
rw-rw--- 1 mysql mysql 358 Jan 15 19:23 debian-9-pm1-bin.000001
rw-rw--- 1 mysql mysql 26 Jan 15 19:23 debian-9-pm1-bin.index
rw-rw--- 1 mysql mysql 0 Jan 15 19:23 debian-9-pm1-bin.state
rw-rw--- 1 mysql mysql 12582912 Jan 15 19:23 ibdata1
rw-rw--- 1 mysql mysql 50331648 Jan 15 19:23 ib_logfile0
rw-rw--- 1 mysql mysql 50331648 Jan 15 19:23 ib_logfile1
drwx-x-x 2 mysql mysql 4096 Jan 15 19:23 mysql
drwxr-xr-x 2 mysql mysql 4096 Jan 15 18:43 test



 Comments   
Comment by David Hill (Inactive) [ 2018-01-15 ]

chmod -R 777 mysql
root@debian-9-pm1:/usr/local/mariadb/columnstore# /usr/local/mariadb/columnstore/mysql/scripts/mysql_install_db --rpm --user=mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf --basedir=/usr/local/mariadb/columnstore/mysql
Warning: World-writable config file '/usr/local/mariadb/columnstore/mysql/my.cnf' is ignored
Warning: World-writable config file '/usr/local/mariadb/columnstore/mysql/my.cnf' is ignored
Warning: World-writable config file '/usr/local/mariadb/columnstore/mysql/my.cnf' is ignored
Warning: World-writable config file '/usr/local/mariadb/columnstore/mysql/my.cnf' is ignored
2018-01-15 19:32:20 140082770598784 [ERROR] mysqld: Can't create/write to file '/usr/local/mariadb/columnstore/mysql/db/aria_log_control' (Errcode: 13 "Permission denied")
2018-01-15 19:32:20 140082770598784 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/usr/local/mariadb/columnstore/mysql/db/aria_log_control'
2018-01-15 19:32:20 140082770598784 [ERROR] Plugin 'Aria' init function returned error.
2018-01-15 19:32:20 140082770598784 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
ERROR: 1 Can't create/write to file '/usr/local/mariadb/columnstore/mysql/db/mysql/db.MYI' (Errcode: 13 "Permission denied")
2018-01-15 19:32:20 140082770598784 [ERROR] Aborting

2018-01-15 19:32:20 140081767642880 [ERROR] InnoDB: Cannot open '/usr/local/mariadb/columnstore/mysql/db/ib_buffer_pool.incomplete' for writing: Permission denied

Installation of system tables failed! Examine the logs in

Comment by David Hill (Inactive) [ 2018-01-15 ]

Also only happening on builds from buildbot, local build machines 1.1.3 builds installed without issues

Comment by David Hill (Inactive) [ 2018-01-17 ]

problem now showing up on debian 8 VM builds now..

post-mysqld-install Successfully Completed
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/usr/local/mariadb/columnstore/mysql/lib/mysql/mysql.sock' (2)
Error running post-mysql-install, /tmp/post-mysql-install.log
Exiting...
root@debian8-pm1:~# cat /tmp/post-mysql-install.log
Starting MySQL
. failed!
checking for engine columnstore...
columnstore doesn't exist
root@debian8-pm1:~# cat /tmp/post-mysqld-install.log
2018-01-17 20:44:31 140136345630528 [ERROR] mysqld: File '/usr/local/mariadb/columnstore/mysql/db/mysql-bin.index' not found (Errcode: 13 "Permission denied")
2018-01-17 20:44:31 140136345630528 [ERROR] Aborting

root@debian8-pm1:~#

Comment by David Hill (Inactive) [ 2018-01-26 ]

retried build on Jan 26th, same issue

post-mysqld-install Successfully Completed
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/usr/local/mariadb/columnstore/mysql/lib/mysql/mysql.sock' (2)
Error running post-mysql-install, /tmp/post-mysql-install.log
Exiting...

Comment by David Hill (Inactive) [ 2018-02-14 ]

additional information

when package is install as root with root user permissions, the error occurs when i run post-install and postConfigure as root
but when I change the owner of the /usr/local/mariadb to buildbot. then run post-install and postConfigure as buildbot user, it works...

Comment by David Hill (Inactive) [ 2018-02-14 ]

down to the problem with this centos.. for some reason, this file cant get created by the mysqld user during setup..

/usr/local/mariadb/columnstore/mysql/scripts/mysql_install_db --rpm --user=mysql --defaults-extra-file=/usr/local/mariadb/columnstore/mysql/my.cnf --basedir=/usr/local/mariadb/columnstore/mysql
2018-02-14 21:07:54 140226987882560 [ERROR] mysqld: File '/usr/local/mariadb/columnstore/mysql/db/mysql-bin.index' not found (Errcode: 13 "Permission denied")
2018-02-14 21:07:54 140226987882560 [ERROR] Aborting

sudo -u mysql touch /usr/local/mariadb/columnstore/mysql/db/mysql-bin.index
touch: cannot touch ‘/usr/local/mariadb/columnstore/mysql/db/mysql-bin.index’: Permission denied
[root@ip-10-0-0-77 bin]# ll ../mysql/
total 76
drwx------. 2 mysql mysql 4096 Feb 14 21:07 bin
rw-rr-. 1 mysql mysql 1215 Feb 14 20:07 calremoveuserpriority.sql
rw-rr-. 1 mysql mysql 2563 Feb 14 20:07 calsetuserpriority.sql
rw-rr-. 1 mysql mysql 1854 Feb 14 20:07 calshowprocesslist.sql
rw-rr-. 1 mysql mysql 5371 Feb 14 20:07 columnstore_info.sql
drwxr-xr-x. 4 mysql mysql 29 Feb 14 21:07 db
rw-rr-. 1 mysql mysql 876 Feb 14 20:07 dumpcat_mysql.sql
drwxr-xr-x. 3 mysql mysql 18 Feb 14 21:07 include
drwx------. 2 mysql mysql 18 Feb 14 21:06 init.d
-rwxr-xr-x. 1 mysql mysql 6247 Feb 14 20:07 install_calpont_mysql.sh
drwxr-xr-x. 4 mysql mysql 4096 Feb 14 21:07 lib
drwx------. 2 mysql mysql 18 Feb 14 21:06 logrotate.d
rw-rr-. 1 mysql mysql 6076 Feb 14 20:07 my.cnf
drwx------. 2 mysql mysql 4096 Feb 14 21:06 my.cnf.d
-rwxr-xr-x. 1 mysql mysql 13532 Feb 14 20:07 mysql-Columnstore
drwx------. 2 mysql mysql 29 Feb 14 21:06 scripts
drwxr-xr-x. 33 mysql mysql 4096 Feb 14 21:07 share
rw-rr-. 1 mysql mysql 1591 Feb 14 20:07 syscatalog_mysql.sql
[root@ip-10-0-0-77 bin]# ll ../mysql/db/
total 0
drwx-x-x. 2 mysql mysql 6 Feb 14 21:07 mysql
drwxr-xr-x. 2 mysql mysql 6 Feb 14 21:07 test
[root@ip-10-0-0-77 bin]#

Comment by David Hill (Inactive) [ 2018-02-15 ]

fixed, problem was the umask setting in the /data/buildbot/bb-worker/buildbot.tac file on master and workers.

changed from 0000 to 0022

Comment by Andrew Hutchings (Inactive) [ 2018-02-16 ]

Switched the fixed version to N/A as this doesn't affect a specific version and probably shouldn't be in the release notes

Generated at Thu Feb 08 02:26:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.