Closed mcwieger closed 3 years ago
What do the logs show for the database? docker-compose logs spotweb_db
.
The DB instance get's a docker IP, it should be reachable using the spotweb_db hostname, best not to hardcode an IP as it can change (which is my suspicion)
This is the log file:
spotweb_db | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
spotweb_db | [s6-init] ensuring user provided files have correct perms...exited 0.
spotweb_db | [fix-attrs.d] applying ownership & permissions fixes...
spotweb_db | [fix-attrs.d] done.
spotweb_db | [cont-init.d] executing container initialization scripts...
spotweb_db | [cont-init.d] 01-envfile: executing...
spotweb_db | [cont-init.d] 01-envfile: exited 0.
spotweb_db | [cont-init.d] 10-adduser: executing...
spotweb_db |
spotweb_db | -------------------------------------
spotweb_db | _ ()
spotweb_db | | | ___ _ __
spotweb_db | | | / __| | | / \
spotweb_db | | | \__ \ | | | () |
spotweb_db | |_| |___/ |_| \__/
spotweb_db |
spotweb_db |
spotweb_db | Brought to you by linuxserver.io
spotweb_db | -------------------------------------
spotweb_db |
spotweb_db | To support LSIO projects visit:
spotweb_db | https://www.linuxserver.io/donate/
spotweb_db | -------------------------------------
spotweb_db | GID/UID
spotweb_db | -------------------------------------
spotweb_db |
spotweb_db | User uid: 1026
spotweb_db | User gid: 101
spotweb_db | -------------------------------------
spotweb_db |
spotweb_db | [cont-init.d] 10-adduser: exited 0.
spotweb_db | [cont-init.d] 30-config: executing...
spotweb_db | [cont-init.d] 30-config: exited 0.
spotweb_db | [cont-init.d] 40-initialise-db: executing...
spotweb_db | [cont-init.d] 40-initialise-db: exited 0.
spotweb_db | [cont-init.d] 90-custom-folders: executing...
spotweb_db | [cont-init.d] 90-custom-folders: exited 0.
spotweb_db | [cont-init.d] 90-warning: executing...
spotweb_db |
spotweb_db | ******************************************************
spotweb_db | ******************************************************
spotweb_db | * *
spotweb_db | * *
spotweb_db | * This image will soon be rebased *
spotweb_db | * from ubuntu to alpine. *
spotweb_db | * Please be aware, this may cause issues *
spotweb_db | * It is strongly recommended to make backups *
spotweb_db | * of your config and databases before *
spotweb_db | * updating your image to the alpine base. *
spotweb_db | * *
spotweb_db | * *
spotweb_db | ******************************************************
spotweb_db | ******************************************************
spotweb_db | [cont-init.d] 90-warning: exited 0.
spotweb_db | [cont-init.d] 99-custom-scripts: executing...
spotweb_db | [custom-init] no custom files found exiting...
spotweb_db | [cont-init.d] 99-custom-scripts: exited 0.
spotweb_db | [cont-init.d] done.
spotweb_db | [services.d] starting services
spotweb_db | [services.d] done.
spotweb_db | Warning: World-writable config file '/etc/mysql/conf.d/custom.cnf' is ignored
spotweb_db | 210819 17:22:08 mysqld_safe Logging to syslog.
spotweb_db | Warning: World-writable config file '/etc/mysql/conf.d/custom.cnf' is ignored
spotweb_db | 210819 17:22:08 mysqld_safe Starting mysqld daemon with databases from /config/databases
And spotweb:
spotweb | Creating database configuration
spotweb | rm: cannot remove '/var/www/spotweb/dbsettings.inc.php': No such file or directory
spotweb | Setting (PHP) time zone to Europe/Amsterdam
spotweb |
spotweb | * Starting periodic command scheduler cron
spotweb | ...done.
spotweb | Enabling module rewrite.
spotweb | To activate the new configuration, you need to run:
spotweb | service apache2 restart
spotweb | Enabling module expires.
spotweb | To activate the new configuration, you need to run:
spotweb | service apache2 restart
spotweb | Considering dependency filter for deflate:
spotweb | Module filter already enabled
spotweb | Module deflate already enabled
spotweb | * Restarting Apache httpd web server apache2
spotweb | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
spotweb | ...done.
Ok, looks ok. Did you change the hostname?
Do you mean SPOTWEB_DB_HOST? See my starting post, I tried all possible names/ip addresses, to my knowledge...
Did you change it to spotweb_db? I didn't see that in your post.
I tried creating both containers without docker-compose, with the full command with parameters via the command line. That worked, with the internal docker ip (172.x.x.x).
Might be related to: https://github.com/jgeusebroek/docker-spotweb/issues/36.
Thanks for the update.
I'm running the docker image on Synology. I stopped the package and after this, spotweb didn't work anymore.
I re-created the containers with docker-compose:
This gives the following error message when trying to connect to spotweb on port 8082:
When changing SPOTWEB_DB_HOST to 192.168.2.201 (host ip) or 172.18.0.2 (docker ip) the same message is displayed.
Changing to localhost results in:
Changing to 127.0.0.1 results in:
It doesn't matter if I run the install.php script or change it in dbsettings.inc.php directly.
I tried to connect to mysql in the mariadb container with spotweb@spotweb, that works. So password shouldn't be the issue...
I remember having this issue on initial setup as well. At that time, it seemed it randomly accepted 172.18.0.2 at the 100th try, but I still don't know why or how...
Any ideas?