haiwen / seafile-docker

A Docker image for Seafile server
Other
536 stars 180 forks source link

upgrade to 11 from 10 failed #389

Open pilere opened 1 month ago

pilere commented 1 month ago

following my previous closed issue about a but in renewal the ssl certificate, I did upgrade the version on seafile :

          hi @SkywalkerSpace I am sorry to dig this issue, but I am using the Latest docker version and it seems that the /scripts are not coming from version 11.0 ... what make it use the correct folder ?
image: seafileltd/seafile-mc:latest

Originally posted by @pilere in https://github.com/haiwen/seafile-docker/issues/354#issuecomment-2137430461

following this message, I did change my docker-compose file

NAME                IMAGE                               COMMAND                  SERVICE     CREATED          STATUS          PORTS
seafile             seafileltd/seafile-mc:11.0-latest   "/sbin/my_init -- /s…"   seafile     16 minutes ago   Up 16 minutes   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp
seafile-memcached   memcached:1.6.18                    "memcached -m 256"       memcached   16 minutes ago   Up 16 minutes   11211/tcp
seafile-mysql       mariadb:10.11                       "docker-entrypoint.s…"   db          16 minutes ago   Up 16 minutes   3306/tcp

but end up with a 502 error. 502 Bad Gateway

and impossible to find any error log ... except nginx telling :

2024/05/29 17:27:05 [error] 272#272: *222 upstream prematurely closed connection while reading response header from upstream, client: 82.4.5.2, server: sf.domain.com, request: "GET /api2/repos/ HTTP/1.1", upstream: "http://127.0.0.1:8000/api2/repos/", host: "sf.domain.com"

I did redacted the domain

nothing to be seen in /opt/seafile/logs (the seafile.log shows 2024-05-29 17:07:46 start to serve on pipe client)

where can I search more ?

pilere commented 1 month ago

docker compose log seafile :

seafile            | Starting seafile server, please wait ...
seafile            | Seafile server started
seafile            |
seafile            | Done.
seafile            |
seafile            | Starting seahub at port 8000 ...
seafile            |
seafile            | Seahub is started
seafile            |
seafile            | Done.

and within the container : netstat -antep

Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      0          104824     32/nginx: master pr
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      0          104825     32/nginx: master pr
tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN      0          105093     358/python3
tcp        0      0 127.0.0.11:35415        0.0.0.0:*               LISTEN      0          105773     -
tcp        0      0 172.19.0.4:48034        172.19.0.3:3306         ESTABLISHED 0          105054     351/python3
tcp        0      0 127.0.0.1:52624         127.0.0.1:8082          TIME_WAIT   0          0          -
tcp        0      0 172.19.0.4:443          82.4.5.2:64918          ESTABLISHED 33         129157     -
tcp        0      0 172.19.0.4:443          82.4.5.2:51034          ESTABLISHED 33         105156     -
tcp        0      0 172.19.0.4:443          82.4.5.2:53205          FIN_WAIT2   0          0          -
tcp        0      0 172.19.0.4:48012        172.19.0.3:3306         ESTABLISHED 0          105032     309/fileserver
tcp        0      0 172.19.0.4:443          82.4.5.2:65005          ESTABLISHED 33         129256     -
tcp        0      0 172.19.0.4:59152        172.19.0.3:3306         ESTABLISHED 0          104204     319/seaf-server
tcp        0      0 172.19.0.4:48010        172.19.0.3:3306         ESTABLISHED 0          105970     319/seaf-server
tcp        0      0 127.0.0.1:51598         127.0.0.1:8082          TIME_WAIT   0          0          -
tcp        0      0 172.19.0.4:443          82.4.5.2:53262          ESTABLISHED 33         129163     -
tcp        0      0 172.19.0.4:443          82.4.5.2:64777          FIN_WAIT2   0          0          -
tcp        0      0 172.19.0.4:443          82.4.5.2:51031          ESTABLISHED 33         104229     -
tcp        0      0 127.0.0.1:51604         127.0.0.1:8082          TIME_WAIT   0          0          -
tcp        0      0 127.0.0.1:8000          127.0.0.1:59212         TIME_WAIT   0          0          -
tcp        0      0 172.19.0.4:48046        172.19.0.3:3306         ESTABLISHED 0          105057     351/python3
tcp        0      0 127.0.0.1:38348         127.0.0.1:8082          TIME_WAIT   0          0          -
tcp        0      0 172.19.0.4:443          82.4.5.2:53316          ESTABLISHED 33         129254     -
tcp        0      0 127.0.0.1:42852         127.0.0.1:8082          TIME_WAIT   0          0          -
tcp        0      0 127.0.0.1:38358         127.0.0.1:8082          TIME_WAIT   0          0          -
tcp        0      0 172.19.0.4:48080        172.19.0.3:3306         ESTABLISHED 0          104265     351/python3
tcp        0      0 172.19.0.4:443          82.4.5.2:64845          FIN_WAIT2   0          0          -
tcp        0      0 172.19.0.4:443          82.4.5.2:65001          ESTABLISHED 33         129231     -
tcp        0      0 172.19.0.4:48072        172.19.0.3:3306         ESTABLISHED 0          104263     351/python3
tcp6       0      0 :::8082                 :::*                    LISTEN      0          104195     309/fileserver
tcp6       0      0 127.0.0.1:8082          127.0.0.1:38348         TIME_WAIT   0          0          -
tcp6       0      0 127.0.0.1:8082          127.0.0.1:42852         TIME_WAIT   0          0          -
tcp6       0      0 127.0.0.1:8082          127.0.0.1:51604         TIME_WAIT   0          0          -
tcp6       0      0 127.0.0.1:8082          127.0.0.1:52624         TIME_WAIT   0          0          -
tcp6       0      0 127.0.0.1:8082          127.0.0.1:38358         TIME_WAIT   0          0          -
tcp6       0      0 127.0.0.1:8082          127.0.0.1:51598         TIME_WAIT   0          0          -
kirisakow commented 1 month ago

