Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions: ubuntu: focal mariadb10.3 not starting. #1184

Open
junaruga opened this issue Apr 10, 2021 · 2 comments
Open

GitHub Actions: ubuntu: focal mariadb10.3 not starting. #1184

junaruga opened this issue Apr 10, 2021 · 2 comments

Comments

@junaruga
Copy link
Contributor

junaruga commented Apr 10, 2021

This ticket is to manage the issue on the GitHub Actions: Ubuntu focal (20.04) mariadb (>= 10.3) case.

- {os: ubuntu-20.04, ruby: 2.4, db: mariadb10.3, allow-failure: true}

Today I debugged this environment. the CI result with debugging code, the working branch on my repo.

Right now I see the mariadb-server simply does not start correctly. It's not related to SSL.

Does anyone succeeded to install and start MariaDB server >= 10.3 on Ubuntu focal?

So far I saw some issues, and here is my working log as a reference.

Working log.

apparmor issue

I saw this error log by journalctl on the CI environment.

$ journalctl -xe -n 100
...
Warning: :59:43 fv-az206-236 mysqld[2662]: 2021-04-10  8:59:43 0 [Warning] Could not increase number of max_open_files to more than 16384 (request: 32184)
Apr 10 08:59:44 fv-az206-236 audit[2662]: AVC apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=2662 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=115 ouid=0
Apr 10 08:59:44 fv-az206-236 kernel: audit: type=1400 audit(1618045184.198:34): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=2662 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=115 ouid=0
...

It seems that when the called apparmor's profile for the mysqld (that is MySQL, not MariaDB) is enabled, then the mariadb-server is installed, this error happens. The solution is after disabling or removing the profile or removing, installing the mariadb-server.
Here is the detail.
https://mariadb.com/kb/en/the-community-mariadb-troubles-only-running-after-reboot-times-out-when-try/

Warning: Could not increase number of max_open_files ...

I am not sure this is the direct cause of the error.

[Warning] Could not increase number of max_open_files to more than 16384 (request: 32184)

https://mariadb.com/kb/en/could-not-increase-number-of-max_open_files-to-more-than-1024-request-1835/

sudo sed -i -E '/^LimitNOFILE=/ s/[0-9]+/infinity/' /lib/systemd/system/mariadb.service
grep ^LimitNOFILE /lib/systemd/system/mariadb.service
sudo systemctl daemon-reload
  pushd $(my_print_defaults --help | grep my.cnf | xargs find 2>/dev/null | xargs dirname)
  echo "
[mysqld]
max_connections=300
" | sudo tee -a my.cnf
  popd

It seems the warning is disappeared after that.

The mariadb server still does not start

But the mariadb server still does not start.

Apr 10 15:20:29 fv-az133-832 systemd[1]: Starting MariaDB 10.3.25 database server...
Apr 10 15:20:29 fv-az133-832 mysqld[3962]: 2021-04-10 15:20:29 0 [Note] /usr/sbin/mysqld (mysqld 10.3.25-MariaDB-0ubuntu0.20.04.1) starting as process 3962 ...
Apr 10 15:20:30 fv-az133-832 systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Apr 10 15:20:30 fv-az133-832 systemd[1]: mariadb.service: Failed with result 'exit-code'.
Apr 10 15:20:30 fv-az133-832 systemd[1]: Failed to start MariaDB 10.3.25 database server.
@junaruga
Copy link
Contributor Author

I was able to run MariaDB server 10.2, 10.3, 10.4, 10.5 on GitHub Actions using MariaDB's official container.
Here is the testing repository. The case names: ruby 2.4 ... are the ones.
https://github.com/junaruga/mysql-test

https://mariadb.com/kb/en/installing-and-using-mariadb-via-docker/
https://hub.docker.com/_/mariadb

For MariaDB server 10.0, 10.1 right now I see some error. But maybe I can fix it.

The question is which MariaDB client libraries we use for the MariaDB case.
I see many MariaDB client libraries. Which is a proper one?
https://packages.ubuntu.com/search?suite=focal&searchon=names&keywords=mariadb

@junaruga
Copy link
Contributor Author

Now I was able to run MariaDB server 10.0, 10.2, 10.3, 10.4, 10.5 on GitHub Actions using MariaDB's official container on my testing repository.

Here is the log.
https://github.com/junaruga/mysql-test/actions/runs/741008336

I will prepare to send PR to update MariaDB cases on this repository's GitHub Actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant