docker icon indicating copy to clipboard operation
docker copied to clipboard

Restart of containers after setup hangs without AKAUNTING_SETUP=true #57

Open gromain opened this issue 2 years ago • 4 comments

Basically, this is a duplicate of #57.

I encounter the exact same issue.

I'm running Akaunting from the official docker repository, in a clean Alpine VM hosted in Proxmox. Alpine is set up properly with docker and docker-compose. I followed exactly the steps from the README.md from this repository.

Setup works great when running docker-compose with AKAUNTING_SETUP=true.

However, after I stop and restart the container without AKAUNTING_SETUP, I cannot connect anymore. I have a 500 error on the POST on the /auth/login page followed by a javascript error in one of the scripts.

This is the log from Firefox DevTools when clicking on Login:

18:58:34.277 XHRPOSThttps://invoice.bazile.io/auth/login
[HTTP/1.1 500 Internal Server Error 0ms]
	
POST
	https://invoice.bazile.io/auth/login
Status
500
Internal Server Error
VersionHTTP/1.1
Transferred0 B (33 B size)
Referrer Policystrict-origin-when-cross-origin
Request PriorityHighest

18:58:34.307 TypeError: this.errors is undefined
    value https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    anonymous https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5 line 7 > Function:4
    _render https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    r https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    get https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    run https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    yn https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    ot https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    et https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    promise callback*Ye https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    ot https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    update https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    update https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    notify https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    set https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    value https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    value https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    promise callback*value https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    onSubmit https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    submit https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5 line 7 > Function:3
    Ve https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    n https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
    _wrapper https://invoice.bazile.io/public/js/auth/common.min.js?v=3.0.5:7
common.min.js:7:11718

This is the log from docker-compose when running without AKAUNTING_SETUP=true:

invoice:~/docker# docker-compose up
Creating network "docker_default" with the default driver
Creating akaunting-db              ... done
Creating docker_akaunting-update_1 ... done
Creating akaunting                 ... done
Attaching to akaunting-db, docker_akaunting-update_1, akaunting
akaunting-db        | 2022-08-09 16:29:32+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.8.3+maria~jammy started.
akaunting-db        | 2022-08-09 16:29:32+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
akaunting-db        | 2022-08-09 16:29:32+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.8.3+maria~jammy started.
akaunting-db        | 2022-08-09 16:29:32+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
akaunting-db        | 2022-08-09 16:29:32 0 [Note] mariadbd (server 10.8.3-MariaDB-1:10.8.3+maria~jammy) starting as process 1 ...
akaunting           | Enabling module rewrite.
akaunting           | To activate the new configuration, you need to run:
akaunting           |   service apache2 restart
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: Using transactional memory
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: Number of transaction pools: 1
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
akaunting-db        | 2022-08-09 16:29:32 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: Using liburing
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: Completed initialization of buffer pool
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: 128 rollback segments are active.
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: log sequence number 1199075; transaction id 2170
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
akaunting-db        | 2022-08-09 16:29:32 0 [Note] Plugin 'FEEDBACK' is disabled.
akaunting-db        | 2022-08-09 16:29:32 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
akaunting-db        | 2022-08-09 16:29:32 0 [Note] Server socket created on IP: '0.0.0.0'.
akaunting-db        | 2022-08-09 16:29:32 0 [Note] Server socket created on IP: '::'.
akaunting-db        | 2022-08-09 16:29:32 0 [Note] InnoDB: Buffer pool(s) load completed at 220809 16:29:32
akaunting-db        | 2022-08-09 16:29:32 0 [Note] mariadbd: ready for connections.
akaunting-db        | Version: '10.8.3-MariaDB-1:10.8.3+maria~jammy'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
akaunting-update_1  | time="2022-08-09T16:29:33Z" level=info msg="Watchtower 1.4.0"
akaunting-update_1  | time="2022-08-09T16:29:33Z" level=info msg="Using no notifications"
akaunting-update_1  | time="2022-08-09T16:29:33Z" level=info msg="Only checking containers with name \"akaunting\" or \"akaunting-db\""
akaunting-update_1  | time="2022-08-09T16:29:33Z" level=info msg="Scheduling first run: 2022-08-10 16:29:33 +0000 UTC"
akaunting-update_1  | time="2022-08-09T16:29:33Z" level=info msg="Note that the first check will be performed in 23 hours, 59 minutes, 59 seconds"
akaunting           | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.4. Set the 'ServerName' directive globally to suppress this message
akaunting           | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.20.0.4. Set the 'ServerName' directive globally to suppress this message
akaunting           | [Tue Aug 09 16:29:41.402889 2022] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.54 (Debian) PHP/8.1.9 configured -- resuming normal operations
akaunting           | [Tue Aug 09 16:29:41.402930 2022] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
akaunting-db        | 2022-08-09 16:30:08 3 [Warning] Access denied for user 'admin'@'%' to database 'forge'
akaunting           | 192.168.1.3 - - [09/Aug/2022:16:30:07 +0000] "GET /auth/login HTTP/1.1" 200 4683 "https://invoice.bazile.io/1/offline-payments/settings" "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0"
akaunting           | 192.168.1.3 - - [09/Aug/2022:16:30:08 +0000] "GET /public/img/auth/login-bg.png HTTP/1.1" 200 110048 "https://invoice.bazile.io/auth/login" "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0"
akaunting-db        | 2022-08-09 16:30:26 4 [Warning] Access denied for user 'admin'@'%' to database 'forge'
akaunting-db        | 2022-08-09 16:30:26 5 [Warning] Access denied for user 'admin'@'%' to database 'forge'
akaunting           | 192.168.1.3 - - [09/Aug/2022:16:30:26 +0000] "POST /auth/login HTTP/1.1" 500 1210 "https://invoice.bazile.io/auth/login" "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0"

The thing that jumps to my eyes is this line, that (re)appears right after clicking on connect: akaunting-db | 2022-08-09 16:30:26 5 [Warning] Access denied for user 'admin'@'%' to database 'forge'.

I've tried the solution offered by @dkleber in his issue (#57), however, I'm then running into the issue of the artisan file not being found for some reason (looks similar to #46) for all the alternate solutions provided (I've tried Debian + Nginx external, Alpine + Nginx external, Alpine + Nginx internal).

gromain avatar Aug 09 '22 17:08 gromain

Hey there, i got the same problem. seems to be from the container. i just used the v-docker-compose.yml & v.Dockerfile and then everything works even after setup

Scarpall avatar Oct 25 '22 21:10 Scarpall

same

so basically the default image from dockerhub doesn't work then

d9media avatar Jan 28 '23 00:01 d9media

Same here, can we get some update about this ?

Like do you aknowledge the problem, is there a solution or workaround using an image on the hub or we have to build the v.dockerfile ?

Is this even the correct place to discuss this ?

Nindouja avatar Feb 20 '23 00:02 Nindouja

Same here, can we get some update about this ?

Like do you aknowledge the problem, is there a solution or workaround using an image on the hub or we have to build the v.dockerfile ?

Is this even the correct place to discuss this ?

I abandoned the project after giving it a test-drive because I found it rather underwhelming.

In order to get it to work, I had to remove the conflicting files inside the container. Basically, by the nature of the installer there is some duplicate files. Since Akaunting doesn't check for already registered classes, PHP throws a fatal error.

d9media avatar Feb 20 '23 00:02 d9media