Open yaronr opened 5 years ago
That's interesting. InnoDB should be available in the tiredofit/mariadb image. What's the host system you are running this on? I had some issues with MariaDB in the past on Windows, but this was years back and haven't tried since.
MacOS
Can you try swapping out the line in the docker compose from image: tiredofit/mariadb
to image: mariadb
and see if you encounter the same issue?
freepbx-db | 2018-12-03 19:00:16 0 [Note] mysqld (mysqld 10.3.11-MariaDB-1:10.3.11+maria~bionic) starting as process 1 ... freepbx-db | 2018-12-03 19:00:16 0 [Note] InnoDB: Using Linux native AIO freepbx-db | 2018-12-03 19:00:16 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins freepbx-db | 2018-12-03 19:00:16 0 [Note] InnoDB: Uses event mutexes freepbx-db | 2018-12-03 19:00:16 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 freepbx-db | 2018-12-03 19:00:16 0 [Note] InnoDB: Number of pools: 1 freepbx-db | 2018-12-03 19:00:16 0 [Note] InnoDB: Using SSE2 crc32 instructions freepbx-db | 2018-12-03 19:00:16 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M freepbx-db | 2018-12-03 19:00:16 0 [Note] InnoDB: Completed initialization of buffer pool freepbx-db | 2018-12-03 19:00:16 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). freepbx-db | 2018-12-03 19:00:16 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! freepbx-db | 2018-12-03 19:00:16 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error freepbx-db | 2018-12-03 19:00:17 0 [Note] InnoDB: Starting shutdown... freepbx-db | 2018-12-03 19:00:17 0 [ERROR] Plugin 'InnoDB' init function returned error. freepbx-db | 2018-12-03 19:00:17 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. freepbx-db | 2018-12-03 19:00:17 0 [Note] Plugin 'FEEDBACK' is disabled. freepbx-db | 2018-12-03 19:00:17 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded freepbx-db | 2018-12-03 19:00:17 0 [ERROR] Unknown/unsupported storage engine: InnoDB freepbx-db | 2018-12-03 19:00:17 0 [ERROR] Aborting
Regards, Yaron Rosenbaum (Y)
On 3 Dec 2018, at 17:56, Dave Conroy notifications@github.com wrote:
Can you try swapping out the line in the docker compose from image: tiredofit/mariadb to image: mariadb and see if you encounter the same issue?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tiredofit/docker-freepbx/issues/42#issuecomment-443760575, or mute the thread https://github.com/notifications/unsubscribe-auth/AGB3ZBdmLGVzgqszHJZuPoMYeChhF3MPks5u1UmqgaJpZM4Y8zt4.
Not having a mac to test this on I'm stumped. You are seeing the same issue with the "official" MariaDB/Mysql image that you are with mine so I'm leaning towards this being more of a docker/os issue. Have you tried any other images that rely on a DB and do they work?
I suppose we could also try having you create a named volume, replacing the ./db:/var/lib/mysql
section with something like freepbx-db-data:/var/lib/mysql
and then add this at the bottom of your docker-compose.yml file:
volumes:
freepbx-db-data:
driver: local
Same. Historically I've been using all sorts of databases successfully, but I haven't touched Docker for a couple of years, (so I'm quite rusty). I tried the above, same results. Could this be relevant? https://bugs.mysql.com/bug.php?id=73521 I suspect that the key clue here is the first error in the sequence: "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!"
I think you are doing everything right - This does seem like OS specific, hopefully another Mac user can jump in here. There is another way you can do this. If you setup a local copy of Mysql on your system, let it listen on your Private IP Address and then alter the freepbx-app environment variables for DB_HOST, DB_NAME, DB_USER, DB_PASS to point to your newly setup Mysql Server this will at least let you try out the image and see if its for you. Careful, don't put 127.0.0.1 in the DB_HOST as that won't break out of the container. You'll also need to create the DB and add the user to the permissions of the database ahead of time, as that is what the MariaDB image does upon startup.
i have a macbook pro here so i will build and test here and return my results @yaronr what OS and docker version are you using? @yaronr what does your docker-compose file look like? any changes?
Just had the same experience, using Docker for Mac.
Seems definitely not an issue of this image, rather a general problem of MariaDB and Docker for Win/Mac, see https://github.com/docker-library/mariadb/issues/95.
Seems this is not working when the DB files are mapped to the host filesystem (https://github.com/docker-library/mariadb/issues/95#issuecomment-380828108). Starting the container without a mapped volume worked. A named volume is supposedly also working (didn't try).
Got it running with this service definition:
freepbx-db:
container_name: freepbx-db
image: mariadb:10.4
restart: always
volumes:
- ./db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=***
- MYSQL_DATABASE=asterisk
- MYSQL_USER=asterisk
- MYSQL_PASSWORD=***
command: 'mysqld --innodb-flush-method=fsync'
Don't know whats happening on the Mac, but the same problem happens on Ubuntu 18.04 Server if the DB directory is on a ZFS based filesystem. If you move the "db" directory onto an ext4 filesystem it works perfectly.
@PARitter In relation to that, I believe this issue https://github.com/docker-library/mysql/issues/57 relates to the ZFS filesystem.
Unfortunately that does not seem to fix it. Tried the setting from that issue with no effect.
Too bad - I run strictly btrfs on my filesystems, however haven't encountered this. The puzzle continues.
FWIW - I see the same issue on my Macbook. Trying @simonihmig's solution did not work for me either. Moving to internal storage instead of the volume mapping removes the error.
That's problem with fallocate on some FS (ZFS, volume mapping (ext4) and etc):
bash-5.0# fallocate -l1G /var/lib/mysql/test.dat fallocate: fallocate '/var/lib/mysql/test.dat': Not supported
Hi buddy, First - thanks for taking the effort and putting this repository in place. I'm looking for a quick way to test out VOIP for my home. I ran the docker-compose, and keep getting this error in a loop:
"freepbx-app | [freepbx] MariaDB Server 'freepbx-db' unavailable. Sleeping a little bit ... freepbx-db | [mariadb] Starting MariaDB 10.3.9 freepbx-db | 2018-12-01 1:17:29 0 [Note] /usr/bin/mysqld (mysqld 10.3.9-MariaDB) starting as process 9871 ... freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Using Linux native AIO freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Uses event mutexes freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Number of pools: 1 freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Using SSE2 crc32 instructions freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Completed initialization of buffer pool freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). freepbx-db | 2018-12-01 1:17:29 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! freepbx-db | 2018-12-01 1:17:29 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error freepbx-db | 2018-12-01 1:17:29 0 [Note] InnoDB: Starting shutdown... freepbx-db | 2018-12-01 1:17:29 0 [ERROR] Plugin 'InnoDB' init function returned error. freepbx-db | 2018-12-01 1:17:29 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. freepbx-db | 2018-12-01 1:17:29 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded freepbx-db | 2018-12-01 1:17:29 0 [ERROR] Unknown/unsupported storage engine: InnoDB freepbx-db | 2018-12-01 1:17:29 0 [ERROR] Aborting"