but end up with a 502 error. 502 Bad Gateway and impossible to find any error log except nginx telling (...) upstream prematurely closed connection while reading response header from upstream (...)

I've been facing exactly the same problem since I updated docker image last night. And I too can't find the root cause of the trouble from within the logs.

Update

I'm also getting (...) peer closed connection in SSL handshake while SSL handshaking to upstream (...) error messages.

kirisakow commented 1 month ago

@pilere Perhaps you'll be happy to use this command — and spot something I can't see:

# to monitor all Seafile logs simultaneously:
sudo tail -f $(find /opt/seafile-data/ -type f -name *.log 2>/dev/null)

# to also monitor Nginx logs:
sudo tail -f $(find /opt/seafile-data/ -type f -name *.log 2>/dev/null) /var/log/nginx/*
pilere commented 1 month ago

no, that's the logs I was looking in already ... which version did you upgrade from @kirisakow ? that may help if it's a close on ... mine sounds way too old ...

kirisakow commented 1 month ago

Unfortunately I can't tell the version of the previous image I had, because I had to reinstall the server OS Ubuntu too. I'd say the image was approximately 3 months old, ± 1 month.

pilere commented 1 month ago

Unfortunately I can't tell the version of the previous image I had, because I had to reinstall the server OS Ubuntu too. I'd say the image was approximately 3 months old, ± 1 month.

mine was a year ago and a version bellow so it's a good start 4 month :

seafileltd/seafile-mc   <none>        2882d719fc5a   13 months ago   1.38GB 
smerle33 commented 1 month ago

(edit: sorry for the confusion, smerl33 and pilere are the same person ... me)

after carefully read the nginx conf, I did try a direct call to seahub with no success:

curl http://127.0.0.1:8000/
curl: (52) Empty reply from server

with this error in nginx logs:

2024/05/30 11:07:03 [error] 271#271: *31 upstream prematurely closed connection while reading response header from upstream, client: 82.4.5.2, server: sf.domain.com, request: "GET /api2/repos/ HTTP/1.1", upstream: "http://127.0.0.1:8000/api2/repos/", host: "sf.domain.com"

and no logs in /opt/seafile/logs/seahub.log

cat seahub.log
2024-05-30 09:05:47,165 [INFO] seafevents.db:69 create_engine_from_conf [seafevents] database: mysql, name: seahub-db

@SkywalkerSpace how can I enable more debug from seahub ?

pilere commented 1 month ago

I did that without any luck : DEBUG = true in seahub_settings.py and try again. Then you should get more debub info in seahub.log.

EDIT: I also tried a ping from within the container:

root@48661255345c:/opt/seafile# curl -sSk "http://127.0.0.1:8000/api2/ping/"
curl: (52) Empty reply from server

and nothing in /opt/seafile/logs/seahub.log in the container

smerle33 commented 1 month ago

🎉 I tried to downgrade one by one, and it work at the 11.0.6 so its located between 11.0.6 and 11.0.7, but I cannot see any release or tag matching on github : https://github.com/haiwen/seafile-docker

it seems to match seahub versions : https://github.com/haiwen/seahub/compare/v11.0.6-server...v11.0.7-server here https://github.com/haiwen/seafile-server/compare/v11.0.6-server...v11.0.7-server#files_bucket

smerle33 commented 1 month ago

in case it helps, my seafile.conf :


[fileserver]
port = 8082
use_go_fileserver = true

[database]
type = mysql
host = seafile-mysql
port = 3306
user = seafile
password = <redacted>
db_name = seafile-db
connection_charset = utf8

[notification]
enabled = false
host = 127.0.0.1
port = 8083
log_level = info
jwt_private_key = <redacted>
'''
kirisakow commented 1 month ago

I cannot see any release or tag matching on github

See here: https://hub.docker.com/r/seafileltd/seafile-mc/tags

I tried to downgrade one by one, and it work at the 11.0.6 so its located between 11.0.6 and 11.0.7

Thank you! 👏 🙏

pilere commented 1 month ago

I cannot see any release or tag matching on github

See here: https://hub.docker.com/r/seafileltd/seafile-mc/tags

I am looking for the matching code within github that match the docker build for 11.0.7 and 11.0.6 to check the changes ... I think it is https://github.com/haiwen/seafile-server/compare/v11.0.6-server...v11.0.7-server#files_bucket

pilere commented 1 week ago

@SkywalkerSpace sorry to ping you directly but I cannot find what change between 11.0.6 and 11.0.7 break the seafile ... without any error ... just not working .... can someone with developper knownledge from the team have a look on this ?

kirisakow commented 1 week ago

@pilere Check out Seafile's friendly fork* ggogel/seafile-containerized maintained by an experienced DevOps engineer with all DevOps best practices in mind. I personally switched to that fork a few weeks ago and, after a single call for support, it saved my Seafile setup.

* Technically, not a fork but “an unofficial alternative deployment method for Seafile,” in project maintainer's own words.

pilere commented 1 week ago

@pilere Check out Seafile's friendly fork ggogel/seafile-containerized maintained by an experienced DevOps engineer with all DevOps best practices in mind. I personally switched to that fork a few weeks ago and, after a single call for support, it saved my Seafile setup.

Thanks you for the pointer, this mean that I need to provisioned a staging environnement for test.