tiredofit / docker-freepbx

Dockerized FreePBX 15 w/Asterisk 17, Seperate MySQL Database support, and Data Persistence and UCP
MIT License
516 stars 236 forks source link

'freepbx-db' is not accessible, retrying.. #126

Open jennso opened 4 years ago

jennso commented 4 years ago

Hi everyone,

I've tried to troubleshoot this issue for quite sometime, basically if I look at the logs of "freepbx-app" ", I see this message

[WARN] ** [freepbx] MySQL/MariaDB Server 'freepbx-db' is not accessible, retrying.. (410 seconds so far)

I am running a reverse proxy that has worked very well in the past, I am running on Centos 7

my docker version is: Docker version 19.03.6, build 369ce74a3c docker-compose version: docker-compose version 1.25.4, build 8d51620a

my docker compose looks like:

version: '2'

services:
  freepbx-app:
    container_name: freepbx-app
    image: tiredofit/freepbx
    #links:
     #- freepbx-db
    ports:
     #### If you aren't using a reverse proxy
      #- 80:80
     #### If you want SSL Support and not using a reverse proxy
      #- 443:443
      - 5060:5060
      - 5160:5160
      - 18000-18100:18000-18100/udp
     #### Flash Operator Panel
      - 4445:4445
    volumes:
      - ./certs:/certs
      - ./data:/data
      - ./logs:/var/log
      - ./data/www:/var/www/html
     ### Only Enable this option below if you set DB_EMBEDDED=TRUE
     #- ./db:/var/lib/mysql
     ### You can drop custom files overtop of the image if you have made modifications to modules/css/whatever - Use with care
     #- ./assets/custom:/assets/custom

    environment:
      #- DEBUG_MODE=TRUE
     # - HTTPS_METHOD=nohttps
      - VIRTUAL_HOST=real.hostname.com
      #- VIRTUAL_NETWORK=nginx-proxy_frontend
     ### If you want to connect to the SSL Enabled Container
      #- VIRTUAL_PORT=443
      #- VIRTUAL_PROTO=https
      #- VIRTUAL_PORT=80
      #- LETSENCRYPT_HOST=hostname.example.com
      #- LETSENCRYPT_EMAIL=email@example.com

      - ZABBIX_HOSTNAME=freepbx-app

      - RTP_START=18000
      - RTP_FINISH=18100

     ## Use for External MySQL Server
      - DB_EMBEDDED=FALSE

     ### These are only necessary if DB_EMBEDDED=FALSE
      - DB_HOST=freepbx-db
      - DB_PORT=3306
      - DB_NAME=asterisk
      - DB_USER=asterisk
      - DB_PASS=asteriskpass

     ### If you are using TLS Support for Apache to listen on 443 in the container drop them in /certs and set these:
     #- TLS_CERT=cert.pem
     #- TLS_KEY=key.pem

    restart: always
    networks:
      - nginx-proxy_frontend
      - backend

    ### These final lines are for Fail2ban. If you don't want, comment and also add ENABLE_FAIL2BAN=FALSE to your environment
    cap_add:
      - NET_ADMIN
    #privileged: true

  freepbx-db:
    container_name: freepbx-db
    image: tiredofit/mariadb
    restart: always
    volumes:
      - ./db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=password
      - MYSQL_DATABASE=asterisk
      - MYSQL_USER=asterisk
      - MYSQL_PASSWORD=asteriskpass
    networks:
      - backend

  freepbx-db-backup:
    container_name: freepbx-db-backup
    image: tiredofit/db-backup
    links:
     - freepbx-db
    volumes:
      - ./dbbackup:/backup
    environment:
      - ZABBIX_HOSTNAME=freepbx-db-backup
      - DB_HOST=freepbx-db
      - DB_TYPE=mariadb
      - DB_NAME=asterisk
      - DB_USER=asterisk
      - DB_PASS=asteriskpass
      - DB_DUMP_FREQ=1440
      - DB_DUMP_BEGIN=0000
      - DB_CLEANUP_TIME=8640
      - COMPRESSION=BZ
      - MD5=TRUE
    networks:
      - backend
    restart: always

