Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to 11 from 10 failed #389

Open
pilere opened this issue May 29, 2024 · 15 comments
Open

upgrade to 11 from 10 failed #389

pilere opened this issue May 29, 2024 · 15 comments

Comments

@pilere
Copy link

pilere commented May 29, 2024

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 #354 (comment)

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
Copy link
Author

pilere commented May 29, 2024

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
Copy link

kirisakow commented May 29, 2024

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
Copy link

@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
Copy link
Author

pilere commented May 30, 2024

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
Copy link

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
Copy link
Author

pilere commented May 30, 2024

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
Copy link

smerle33 commented May 30, 2024

(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
Copy link
Author

pilere commented May 30, 2024

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
Copy link

smerle33 commented May 30, 2024

🎉
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 : haiwen/seahub@v11.0.6-server...v11.0.7-server
here haiwen/seafile-server@v11.0.6-server...v11.0.7-server#files_bucket

@smerle33
Copy link

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
Copy link

kirisakow commented May 30, 2024

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
Copy link
Author

pilere commented May 31, 2024

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 haiwen/seafile-server@v11.0.6-server...v11.0.7-server#files_bucket

@pilere
Copy link
Author

pilere commented Jun 25, 2024

@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
Copy link

kirisakow commented Jun 25, 2024

@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
Copy link
Author

pilere commented Jun 25, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants