I was just trying to update our self-hosted installation from DE 3.1 to 3.2 and get the following error when trying to update the database according to the upgrade manual:
ERROR 2005 (HY000): Unknown MySQL server host 'db' (2)
I did this step many times before and never ran into any issues here.
This is the command the causes the error message: mysql -h$DB_HOST -p$DB_ROOT_PASSWD dtable_db </opt/seatable/seatable-server-latest/sql/mysql/upgrade/3.2/dtable.sql
the db is usually defined in your docker-compose. If you changed the name of the service to something different, then you have to use this name in the update command.
Here is how the docker-compose looks in most cases…
Hmm, I haven’t changed anything. I just ran the same update procedure as always (except the extras steps where needed along the way according to the manual).
But even looking into the docker-compose.yml I can see:
environment:
- DB_HOST=db
I’m really lost here and our installation is down. Is it possible to run Seatable without the DB upgrade our will this cause problems?
Has the db container properly started? Do you run update command in the seatable container?
Can you check the environment variables in the seatable container? You should find a line DB_HOST = db and you should also be able to ping the db container using ping db (you’ll have to install iputils-ping in the seatable container).
As a last resort, In
you can replace -h$DB_HOST by -h<IP_ADDRESS_DB_CONTAINER> with <IP_ADRESS_DB_CONTAINER> being the IP address of the container ‘db’.
But seatable in the seatable container needs to communicate with mariadb in the db container. And apparently it cannot. So even if you succeed in running the db update, you’ll probably encounter problems running SeaTable.
Container has started properly afaik (Creating seatable-mysql ... done). The command is run in the container. I just repeated those steps to be sure.
Unfortunately I have no idea how to check environment variables or how to install iputils-ping in a container. Really nothing has changed with any configuration on our side.
Does it help if I post my config files (with sensible date redacted ofc)?
Switch into the seatable-docker container with "docker exec -it seatable bash" and then execute the following commands inside the container. Please post the output:
apt update
apt install iputils-ping
ping db
ping $DB_HOST
OK. Out of desperation, I did what we did back in the 80s and 90s when things were going south…I rebooted the server. And guess what, after the reboot the update went through smoothly without any error messages and the installation is now back up and running with the newest and shiniest version of Seatable 3.2. I have no idea what happened and apologize for the trouble. But at the same time want to thank you sooo very much for trying to help out so quickly and patiently. This is really more than rare and very impressive!!!