Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

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

Open
ebouaziz opened this issue Jan 16, 2023 · 0 comments
Open
Labels

Comments

@ebouaziz
Copy link

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

  • i7 PC at home
  • YunoHost version: 11.1.0.2
  • I have access to my server: Through SSH
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no

Steps to reproduce

  • tail -f /var/log/nginx/xxx.ynh.fr-error.log
  • make firefox sync with server

Expected behavior

No errors in logs

Logs

see above

Theory

  • sync server is bound to 127.0.0.1:6001
  • ffsync's proxy_pass is set to http://localhost:6001/;
  • I think that localhost is sometimes resolved to [::1] like shown in logs

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.

Josue-T added a commit that referenced this issue Jan 18, 2023
@Josue-T Josue-T mentioned this issue Jan 18, 2023
2 tasks
@Josue-T Josue-T added the bug label Jan 21, 2023
Josue-T added a commit that referenced this issue Jan 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants