YunoHost-Apps / ffsync_ynh

Mozilla’s Sync Server package for YunoHost
GNU Affero General Public License v3.0
15 stars 9 forks source link

ffsync backend listens to IPv4 only, NGinx forwards to IPv4 or IPv6 #44

Open ebouaziz opened 1 year ago

ebouaziz commented 1 year ago

Describe the bug

Some request apparently fail to reach the backend ffsync server, producing this kind of errors in NGINX logs:

2023/01/16 20:05:32 [error] 227067#227067: *90587 connect() failed (111: Connection refused) while connecting to upstream, client: 2a01:xxx:xxx:xxx:xxx:xxx:x:xxx, server: xyz.ynh.fr, request: "POST /ffsync/storage/1.5/1/storage/tabs?batch=true&commit=true HTTP/2.0", upstream: "http://[::1]:6001/storage/1.5/1/storage/tabs?batch=true&commit=true", host: "xyz.ynh.fr"

Context

Steps to reproduce

Expected behavior

No errors in logs

Logs

see above

Theory

I changed proxy_pass to http://127.0.0.1:6001/; and the error does not show anymore.

Maybe it's possible to make the sync server listen on both IPv4 and IPv6 but I'm not sure of the appropriate syntax in the configuration file. Using localhost in synserver.ini does not help, ffsync still logs [INFO] Listening at: http://127.0.0.1:6001.