Upgraded from seafile 10 bare metal to seafile 12 docker: Can't upload via web interface or iOS. Native Seafile client still works

Hi, a few weeks ago, I upgraded from seafile 10 bare metal to seafile 12 Docker. Since then, I can’t upload via web interface or iOS. The native Windows Seafile client still works!

How I migrated in detail:

I created an empty Seafile 12 Docker environment first. I excluded the original Caddy and used my central Caddy instead.

.env

SEAFILE_SERVER_HOSTNAME=files.home.net
SEAFILE_SERVER_PROTOCOL=https

Caddy

files.{$DOMAIN-MKF} {
    import hsts
    reverse_proxy seafile:80
}

After the empty fresh Seafile instance worked, I stopped seafile-docker and only kept the db running.
In the DB I dropped the databases.

From my bare metal db I exported the databases:

mariadb-dump --user=root --password --lock-tables --databases seafile_ccnet-db > /root/seafile_ccnet-db.sql
mariadb-dump --user=root --password --lock-tables --databases seafile_seafile-db > /root/seafile_seafile-db.sql
mariadb-dump --user=root --password --lock-tables --databases seafile_seahub-db > /root/seafile_seahub-db.sql

In the dumps I renamed everything from ccnet-db to ccnet_db etc.
I then imported the dumps into the docker DB:

docker exec -i seafile-mysql mysql -u root -pXXX < /root/seafile_seafile-db.sql 
docker exec -i seafile-mysql mysql -u root -pXXX < /root/seafile_seahub-db.sql 
docker exec -i seafile-mysql mysql -u root -pXXX < /root/seafile_ccnet-db.sql

Finally, I replaced the empty seafile-docker data dirs, with my original bare metal data dirs:

cp -arf /opt/seafile/seafile-data /opt/stacks/seafile/data/seafile/
cp -arf /opt/seafile/seahub-data /opt/stacks/seafile/data/seafile/

I then started the Docker stack and seafile was upgrade from 10 to 12 and the GUI and native client were up and running.

Only after a few days I noticed, that I wasn’t able to upload anymore. But only through the web interface and the iOS client.
The native Windows client works without issues.

Can somebody please help me?

When you try to upload do you get an error message anywhere? Check the console in the browser by pressing F12 before trying the upload. Also check the logs for your reverse proxy and the seafile and seahub logs. Somewhere there should be an error to give some idea what’s wrong.

I did something similar when I upgraded mine. One thing I see in your process, it isn’t clear to me if it would have run the “upgrade_10.0_11.0.sh” and “upgrade_11.0_12.0.sh” scripts automatically for you. So if you see database errors, go into the seafile container and run those scripts and then restart the container.

Hi and thanks so much for your reply!
One important thing I didn’t mention is the exact error detail: The upload just never starts. It’s not showing an actual error in the WebGUI:
grafik

When you try to upload do you get an error message anywhere?

I haven’t found one, yet, sadly.

Check the console in the browser by pressing F12 before trying the upload.

Nothing getting logged.

Also check the logs for your reverse proxy

We can be sure it’s not the reverse proxy. I stopped my seafile-docker, duplicated the yaml and env file to an empty folder and spun up an empty seafile docker instance. Uploads through the WebGUI work immediately. So it must have to do with my migration. FML.

and the seafile and seahub logs.

I did, but I haven’t found anything useful yet, will have to take a second look.

One thing I see in your process, it isn’t clear to me if it would have run the “upgrade_10.0_11.0.sh” and “upgrade_11.0_12.0.sh” scripts automatically for you.

It did execute both scripts, but it showed a few warnings. I spectated the docker console logs when I first started the container.

I just entered the container, stopped seafile and seahub and executed both scripts again to capture the output:

EDIT1:
This error is logged every 1 second in the seafile.log:

[2025-02-09 09:36:13] [WARNING] ../common/seaf-db.c(928): Failed to prepare sql SELECT gc_id FROM GCID WHERE repo_id = ? FOR UPDATE: Table 'seafile_db.GCID' doesn't exist

It isn’t logged in the empty reference container.

I found the solution, after I’ve found the database error in the log.
I’ve had the same error as @tomservo over at:

I also had the missing seafile database table GCID and I also use seafile since version 6 I guess? Very strange, that we both had the same missing table.

(First I did backups, I mention this, just in case.)

So I entered the Docker container and stopped Seafile:

docker exec -it seafile bash
cd /opt/seafile/seafile-server-latest
./seahub.sh stop
./seafile.sh stop

Then I exited the container and imported the original database schema (copy it out of the container beforehand) into the mariadb database container:

docker exec -i seafile-mysql mysql -u root -pXXX -D seafile_db < /opt/stacks/seafile/data/seafile.sql

I then entered the container once more to start seafile manually.

docker exec -it seafile bash
cd /opt/seafile/seafile-server-latest
./seafile.sh start
./seahub.sh start

Afterwards I opened the WebGUI and tried a small upload: It worked immediatly!
Finally I opened the iOS app and uploaded a photo: It worked immediatly!

In the end, I thought it could not harm, to do some maintenance, now that I have a proper setup:

./seaf-fsck.sh --repair
./seaf-gc.sh --dry-run -t 3
./seaf-gc.sh -t 3
./seaf-gc.sh --rm-fs -t 3

I thought that looked familiar. :slight_smile:

Glad it’s working for you now!