networks:
      nginx-proxy_frontend:
         external: true
      backend:
         driver: bridge

My nginx proxy looks like this:

version: '2'

services:
  nginx-proxy:
    image: jwilder/nginx-proxy:latest
    restart: always
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx/vhost.d:/etc/nginx/vhost.d
      - ./nginx/certs:/etc/nginx/certs
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ./nginx/conf:/etc/nginx/conf.d

    networks:
      - frontend

networks:
   frontend:
     driver: bridge

docker networks looks like this:

NETWORK ID          NAME                            DRIVER              SCOPE
cc335f5e56b8        bridge                             bridge              local
19646b475693       freepbx_backend           bridge              local
0b1e9713981c         host                                 host                 local
f7dcb1edb02c          nginx-proxy_frontend    bridge              local
ea4e55e3b72b        none                                null                   local

The databse logs just stops at starting [INFO] ** [zabbix] Starting Zabbix Agent

I went inside the containers to ping the other containers and I am able to ping between containers, any help would be really appreciated!

tiredofit commented 4 years ago

Hows about getting a docker logs freepbx-db - It's stating that its hung on trying to connect to your DB server..

jennso commented 4 years ago

This are the docker logs of freepbx-db

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] 00-functions: applying... [fix-attrs.d] 00-functions: exited 0. [fix-attrs.d] 01-s6: applying... [fix-attrs.d] 01-s6: exited 0. [fix-attrs.d] 02-zabbix: applying... [fix-attrs.d] 02-zabbix: exited 0. [fix-attrs.d] 03-logrotate: applying... [fix-attrs.d] 03-logrotate: exited 0. [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-startup: executing... [cont-init.d] 00-startup: exited 0. [cont-init.d] 01-timezone: executing... [NOTICE] [timezone] Setting timezone to 'America/Vancouver' [cont-init.d] 01-timezone: exited 0. [cont-init.d] 02-permissions: executing... [cont-init.d] 02-permissions: exited 0. [cont-init.d] 03-zabbix: executing... [cont-init.d] 03-zabbix: exited 0. [cont-init.d] 04-cron: executing... [NOTICE] [cron] Disabling Cron [cont-init.d] 04-cron: exited 0. [cont-init.d] 05-smtp: executing... [NOTICE] [smtp] Disabling SMTP Features [cont-init.d] 05-smtp: exited 0. [cont-init.d] 10-mariadb: executing... [NOTICE] [mariadb] Disabling Scheduled Backups [WARN] [mariadb] MariaDB directory already present, skipping DB creation [cont-init.d] 10-mariadb: exited 0. [cont-init.d] 99-container: executing... [cont-init.d] 99-container: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [INFO] [zabbix] Starting Zabbix Agent

tiredofit commented 4 years ago

Thank you. Was this from a fresh pull? I am wondering if my recent mariadb image has gone screwy.

tiredofit commented 4 years ago

Yes, confirmed, there is something with existing tiredofit/mariadb image. I will find a fix momentarily.

jennso commented 4 years ago

Yea I recently did a new pull, in a new centos vm

tiredofit commented 4 years ago

Found the issue - I have to apologize, one of my routines for stopping services was not functioning correctly. I am building a copy right now for my production servers and then will also build one for Docker Hub in the next 30 minutes and advise when fixed.

jennso commented 4 years ago

Thank you so much for everything! I really appreciate all the hard work :)

tiredofit commented 4 years ago

New version of tiredofit/mariadb:latest is now available. Tagged version of 3.4.4 will take a day or so to appear on Docker Hub, but for now just do a docker-compose pull based on that docker-compose.yml you shared with me and you should be back in business!

If everything goes sideways, just start fresh in a new directory/delete old data volumes since you didn't make it through the first initial install.

Apologies for this.

jennso commented 4 years ago

I pulled the latest and everything is working fine I was able to restore the previous installation i did, thanks so much, I only get this on the logs from freepbx-app

