-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fix issues with synapse and synapse-coturn services not starting #458
base: testing
Are you sure you want to change the base?
Fix issues with synapse and synapse-coturn services not starting #458
Conversation
Can you link to the doc showing that |
Also according to https://github.com/matrix-org/synapse/blob/be65a8ec0195955c15fdb179c9158b187638e39a/docs/usage/configuration/config_documentation.md?plain=1#L457 the default is sane and we could just remove the line altogether. Also it's for http-not-s traffic, it shouldn't even be used because yunohost enforces https… |
I have not read any doc about that. I just tried it and it was working. |
It's used by nginx that is reverse proxing it to https |
Hello, Maybe it look that you have an issue about pour network stack. Are you sure that ipv4 and ipv6 are enabled on your server ? |
@@ -8,7 +8,7 @@ User=turnserver | |||
Group=turnserver | |||
Type=notify | |||
EnvironmentFile=/etc/matrix-__APP__/coturn_env | |||
ExecStart=/usr/bin/turnserver -c /etc/matrix-__APP__/coturn.conf $EXTRA_OPTIONS --pidfile= | |||
ExecStart=/usr/bin/turnserver -c /etc/matrix-__APP__/coturn.conf $EXTRA_OPTIONS -L 0.0.0.0 --pidfile= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it really needed to bind to any public addresses?
this is not reverse proxied?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not look like this is proxied. I do not find any reference to the port that is used (5351 in my case) in nginx config and the port is open on the firewall.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it looks like this is publicly available on purpose.
ipv6 is disabled. And that is on purpose. There are other things that break in my case if I enable ipv6 : https://forum.yunohost.org/t/fixed-installing-letsecrypt-certificate-is-taking-a-very-long-time/28645 |
I though about this during the night. And I kind of remember cases (no in synapse) where using localhost for a bind address was not working but using 127.0.0.1 was working. So yes it is probably better to use 127.0.0.1 |
@Salamandar , I have changed localhost to 127.0.0.1 |
Hello, Honestly I'm not sure that it's a good idea to drop ipv6 into the config. The future is to move to Ipv6. For your specific case I think you don't need to completely disable ipv6. Since you don't have any default ipv6 route your issue should be solved. Also as on nginx config side it's configured to reverse proxy to |
Well yes but actually no, here we are talking exclusively about internal IP, and most apps are curently only listening on ipv4 127.0.0.1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As said before to me the best way to fix your issue is to enable again ipv6 and mange correctly the ipv6 network stack. Normally on Linux from the point that you don't have any default ipv6 route you shouldn't have any timeout issue.
Note that probably some other apps expect to have ipv6 enabled, so disabling completely ipv6 is not a good solution to me.
@@ -304,7 +304,7 @@ listeners: | |||
tls: false | |||
type: http | |||
x_forwarded: true | |||
bind_addresses: ['::1', '127.0.0.1'] | |||
bind_addresses: [127.0.0.1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the case of you remove ipv6 listening you also need to avoid that nginx try a ipv6 connection. So you also need explicitly set proxy pass to 127.0.0.1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially set this to localhost instead of 127.0.0.1, which would not break nginx config.
I need to find back the issue I'm kind of remembering about 127.0.0.1 working and localhost failing. Maybe it was not about listening on localhost but it was about connecting to localhost to another app that was listening on 127.0.0.1. Basically another app that is broken by the same thing you are telling that should not be done here.
@@ -8,7 +8,7 @@ User=turnserver | |||
Group=turnserver | |||
Type=notify | |||
EnvironmentFile=/etc/matrix-__APP__/coturn_env | |||
ExecStart=/usr/bin/turnserver -c /etc/matrix-__APP__/coturn.conf $EXTRA_OPTIONS --pidfile= | |||
ExecStart=/usr/bin/turnserver -c /etc/matrix-__APP__/coturn.conf $EXTRA_OPTIONS -L 0.0.0.0 --pidfile= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By this you remove the default value to listening on ipv4 and ipv6. So this will break instances with working ipv6.
I'll do some more tests to see what is strictly necessary to do in all that I have disabled regarding IPV6 to fix my issue of let's encrypt timeouts and try to find a better fix of my IP stack. |
Problem
synapse-coturn error (this error is happening only at boot time. if the service is manually started later on, there is no error) :
synapse error (this error is happening on servers that do not have ipv6 enabled :
Solution
-L 0.0.0.0
onExecStart
line in systemd unit filelocalhost
instead of::1
and127.0.0.1
PR Status
Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)