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

Latest Build doesn't work (Based on alpine 3.9) #2

Open
gawindx opened this issue May 14, 2019 · 3 comments
Open

Latest Build doesn't work (Based on alpine 3.9) #2

gawindx opened this issue May 14, 2019 · 3 comments

Comments

@gawindx
Copy link

gawindx commented May 14, 2019

Because you are using "alpine-micro" without a tag version in your Dockerfile file, the latest version of this container does not work and you can not connect to the database.

I rebuilt the container, specifying "alpine-micro: 3.8" and the contenter obtained works again.

@gawindx
Copy link
Author

gawindx commented May 15, 2019

I noticed that you modfied the Dockerfile by adding the tag "latest" but I think that I misspoke - maybe my English is not good enough (I'm French)

I found that when the image is created since "alpine-micro 3.9/latest", it is not possible to connect to the databases.

On the other hand, if I modify the dockerfile by specifying the "3.8" tag for the "alpine-micro" version, the image is functional again.

So there is a problem of configuration of mariadb with "alpine-micro 3.9" that makes the image unusable but I can not say which one.

If that helps, you'll find below the logs from an "alpine-mariadb" image used with docker-compose Wordpress.

"
Run scripts in /etc/run_once
Build of nimmis/alpine-mariadb:latest, date: 2019-05-10T12:24:57Z
Build of nimmis/alpine-micro:3.9, date: 2019-05-10T12:10:02Z
Run scripts is /etc/run_always
seting root password to hEynOKy9oMoeV1MQpdrW
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
Started runsvdir, PID is 31
wait for processes to start....
rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
rsyslogd: activation of module imklog failed [v8.40.0 try https://www.rsyslog.com/e/2145 ]
2019-05-14 21:49:08 0 [Note] /usr/bin/mysqld (mysqld 10.3.13-MariaDB-log) starting as process 38 ...
run: crond: (pid 37) 5s
run: mysqld: (pid 38) 5s
run: rsyslogd: (pid 36) 5s
error: rsyslog:1 duplicate log entry for /var/log/messages
error: found error in file rsyslog, skipping
error: stat of /var/log/auth.log failed: No such file or directory
error: stat of /var/log/boot.log failed: No such file or directory
error: stat of /var/log/kern.log failed: No such file or directory
error: stat of /var/log/mail.log failed: No such file or directory
"

@nimmis
Copy link
Owner

nimmis commented May 16, 2019

On which platform are you using?
Tested on Mac with 18.09.2

Run scripts in /etc/run_once
Build of nimmis/alpine-mariadb:latest, date: 2019-05-15T09:01:39Z
Build of nimmis/alpine-micro:3.9, date: 2019-05-10T12:10:02Z
Run scripts is /etc/run_always
set root to random password MGQ1MTM5M2VkYzQ1
Installing MariaDB/MySQL system tables in '/data/db/mysql/' ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system


PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h 27b478f7b0aa password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

You can start the MariaDB daemon with:
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/data/db/mysql/'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/mysql-test' ; perl mysql-test-run.pl

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

wait for db to start.
190516 08:53:19 mysqld_safe Logging to '/data/db/mysql//27b478f7b0aa.err'.
190516 08:53:19 mysqld_safe Starting mysqld daemon with databases from /data/db/mysql/
C=2
root password updated
Started runsvdir, PID is 291
wait for processes to start....
rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
rsyslogd: activation of module imklog failed [v8.40.0 try https://www.rsyslog.com/e/2145 ]
2019-05-16  8:53:21 0 [Note] /usr/bin/mysqld (mysqld 10.3.13-MariaDB-log) starting as process 298 ...
run: crond: (pid 297) 5s
run: mysqld: (pid 298) 5s
run: rsyslogd: (pid 296) 5s

I'll do some more test on other platforms

@gawindx
Copy link
Author

gawindx commented May 16, 2019

I use it on a Fedore Server, version 27 but up to date.

Docker is in version 18.09 (the last available).

I have not tried starting from a blank base, I only work with my existing base.

I use the image as well on the host as for my different site and service and all via docker-compose.

When I use the alpine-micro 3.9 based image, connection to the database is impossible.

mysql -h 127.0.0.1 -u root -p
ERROR 2002 (HY000): Can not connect to MySQL server on '127.0.0.1' (115)

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

2 participants