stopUnusedServices stops TURN (and other services) after PeerTube restart
-
Hi,
I noticed an issue when restarting my PeerTube app.
After triggering an app restart, Cloudron runs stopUnusedServices and stops several services:
services: stopUnusedServices: stopping mysql (no apps use it)
services: stopUnusedServices: stopping mongodb (no apps use it)
services: stopUnusedServices: stopping turn (no apps use it)This happens consistently right after restarting PeerTube.
While MySQL and MongoDB might not be used, TURN is required for PeerTube WebRTC P2P functionality.
When TURN is stopped, P2P connections fail (especially for users behind strict NAT), and PeerTube falls back to HTTP streaming.
Expected behavior:
TURN should remain running if PeerTube requires it.Actual behavior:
TURN is stopped automatically after app restart and must be restarted manually.It seems Cloudron does not detect TURN as a dependency of PeerTube.
Is this expected behavior, or is there a misconfiguration or bug in addon detection?
Thanks.
-
Interesting, so the peertube app is not specifying the TURN addon and also does not set up its usage of it. Have you manually configured it and if so, can you share your config? Then we can add it to the package itself which would fix the issue as Cloudron would then know that it is actually used.
-
Thanks, this likely explains it.
What confused me is that this only started happening after a Cloudron upgrade. Before that, restarting PeerTube did not stop the TURN service, so P2P continued to work normally.
I did not manually configure TURN inside PeerTube itself. I assumed the existing Cloudron TURN service would continue to be available to PeerTube as before.
So from my side, there is no custom TURN config to share. The main issue is that after the Cloudron upgrade, restarting PeerTube now triggers stopUnusedServices and TURN gets stopped, which breaks PeerTube P2P/WebRTC for users behind strict NAT.
So it seems the package currently does not declare TURN as an addon dependency, and this only became visible after the newer Cloudron service cleanup behavior.
-
So yes we have introduced a feature to stop unneded services, which is why it is stopped now.
The main question here still is, how exactly peertube is using the TURN service on Cloudron. At least the package does not configure it such a way as far as I can tell, so unless you configured this manually somehow, I am not sure if those two things are connected at all to be honest. A quick search also didn't reveal any obvious TURN support in peertube, but maybe that is old information?
-
I tested this again more carefully.
The TURN service does indeed get stopped after app restart because of stopUnusedServices, but PeerTube itself continues to work normally and the socket/WebRTC behavior seems fine.
So my earlier assumption was probably wrong: the TURN service stopping does not appear to be the cause of the PeerTube issue I saw before. That may have been a separate glitch.
So it seems TURN is currently unused in my setup, and Cloudron stopping it is expected with the new unused-services cleanup behavior.
Thanks for clarifying.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login