invoiceninja / dockerfiles

Docker files for Invoice Ninja
https://hub.docker.com/r/invoiceninja/invoiceninja
GNU General Public License v2.0
411 stars 267 forks source link

Errors on startup #470

Closed robrecord closed 1 year ago

robrecord commented 1 year ago

Downloading the repo and following the README exactly, I get the following:

Operating system error number 22 in a file operation. Error number 22 means 'Invalid argument' File ./undo_001: 'aio write' returned OS error 122. Cannot continue operation

and then

--initialize specified but the data directory has files in it. Aborting. The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.

Apparently this is due to not having the correct user set. I tried all manner of hacks to force the user but no luck. It would say that the user is ignored due to not running as root.

I noticed in your YouTube video you are performing sudo docker-compose up -d which I am unable to do. With my local docker-engine I can only do this without sudo. It would appear this causes the entire app to fail.

I have tried creating a docker-engine with sudo but this doesn't work either, in a different way,

Any chance it could be modified to run without sudo? Otherwise I am lost. I only want to run this locally for now.

Thank you.

invoiceninja-app-1     | cp: can't create directory '/var/www/app/storage/app': Permission denied
invoiceninja-db-1      | 2022-11-08 13:24:11+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
invoiceninja-db-1      | 2022-11-08 13:24:11+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
invoiceninja-db-1      | 2022-11-08 13:24:11+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
invoiceninja-db-1      | 2022-11-08 13:24:12+00:00 [Note] [Entrypoint]: Initializing database files
invoiceninja-db-1      | 2022-11-08T13:24:12.468462Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
invoiceninja-db-1      | 2022-11-08T13:24:12.468546Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.31) initializing of server in progress as process 79
invoiceninja-db-1      | 2022-11-08T13:24:12.473463Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
invoiceninja-db-1      | 2022-11-08T13:24:12.477971Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
invoiceninja-db-1      | 2022-11-08T13:24:12.926722Z 1 [ERROR] [MY-012592] [InnoDB] Operating system error number 22 in a file operation.
invoiceninja-db-1      | 2022-11-08T13:24:12.926928Z 1 [ERROR] [MY-012596] [InnoDB] Error number 22 means 'Invalid argument'
invoiceninja-db-1      | 2022-11-08T13:24:12.927010Z 1 [ERROR] [MY-012646] [InnoDB] File ./undo_001: 'aio write' returned OS error 122. Cannot continue operation
invoiceninja-db-1      | 2022-11-08T13:24:12.927034Z 1 [ERROR] [MY-012981] [InnoDB] Cannot continue operation.
invoiceninja-db-1      | 2022-11-08 13:24:13+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
invoiceninja-db-1      | 2022-11-08 13:24:13+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
invoiceninja-db-1      | 2022-11-08 13:24:13+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.31-1.el8 started.
invoiceninja-db-1      | 2022-11-08 13:24:13+00:00 [Note] [Entrypoint]: Initializing database files
invoiceninja-db-1      | 2022-11-08T13:24:13.916460Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
invoiceninja-db-1      | 2022-11-08T13:24:13.916556Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.31) initializing of server in progress as process 79
invoiceninja-db-1      | 2022-11-08T13:24:13.918115Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
invoiceninja-db-1      | 2022-11-08T13:24:13.918121Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
invoiceninja-db-1      | 2022-11-08T13:24:13.918449Z 0 [ERROR] [MY-010119] [Server] Aborting
invoiceninja-db-1      | 2022-11-08T13:24:13.919020Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.31)  MySQL Community Server - GPL.
turbo124 commented 1 year ago

looks like a permission issue, the container cannot write to the mysql dir.