F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log"

I don't think is a big deal It's just logs, but I thought It would be useful.

I also noticed that in "/data/www/admin/modules/ucp/node/", there are files created called core.* like core.1918 that are filling up the main hard drive, I was wondering what they are and If there is a way to disable the creation of these files, and If i can just delete them.

Thank You so much again! :)

kobysh commented 4 years ago

I have the same issue with the same configuration. I trying pulled the latest, but this didn`t solve the problem.

This are the docker logs of freepbx-db

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] 00-functions: applying... [fix-attrs.d] 00-functions: exited 0. [fix-attrs.d] 01-s6: applying... [fix-attrs.d] 01-s6: exited 0. [fix-attrs.d] 02-zabbix: applying... [fix-attrs.d] 02-zabbix: exited 0. [fix-attrs.d] 03-logrotate: applying... [fix-attrs.d] 03-logrotate: exited 0. [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-startup: executing... [cont-init.d] 00-startup: exited 0. [cont-init.d] 01-timezone: executing... [NOTICE] [timezone] Setting timezone to 'America/Vancouver' [cont-init.d] 01-timezone: exited 0. [cont-init.d] 02-permissions: executing... [cont-init.d] 02-permissions: exited 0. [cont-init.d] 03-zabbix: executing... [cont-init.d] 03-zabbix: exited 0. [cont-init.d] 04-cron: executing... [NOTICE] [cron] Disabling Cron [cont-init.d] 04-cron: exited 0. [cont-init.d] 05-smtp: executing... [NOTICE] [smtp] Disabling SMTP Features [cont-init.d] 05-smtp: exited 0. [cont-init.d] 10-mariadb: executing... [WARN] [mariadb] MariaDB data directory is not found, creating initial DB(s) 2020-03-10 6:00:33 0 [ERROR] InnoDB: preallocating 12582912 bytes for file ./ibdata1 failed with error 95 2020-03-10 6:00:33 0 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space 2020-03-10 6:00:33 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again. 2020-03-10 6:00:34 0 [ERROR] Plugin 'InnoDB' init function returned error. 2020-03-10 6:00:34 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2020-03-10 6:00:34 0 [ERROR] Unknown/unsupported storage engine: InnoDB 2020-03-10 6:00:34 0 [ERROR] Aborting [NOTICE] ** [mariadb] Creating asterisk database 2020-03-10 6:00:34 0 [Note] /usr/bin/mysqld (mysqld 10.4.12-MariaDB) starting as process 1358 ... 2020-03-10 6:00:34 0 [Note] InnoDB: Using Linux native AIO 2020-03-10 6:00:34 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2020-03-10 6:00:34 0 [Note] InnoDB: Uses event mutexes 2020-03-10 6:00:34 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2020-03-10 6:00:34 0 [Note] InnoDB: Number of pools: 1 2020-03-10 6:00:34 0 [Note] InnoDB: Using SSE2 crc32 instructions 2020-03-10 6:00:34 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts) 2020-03-10 6:00:34 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M 2020-03-10 6:00:34 0 [Note] InnoDB: Completed initialization of buffer pool 2020-03-10 6:00:34 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2020-03-10 6:00:34 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages! 2020-03-10 6:00:34 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2020-03-10 6:00:35 0 [Note] InnoDB: Starting shutdown... 2020-03-10 6:00:35 0 [ERROR] Plugin 'InnoDB' init function returned error. 2020-03-10 6:00:35 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2020-03-10 6:00:35 0 [ERROR] Unknown/unsupported storage engine: InnoDB 2020-03-10 6:00:35 0 [ERROR] Aborting [cont-init.d] 10-mariadb: exited 0.

tiredofit commented 4 years ago

@kobysh Are you by chance on Windows or OSX?

tiredofit commented 4 years ago

@jennso Those are core dumps meaning the node process is crashing. I'll see if I am able to disable coredumps on specifically the node process for you and look in the mongodb log issue for you and you are right, it shouldn't affect operation at this time.

kobysh commented 4 years ago

@tiredofit by OSX

tiredofit commented 4 years ago

OK, we've seen quite a few issues with MariaDB on OSX. In this case, can you try using the official MariaDB Image to see if it is resolved. Otherwise we'll have to go digging here in the issues to find out where we left off.

tiredofit commented 4 years ago

See #42 for what sounds like the same issue.

kobysh commented 4 years ago

@tiredofit I have used the official MariaDB Image, its compiled, but got this issue

freepbx-app | [INFO] [freepbx] Starting Asterisk freepbx-db | 2020-03-10 17:14:18 12 [Warning] Aborted connection 12 to db: 'asterisk' user: 'asterisk' host: '192.168.96.3' (Got timeout reading communication packets) | chown: changing ownership of '/etc/asterisk/rtp.conf': No such file or directory freepbx-app | chown: changing ownership of '/etc/asterisk/sip.conf': No such file or directory freepbx-app | chown: changing ownership of '/etc/asterisk/sip_notify.conf': No such file or directory freepbx-app | chown: changing ownership of '/etc/asterisk/udptl.conf': No such file or directory freepbx-app | chown: cannot access '/etc/msmtprc': No such file or directory freepbx-app | chmod: cannot access '/etc/msmtprc': No such file or directory freepbx-app | [INFO] [freepbx] Starting Operator Panel freepbx-app | [INFO] ** [freepbx] Web Server Started - Container Initialization Complete freepbx-app | [cont-init.d] 10-freepbx: exited 0. freepbx-app | [cont-init.d] 99-container: executing... freepbx-app | [cont-init.d] 99-container: exited 0. freepbx-app | [cont-init.d] done. freepbx-app | [services.d] starting services freepbx-app | [services.d] done. freepbx-app | 2020-03-10T10:20:02.081-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:03.062-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:04.074-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:05.076-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:06.128-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:07.120-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:08.166-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:09.263-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:10.241-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:11.194-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:12.213-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:13.143-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:14.172-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:15.547-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:16.349-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:17.177-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:18.167-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log" freepbx-app | 2020-03-10T10:20:19.146-0700 F CONTROL [main] Failed global initialization: FileNotOpen: Failed to open "/var/log/mongodb/mongodb.log"

This are the docker logs of freepbx-db

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] 00-functions: applying... [fix-attrs.d] 00-functions: exited 0. [fix-attrs.d] 01-s6: applying... [fix-attrs.d] 01-s6: exited 0. [fix-attrs.d] 02-zabbix: applying... [fix-attrs.d] 02-zabbix: exited 0. [fix-attrs.d] 03-logrotate: applying... [fix-attrs.d] 03-logrotate: exited 0. [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-startup: executing... [cont-init.d] 00-startup: exited 0. [cont-init.d] 01-timezone: executing... [NOTICE] [timezone] Setting timezone to 'America/Vancouver' [cont-init.d] 01-timezone: exited 0. [cont-init.d] 02-permissions: executing... [cont-init.d] 02-permissions: exited 0. [cont-init.d] 03-zabbix: executing... [cont-init.d] 03-zabbix: exited 0. [cont-init.d] 04-cron: executing... [NOTICE] [cron] Disabling Cron [cont-init.d] 04-cron: exited 0. [cont-init.d] 05-smtp: executing... [NOTICE] [smtp] Disabling SMTP Features [cont-init.d] 05-smtp: exited 0. [cont-init.d] 10-mariadb: executing... [WARN] [mariadb] MariaDB data directory is not found, creating initial DB(s) 2020-03-10 6:00:33 0 [ERROR] InnoDB: preallocating 12582912 bytes for file ./ibdata1 failed with error 95 2020-03-10 6:00:33 0 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space 2020-03-10 6:00:33 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again. 2020-03-10 6:00:34 0 [ERROR] Plugin 'InnoDB' init function returned error. 2020-03-10 6:00:34 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2020-03-10 6:00:34 0 [ERROR] Unknown/unsupported storage engine: InnoDB 2020-03-10 6:00:34 0 [ERROR] Aborting [NOTICE] [mariadb] Creating asterisk database 2020-03-10 6:00:34 0 [Note] /usr/bin/mysqld (mysqld 10.4.12-MariaDB) starting as process 1358 ... 2020-03-10 6:00:34 0 [Note] InnoDB: Using Linux native AIO 2020-03-10 6:00:34 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2020-03-10 6:00:34 0 [Note] InnoDB: Uses event mutexes 2020-03-10 6:00:34 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2020-03-10 6:00:34 0 [Note] InnoDB: Number of pools: 1 2020-03-10 6:00:34 0 [Note] InnoDB: Using SSE2 crc32 instructions 2020-03-10 6:00:34 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts) 2020-03-10 6:00:34 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M 2020-03-10 6:00:34 0 [Note] InnoDB: Completed initialization of buffer pool 2020-03-10 6:00:34 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2020-03-10 6:00:34 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages! 2020-03-10 6:00:34 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2020-03-10 6:00:35 0 [Note] InnoDB: Starting shutdown... 2020-03-10 6:00:35 0 [ERROR] Plugin 'InnoDB' init function returned error. 2020-03-10 6:00:35 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2020-03-10 6:00:35 0 [ERROR] Unknown/unsupported storage engine: InnoDB 2020-03-10 6:00:35 0 [ERROR] Aborting [cont-init.d] 10-mariadb: exited 0. [cont-init.d] 20-mariadb-backup: executing... [NOTICE] [mariadb-backup] Disabling Scheduled Backups [cont-init.d] 20-mariadb-backup: exited 0. [cont-init.d] 99-container: executing... [cont-init.d] 99-container: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [zabbix] Starting Zabbix Agent [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [INFO] [mariadb] Starting MariaDB 10.4.12 [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting. [INFO] [mariadb] Starting MariaDB 10.4.12 [s6-init] making user provided files available at /var/run/s6/etc...[INFO] [zabbix] Starting Zabbix Agent exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] 00-functions: applying... [fix-attrs.d] 00-functions: exited 0. [fix-attrs.d] 01-s6: applying... [fix-attrs.d] 01-s6: exited 0. [fix-attrs.d] 02-zabbix: applying... [fix-attrs.d] 02-zabbix: exited 0. [fix-attrs.d] 03-logrotate: applying... [INFO] [mariadb] Starting MariaDB 10.4.12 [fix-attrs.d] 03-logrotate: exited 0. [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-startup: executing... [NOTICE] [container-init] Detected Container that has been restarted - Cleaning '/tmp/state' files [cont-init.d] 00-startup: exited 0. [cont-init.d] 01-timezone: executing... [NOTICE] [timezone] Setting timezone to 'America/Vancouver' [cont-init.d] 01-timezone: exited 0. [cont-init.d] 02-permissions: executing... [cont-init.d] 02-permissions: exited 0. [cont-init.d] 03-zabbix: executing... [cont-init.d] 03-zabbix: exited 0. [cont-init.d] 04-cron: executing... [NOTICE] [cron] Disabling Cron [cont-init.d] 04-cron: exited 0. [cont-init.d] 05-smtp: executing... [NOTICE] [smtp] Disabling SMTP Features [cont-init.d] 05-smtp: exited 0. [cont-init.d] 10-mariadb: executing... [WARN] [mariadb] MariaDB data directory is not found, creating initial DB(s) 2020-03-10 6:02:01 0 [ERROR] mysqld: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds 2020-03-10 6:02:02 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages! 2020-03-10 6:02:02 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2020-03-10 6:02:03 0 [ERROR] Plugin 'InnoDB' init function returned error. 2020-03-10 6:02:03 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2020-03-10 6:02:03 0 [ERROR] Unknown/unsupported storage engine: InnoDB 2020-03-10 6:02:03 0 [ERROR] Aborting [NOTICE] [mariadb] Creating asterisk database 2020-03-10 6:02:03 0 [Note] /usr/bin/mysqld (mysqld 10.4.12-MariaDB) starting as process 1444 ... 2020-03-10 6:02:03 0 [Note] InnoDB: Using Linux native AIO 2020-03-10 6:02:03 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2020-03-10 6:02:03 0 [Note] InnoDB: Uses event mutexes 2020-03-10 6:02:03 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2020-03-10 6:02:03 0 [Note] InnoDB: Number of pools: 1 2020-03-10 6:02:03 0 [Note] InnoDB: Using SSE2 crc32 instructions 2020-03-10 6:02:03 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts) 2020-03-10 6:02:03 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M 2020-03-10 6:02:03 0 [Note] InnoDB: Completed initialization of buffer pool 2020-03-10 6:02:03 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). 2020-03-10 6:02:03 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages! 2020-03-10 6:02:03 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2020-03-10 6:02:03 0 [Note] InnoDB: Starting shutdown... 2020-03-10 6:02:04 0 [ERROR] Plugin 'InnoDB' init function returned error. 2020-03-10 6:02:04 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2020-03-10 6:02:04 0 [ERROR] Unknown/unsupported storage engine: InnoDB 2020-03-10 6:02:04 0 [ERROR] Aborting [cont-init.d] 10-mariadb: exited 0. [cont-init.d] 20-mariadb-backup: executing... [NOTICE] [mariadb-backup] Disabling Scheduled Backups [cont-init.d] 20-mariadb-backup: exited 0. [cont-init.d] 99-container: executing... [cont-init.d] 99-container: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done.

jennso commented 4 years ago

I tried using the mariadb official image too, It worked too the mongobg,log seems to be a normal occurrence in this lateset release, you should be able to access your system now, or wait a bit for the db to load properly.

tiredofit commented 4 years ago

OK Your logs are still showing using the tiredofit/mariadb image. There are a couple other things that look odd here where asterisk files are not appearing.

Can you try with a fresh install and use mariadb official.

I'll review the source code here and try to solve the mongodb log issue, whats troubling is that I'm seeing some other Asterisk files that are not appearing which makes me wonder if the Mac Docker filesystems are not so compatible.

tiredofit commented 4 years ago

MongoDB Log issue is resolved now with new tiredofit/freepbx:15-4.0.0 building on Docker Hub. A couple other bits of cleanup have occurred too along with upgrades. May not solve your Filesystem issue however.

jwhostet commented 4 years ago

Good evening! Is db not accessible still an issue? I've pulled latest from docker hub but having identical issue. My compose file is very similar to OP. I have tried both with and without your db-backup image. (Originally I did without but sense tried with and cleanup up old volumes in between)

tiredofit commented 4 years ago

Resolved. Please post or send me full logs..

jwhostet commented 4 years ago

freepbx-db-logs.txt freepbx-app-logs.txt

attached both app and DB. Should also note I'm using named volumes instead of bind mounts.

tiredofit commented 4 years ago

Strange. Whats your OS and info?

This one stands out in the DB Logs:

2020-03-21 16:12:41 0 [ERROR] InnoDB: preallocating 12582912 bytes for file ./ibdata1 failed with error 95
2020-03-21 16:12:41 0 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space
2020-03-21 16:12:41 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
2020-03-21 16:12:42 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-03-21 16:12:42 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-03-21 16:12:42 0 [ERROR] Unknown/unsupported storage engine: InnoDB
jwhostet commented 4 years ago

DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS" Underlying filesystem is ZFS.

After you pointed out those specific lines I went digging. This appears to be an upstream bug with MariaDB. https://jira.mariadb.org/browse/MDEV-16015

tiredofit commented 4 years ago

Ahh yes, We've been seeing it for a few years now. You can always try the official MariaDB image as opposed to my own. They are mostly the same, but may solve the issue for you and get you going.

jwhostet commented 4 years ago

I was able to use the official image. I specified 10.4.12 tag. Thanks for the help!