Error updating 4.2 to 4.3: mariadb unhealthy

Switch Installation Method (v4.3) - SeaTable Admin Manual

I tried to change to the new installation method as described in this web page and had no problems up to step 7, the last step gave me this error:
image

Hey yGuo,

we added a healthcheck to the mariadb container, that does some check at startup. This healthcheck requires a specific mariadb-user to execute these checks. This user was added with mariadb mid of 2023. So it seems that you started with a SeaTable version which recommended an older mariadb version and now after the upgrade to the current mariadb this healthcheck user is not there.

So much for explanation. There are two ways forward:

A) quick fix

You can fix this immediately by just open your /opt/seatable-compose/seatable-server.yml file and comment these lines I marked in orange:

It should look like this. Make sure that you keep the indentations because otherwise docker compose up -d will not work anymore.

  depends_on:
    #mariadb:
      #condition: service_health
    ...
    #healthchecks:
      #test: ...

B) The real fix

To really fix this problem, the healthcheck login should be created. Give me some minutes to write the necessary steps and add these to the manual.

1 Like

I updated the admin manual accordingly: Extra Upgrade Notices - SeaTable Admin Manual.

Here is the summary:

I have provided a simple script for you to download and create the necessary health check user. Please use the following commands to download and execute it. The script assumes the MariaDB container is running.

curl -sSL https://admin.seatable.io/downloads/add_mariadb_healthcheck.sh | bash

The script essentially adds the user healthcheck to the MariaDB database and stores the credentials in a file accessible to the container."

After the execution, of the script, the container should become healthy again and you don’t have to comment the healthcheck in the seatable-server.yml anymore.

Hello cdb,
Thank you very much for your help.

Following the method A) Quick Fix, the error with mariadb unhealthy no longer occurs, but the seatable-server remains unhealthy.

Next, I tried method B, unfortunately, it didn’t run successfully. There may be other issues with our server.

Thank you again, and I look forward to your response.
Additionally, I would like to inquire if there is a way to revert our SeaTable server back to v4.2 and have it running normally.

A) the Container can not be unhealthy if you disabled the health checks. Please check.

B) From your screenshot, I can tell you that pwgen is not installed. I added more checks in the script. You can install pwgen with apt install pwgen and then run the script again.

I did follow the instructions to change the db in the config file to mariadb.

However, I also noticed during my checking that there are some places in dtable_web_settings.py where the url defaults to https. I only noticed one spot in ccnet.conf before.

I changed all the https in this file to http, but it’s still the same error, so i’m wondering if there are other places with the same https url that need to be changed.

I’ve also changed SEATABLE_SERVER_PROTOCOL=‘http’ when I edited /opt/seatable-compose/.env ,but this does not change all https to http in the config files.

The error message is clear: Failed to connect to MySQL. Did you really changed the container name in the configuration files like described in the manual?

I did follow the instructions to change the db in the config file to mariadb.

However, I also noticed during my checking that there are some places in dtable_web_settings.py where the url defaults to https. I only noticed one spot in ccnet.conf before.
(We have been utilizing SeaTable by deploying our own server using HTTP.)

I changed all the https in this file to http, but it’s still the same error, so i’m wondering if there are other places with the same https url that need to be changed.

I’ve also changed SEATABLE_SERVER_PROTOCOL=‘http’ when I edited /opt/seatable-compose/.env ,but this does not change all https to http in the config files.

Now when visiting the seatable page, the browser indicates an Unable to Securely Connect error (ERR_SSL_PROTOCOL_ERROR).

Go to your /opt/seatable-release/seatable-server.yml and change the following line:

# old
caddy: ${SEATABLE_SERVER_HOSTNAME:?Variable is not set or empty}

# new
caddy: http://${SEATABLE_SERVER_HOSTNAME:?Variable is not set or empty}

So you have to add http:// to this file.
Then of course stop and start the containers.

Thank you very much for kindly helping us since the weekend.

If I change ‘mariadb’ to ‘db’ in the configuration file and move the folders back to /opt/seatable, using the original docker-compose.yml, can I revert to version 4.2.11?

This should work. Everything that you did can be reverted.

At this point, I will stop with my support. You decided to run a custom setup with your HTTP configuration and at the same time, it seems that you are not experienced enough to solve problems, even if the error messages are clear like “pwgen, command not found” and it only requires to find the right settings in the configuration files.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.