monica
monica copied to clipboard
docker image keeps having HY000/2002 error
I am trying to run Monica in a docker container on Synology NAS. I keep getting the following error in the app logs
Warning: mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in Standard input code on line 34 Waiting for database to settle... MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Name or service not known
and this from the db logs
Thread pointer: 0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0 thread_stack 0x40000 mysqld(my_print_stacktrace+0x2c)[0x556256bdb16c] mysqld(handle_fatal_signal+0x501)[0x5562564db4c1] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7fe05d2f2730] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b)[0x7fe05cdce7bb] /lib/x86_64-linux-gnu/libc.so.6(abort+0x121)[0x7fe05cdb9535] mysqld(+0x6c63b1)[0x5562564a23b1] mysqld(+0x6c678f)[0x5562564a278f] mysqld(+0x1239736)[0x556257015736] mysqld(+0x1239dee)[0x556257015dee] mysqld(_Z6fil_ioRK9IORequestbRK9page_id_tRK11page_size_tmmPvS8_+0x312)[0x55625701da82] mysqld(+0x11fa0b8)[0x556256fd60b8] mysqld(_Z13buf_read_pageRK9page_id_tRK11page_size_t+0x31)[0x556256fd66e1] mysqld(_Z16buf_page_get_genRK9page_id_tRK11page_size_tmP11buf_block_tmPKcmP5mtr_tb+0x409)[0x556256faa669] mysqld(_Z31trx_rseg_get_n_undo_tablespacesPm+0x13e)[0x556256f46c8e] mysqld(+0x113b9f7)[0x556256f179f7] mysqld(_Z34innobase_start_or_create_for_mysqlv+0x2f7f)[0x556256f1b5cf] mysqld(+0x1011b20)[0x556256dedb20] mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x55)[0x55625652d185] mysqld(+0xbf9706)[0x5562569d5706] mysqld(_Z40plugin_register_builtin_and_init_core_sePiPPc+0x1dc)[0x5562569d75dc] mysqld(+0x6f9c9e)[0x5562564d5c9e] mysqld(_Z11mysqld_mainiPPc+0x768)[0x5562564d7118] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb)[0x7fe05cdbb09b] mysqld(_start+0x2a)[0x5562564cc14a] The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash. 2022-05-17 11:02:45+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.38-1debian10 started. 2022-05-17 11:02:45+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' 2022-05-17 11:02:45+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.38-1debian10 started.
This is my docker compose file
` version: "3.4"
services: app: image: monica:apache depends_on: - db ports: - 4166:80 environment: - DB_HOST=db - DB_DATABASE=monica - DB_USERNAME=monica - DB_PASSWORD=secret volumes: - /volume1/docker/monica:/var/www/html/storage restart: always
db: image: mysql:5.7 environment: - MYSQL_RANDOM_ROOT_PASSWORD=true - MYSQL_DATABASE=monica - MYSQL_USER=monica - MYSQL_PASSWORD=secret volumes: - mysql:/var/lib/mysql restart: always
volumes: data: name: data mysql: name: mysql `
I went through the issues and do see the HY000/2002 error in other submissions but no solutions. Any direction would be appreciated.