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

[BUG] Faulty startup on MacOS #115

Closed
1 task done
colradec opened this issue Jan 4, 2023 · 6 comments
Closed
1 task done

[BUG] Faulty startup on MacOS #115

colradec opened this issue Jan 4, 2023 · 6 comments

Comments

@colradec
Copy link

colradec commented Jan 4, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

mysqld does not start, when accessing the container and trying to execute mysqld commands (-uroot)

ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)

occurs. This problem however, does not exist on Linux (var. distros and prev. MacOS versions).

Expected Behavior

Startup of the mysqld service

Steps To Reproduce

  1. Start Docker
  2. Docker exec into the Container
  3. Log into mysqld

Environment

- OS: MacOS Ventura
- Mac OS Docker App

CPU architecture

arm64

Docker creation

mariadb:
    container_name: llt_mariadb
    build:
      context: ./dockerfiles/mariadb/
      args:
        LLTUID: "${LLTUID}"
        LLTGID: "${LLTGID}"
    ports:
      - 6033:3306
    environment:
      MYSQL_ROOT_PASSWORD: Admin1!
      MYSQL_USER: dev_local
      MYSQL_PASSWORD: dev_local
      DB_HOST: mariadb
    volumes:
      - "mariadb:/config"

  mariadb:
    driver: local
    driver_opts:
      type: nfs
      o: addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3
      device: ":${PWD}/mariadb"

The Dockerfile only has FROM linuxserver/mariadb:latest in it

Container logs

llt_mariadb       | [custom-init] No custom services found, skipping...
llt_mariadb       | [migrations] started
llt_mariadb       | [migrations] no migrations found
llt_mariadb       | usermod: no changes
llt_mariadb       | 
llt_mariadb       | -------------------------------------
llt_mariadb       |           _         ()
llt_mariadb       |          | |  ___   _    __
llt_mariadb       |          | | / __| | |  /  \
llt_mariadb       |          | | \__ \ | | | () |
llt_mariadb       |          |_| |___/ |_|  \__/
llt_mariadb       | 
llt_mariadb       | 
llt_mariadb       | Brought to you by linuxserver.io
llt_mariadb       | -------------------------------------
llt_mariadb       | 
llt_mariadb       | To support LSIO projects visit:
llt_mariadb       | https://www.linuxserver.io/donate/
llt_mariadb       | -------------------------------------
llt_mariadb       | GID/UID
llt_mariadb       | -------------------------------------
llt_mariadb       | 
llt_mariadb       | User uid:    911
llt_mariadb       | User gid:    911
llt_mariadb       | -------------------------------------
llt_mariadb       | 
llt_mariadb       | Setting Up Initial Databases
llt_mariadb       | Installing MariaDB/MySQL system tables in '/config/databases' ...
llt_mariadb       | 2023-01-04 17:44:19 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1017: Can't find file: './mysql/' (errno: 2 "No such file or
llt_mariadb       | OK
llt_mariadb       | 
llt_mariadb       | To start mysqld at boot time you have to copy
llt_mariadb       | support-files/mysql.server to the right place for your system
llt_mariadb       | 
llt_mariadb       | 
llt_mariadb       | PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
llt_mariadb       | To do so, start the server, then issue the following command:
llt_mariadb       | 
llt_mariadb       | '/usr/bin/mysql_secure_installation'
llt_mariadb       | 
llt_mariadb       | which will also give you the option of removing the test
llt_mariadb       | databases and anonymous user created by default.  This is
llt_mariadb       | strongly recommended for production servers.
llt_mariadb       | 
llt_mariadb       | See the MariaDB Knowledgebase at https://mariadb.com/kb
llt_mariadb       | 
llt_mariadb       | You can start the MariaDB daemon with:
llt_mariadb       | cd '/usr' ; /usr/bin/mysqld_safe --datadir='/config/databases'
llt_mariadb       | 
llt_mariadb       | You can test the MariaDB daemon with mysql-test-run.pl
llt_mariadb       | cd '/usr/mysql-test' ; perl mysql-test-run.pl
llt_mariadb       | 
llt_mariadb       | Please report any problems at https://mariadb.org/jira
llt_mariadb       | 
llt_mariadb       | The latest information about MariaDB is available at https://mariadb.org/.
llt_mariadb       | 
llt_mariadb       | Consider joining MariaDB's strong and vibrant community:
llt_mariadb       | https://mariadb.org/get-involved/
llt_mariadb       | 
llt_mariadb       | 2023-01-04 17:44:24 0 [Note] mysqld (server 10.6.10-MariaDB-log) starting as process 171 ...
llt_mariadb       | 2023-01-04 17:44:24 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
llt_mariadb       | 2023-01-04 17:44:24 0 [Note] InnoDB: Number of pools: 1
llt_mariadb       | 2023-01-04 17:44:24 0 [Note] InnoDB: Using ARMv8 crc32 + pmull instructions
llt_mariadb       | 2023-01-04 17:44:24 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts)
llt_mariadb       | 2023-01-04 17:44:24 0 [Note] InnoDB: Using Linux native AIO
llt_mariadb       | 2023-01-04 17:44:24 0 [Note] InnoDB: Initializing buffer pool, total size = 268435456, chunk size = 134217728
llt_mariadb       | 2023-01-04 17:44:24 0 [Note] InnoDB: Completed initialization of buffer pool
@github-actions
Copy link

github-actions bot commented Jan 4, 2023

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

@j0nnymoe
Copy link
Member

j0nnymoe commented Jan 4, 2023

If your dockerfile only has a from line in it, why not just use our image?

Also read our documentation again as those ID Env's are wrong.

@colradec
Copy link
Author

colradec commented Jan 4, 2023

I am manually pulling your image. Replaced the previous Dockerfile with a oneliner.

DB_HOST is set but is not used, the rest should be fine according to your documentation, or am I missing something? The LLTUID/LLTGID are not used in the Dockerfile.

@j0nnymoe
Copy link
Member

j0nnymoe commented Jan 4, 2023

Are you trying to use a pre-existing mariadb config?

Also the NFS share is likely to cause issues as databases don't like remote mounts.

@colradec
Copy link
Author

colradec commented Jan 4, 2023

I use the image as is, only adding some GRANTS to it and creating an empty db.

This is, what i thought, there could be some issues with permissions thus quitting/hanging on startup. It's hard to tell, as the MacOS documentation on NFS is absolutely not sufficient and changelogs are not fully released for such components.

Seems, some NFS problems arose. As stated in the other issue, NFS mounts are not supported by you, so i guess, this issue can be closed, as it works like a charm on Linux.

Many thanks!

@colradec
Copy link
Author

docker/for-mac#6544 The fix can be found here for users of NFS

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