Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. MiroTalk
  3. Error installing Miro SFU

Error installing Miro SFU

Scheduled Pinned Locked Moved MiroTalk
64 Posts 9 Posters 11.4k Views 8 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jdaviescoatesJ jdaviescoates

    I just updated Cloudron to 7.7.1 and tried to install Miro SFU but I got this error:

    An error occurred during the install operation: Docker Error: (HTTP code 500) server error - driver failed programming external connectivity on endpoint 45483bcf-5f54-47ef-b28d-a13d377e493c (947cbd4cbf34d00ad0c0e0a55e41113ab4505551212b3cffa5c45768c2f29908): listen udp4 0.0.0.0:40026: bind: address already in use

    PS I wonder if MiroP2P and MiroSFU should each have their own category? 🀷

    jdaviescoatesJ Offline
    jdaviescoatesJ Offline
    jdaviescoates
    wrote on last edited by
    #2

    @jdaviescoates said in Error installing Miro SFU:

    listen udp4 0.0.0.0:40026: bind: address already in use

    I'm guessing perhaps another app might be using this? 🀷

    Any ideas how I'd work out which one?

    I use Cloudron with Gandi & Hetzner

    1 Reply Last reply
    0
    • KubernetesK Offline
      KubernetesK Offline
      Kubernetes
      App Dev
      wrote on last edited by
      #3

      Ha, I run into the same problem and reported here. Thanks for opening a dedicated thread regarding this issue.

      1 Reply Last reply
      3
      • KubernetesK Kubernetes referenced this topic on
      • nebulonN nebulon marked this topic as a question on
      • avatar1024A Offline
        avatar1024A Offline
        avatar1024
        wrote on last edited by avatar1024
        #4

        Just for info, I've installed the sfu package without any problems so yes it is probably caused by another app using this.

        PS: And I both MiroTalk P2P and MiroTalkSFU installed on the same server so no conflicts between the two.

        1 Reply Last reply
        1
        • jdaviescoatesJ jdaviescoates

          I just updated Cloudron to 7.7.1 and tried to install Miro SFU but I got this error:

          An error occurred during the install operation: Docker Error: (HTTP code 500) server error - driver failed programming external connectivity on endpoint 45483bcf-5f54-47ef-b28d-a13d377e493c (947cbd4cbf34d00ad0c0e0a55e41113ab4505551212b3cffa5c45768c2f29908): listen udp4 0.0.0.0:40026: bind: address already in use

          PS I wonder if MiroP2P and MiroSFU should each have their own category? 🀷

          avatar1024A Offline
          avatar1024A Offline
          avatar1024
          wrote on last edited by
          #5

          @jdaviescoates said in Error installing Miro SFU:

          PS I wonder if MiroP2P and MiroSFU should each have their own category?

          What do you mean by category here?

          jdaviescoatesJ 1 Reply Last reply
          1
          • avatar1024A avatar1024

            @jdaviescoates said in Error installing Miro SFU:

            PS I wonder if MiroP2P and MiroSFU should each have their own category?

            What do you mean by category here?

            jdaviescoatesJ Offline
            jdaviescoatesJ Offline
            jdaviescoates
            wrote on last edited by
            #6

            @avatar1024 said in Error installing Miro SFU:

            What do you mean by category here?

            Forum category. At present there is just one MiroTalk one.

            4de963ba-0263-40cb-b476-a78d08898b90-image.png

            I use Cloudron with Gandi & Hetzner

            1 Reply Last reply
            1
            • nebulonN Offline
              nebulonN Offline
              nebulon
              Staff
              wrote on last edited by
              #7

              We will keep only one forum category just like with the Minecraft flavors. In the long run I guess we will package the umbrella MiroTalk frontend, which supports p2p,sfu,broadcast,... all in one user interface, but first we want to verify they work individually.

              jdaviescoatesJ 1 Reply Last reply
              4
              • nebulonN nebulon

                We will keep only one forum category just like with the Minecraft flavors. In the long run I guess we will package the umbrella MiroTalk frontend, which supports p2p,sfu,broadcast,... all in one user interface, but first we want to verify they work individually.

                jdaviescoatesJ Offline
                jdaviescoatesJ Offline
                jdaviescoates
                wrote on last edited by
                #8

                @nebulon any help or advice on resolving my issue?

                I use Cloudron with Gandi & Hetzner

                1 Reply Last reply
                0
                • nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote on last edited by
                  #9

                  Have you tried to adjust the port if there is a conflict? Note that MiroTalk will allocate 100 ports for both tcp and udp starting with the port configured in Cloudron for that app.

                  1 Reply Last reply
                  1
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by girish
                    #10

                    @jdaviescoates @nebulon I managed to reproduce this. Debugging. Mine failed in another udp port:

                    Docker Error: (HTTP code 500) server error - driver failed programming external connectivity on endpoint 7ea6806a-a184-4c97-88ad-c4e8f2fb8aef (306f6447d8ce8e82248df7f084902ba92fd525c9889b327f592f9a260adfeb13): listen udp4 0.0.0.0:40082: bind: address already in use 
                    
                    1 Reply Last reply
                    1
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #11

                      docker is using that port for syslog . We use --syslog-address=udp://127.0.0.1:2514 in our containers.

                      dockerd      886       root  110u  IPv4 1325046      0t0  UDP 127.0.0.1:40082->127.0.0.1:2514 
                      
                      1 Reply Last reply
                      2
                      • girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by
                        #12

                        @jdaviescoates workaround is to reinstall the app with a different port range and keep your 🀞 it doesn't conflict again. Note that the TCP and UDP port ranges should be the same! I recommend something like 12000 .

                        luckowL jdaviescoatesJ 2 Replies Last reply
                        4
                        • girishG girish

                          @jdaviescoates workaround is to reinstall the app with a different port range and keep your 🀞 it doesn't conflict again. Note that the TCP and UDP port ranges should be the same! I recommend something like 12000 .

                          luckowL Offline
                          luckowL Offline
                          luckow
                          translator
                          wrote on last edited by
                          #13

                          @girish 12000 is a good advice. πŸ™‚
                          btw. what is the recommended way if the installation does not work? the error state does not allow to save the port range. the only thing that works: uninstall, reinstall (with a different port range)

                          Pronouns: he/him | Primary language: German

                          girishG 1 Reply Last reply
                          1
                          • luckowL luckow

                            @girish 12000 is a good advice. πŸ™‚
                            btw. what is the recommended way if the installation does not work? the error state does not allow to save the port range. the only thing that works: uninstall, reinstall (with a different port range)

                            girishG Offline
                            girishG Offline
                            girish
                            Staff
                            wrote on last edited by
                            #14

                            @luckow yes, one has to uninstall and reinstall again. Maybe we can fix the 'repair' logic to handle this error but this error shouldn't happen in the first place. Fix coming...

                            1 Reply Last reply
                            2
                            • girishG Offline
                              girishG Offline
                              girish
                              Staff
                              wrote on last edited by
                              #15

                              https://git.cloudron.io/cloudron/box/-/commit/104997d77c52d39a581fa86556101357c38220a9 is the fix. This will greatly alleviate the conflicts.

                              1 Reply Last reply
                              2
                              • MiroTalkM Away
                                MiroTalkM Away
                                MiroTalk
                                wrote on last edited by MiroTalk
                                #16

                                Hi @nebulon, @girish

                                1. Purpose:

                                  • The purpose here is to configure MiroTalk SFU to utilize WebRTCServer for handling WebRTC connections per Worker (CPU). This can potentially optimize resource usage and improve scalability.
                                2. WebRTCServer:

                                  • WebRTCServer is a class introduced in Mediasoup version 3.10.0. It allows listening into a single port for WebRTC connections. This is advantageous for cases where multiple workers (CPUs) are involved, as each worker can have its own WebRTCServer instance.
                                3. MiroTalk SFU Configuration:

                                  • webRtcServerActive: true: This parameter indicates whether to activate the WebRTCServer. Setting it to true activates the feature.

                                  • webRtcServerOptions: This object holds the configuration options for the WebRTCServer.

                                  • listenInfos: This array contains objects specifying the listening information for the WebRTCServer.

                                    • Each object within listenInfos represents a listening endpoint for the WebRTCServer, specifying the protocol (UDP or TCP), IP address, and port.

                                    • In the provided example, both UDP and TCP protocols are used, with the same IP address (IPv4) and port number (44444) for simplicity. In practice, you might need to adjust these values based on your network setup.

                                4. Scaling with Workers:

                                  • If MiroTalk SFU starts a Worker for each CPU, each Worker will have its own WebRTCServer instance.

                                  • The port number for each WebRTCServer is incremented by one for each additional Worker. For instance, if you have 4 CPUs and thus 4 Workers, the ports used would be 44444, 44445, 44446, and 44447 respectively.

                                5. Port Range:

                                  • By default, each WebRTCServer internally handles the rtcMinPort and rtcMaxPort. This means that you only need to open ports for the number of Workers you have, rather than a range of ports for each Worker.

                                Overall, this configuration optimizes the handling of WebRTC connections in MiroTalk SFU by distributing them among multiple Workers, each with its own WebRTCServer instance listening on a specified port.

                                Here the corrispective configuration for MiroTalk SFU in app/src/config.js:

                                webRtcServerActive: true, // Set to true to activate it
                                webRtcServerOptions: {
                                    listenInfos: [
                                        { protocol: 'udp', ip: IPv4, port: 44444 },
                                        { protocol: 'tcp', ip: IPv4, port: 44444 },
                                    ],
                                },
                                

                                In this configuration:

                                • webRtcServerActive: true activates the WebRTCServer feature.
                                • webRtcServerOptions contains the configuration options for the WebRTCServer.
                                • listenInfos specifies the listening endpoints for the WebRTCServer, including both UDP and TCP protocols on the specified IPv4 address and starting port 44444.

                                Here's the configuration with the additional setup for being behind a NAT:

                                // Behind NAT with Announced Address
                                webRtcServerActive: true, // Set to true to activate it
                                webRtcServerOptions: {
                                    listenInfos: [
                                        { protocol: 'udp', ip: '0.0.0.0', announcedAddress: IPv4, port: 44444 },
                                        { protocol: 'tcp', ip: '0.0.0.0', announcedAddress: IPv4, port: 44444 },
                                    ],
                                },
                                

                                In this configuration:

                                • webRtcServerActive: true activates the WebRTCServer feature.
                                • webRtcServerOptions contains the configuration options for the WebRTCServer.
                                • listenInfos specifies the listening endpoints for the WebRTCServer, including both UDP and TCP protocols.
                                • ip: '0.0.0.0' indicates that the server should listen on all available network interfaces.
                                • announcedAddress: IPv4 specifies the announced address to be used in signaling. This is typically the public IPv4 address of the server.
                                • port: 44444 specifies the starting port number to listen on for both UDP and TCP protocols.

                                This configuration is suitable for environments where the server is behind a NAT and needs to announce its public IPv4 address for signaling purposes.

                                Cheers,
                                Miroslav Pejic

                                1 Reply Last reply
                                3
                                • nebulonN Offline
                                  nebulonN Offline
                                  nebulon
                                  Staff
                                  wrote on last edited by
                                  #17

                                  @MiroTalk thanks for the elaborate description, but not sure I follow exactly. Do you suggest to not use a port range but use a specific webRtcServer feature which can handle everything on one port and also scales better or is this independent of the current config we use, which sets up a port range and configures config.mediasoup.worker.rtcMin/MaxPort? Or is both useful to have?

                                  MiroTalkM 1 Reply Last reply
                                  1
                                  • nebulonN nebulon

                                    @MiroTalk thanks for the elaborate description, but not sure I follow exactly. Do you suggest to not use a port range but use a specific webRtcServer feature which can handle everything on one port and also scales better or is this independent of the current config we use, which sets up a port range and configures config.mediasoup.worker.rtcMin/MaxPort? Or is both useful to have?

                                    MiroTalkM Away
                                    MiroTalkM Away
                                    MiroTalk
                                    wrote on last edited by MiroTalk
                                    #18

                                    @nebulon The port range configuration should still be maintained. However, with the Worker WebRTCServer feature enabled, there’s no need to manually open ports on the router. The Worker WebRTCServer handles port allocation internally. Essentially, by enabling this option, you only need to open a single port starting from 44444, with the number of ports equating to the number of server CPUs. This approach eliminates the necessity to open numerous ports per worker, streamlining the setup to just one port per worker. You can add this option as well and try if better. More about here

                                    1 Reply Last reply
                                    1
                                    • nebulonN Offline
                                      nebulonN Offline
                                      nebulon
                                      Staff
                                      wrote on last edited by
                                      #19

                                      @MiroTalk so you are saying this WebRTCServer acts similar to a reverse proxy allowing all incoming connections via one single port and internally distributes to workers locally? If this is the case, then I guess we have to change the app to only use 44444 and then the exposed (and forwarded) port range is not required?

                                      MiroTalkM 1 Reply Last reply
                                      0
                                      • nebulonN nebulon

                                        @MiroTalk so you are saying this WebRTCServer acts similar to a reverse proxy allowing all incoming connections via one single port and internally distributes to workers locally? If this is the case, then I guess we have to change the app to only use 44444 and then the exposed (and forwarded) port range is not required?

                                        MiroTalkM Away
                                        MiroTalkM Away
                                        MiroTalk
                                        wrote on last edited by
                                        #20

                                        @nebulon More or less yes.

                                        1. SFU Instance Deployment: When you deploy MiroTalk SFU on a server, it dynamically creates WebRtcServers based on the available CPU cores of the server if you enable this option in the config.js

                                        2. Example CPU Core Count: For instance, if the server where you deploy MiroTalk SFU has 2 CPU cores, MiroTalk will create 2 WebRtcServers dynamically (config.mediasoup.numWorkers)

                                        3. Port Allocation: These WebRtcServers are started from a base port number (in this case, 44444) and are internally incremented by logic for each server created.

                                        4. Console Logs Example:

                                        [3/26/2024, 17:37:17:682] [Server] Create a WebRtcServer {
                                          worker_pid: 41060,
                                          webRtcServerOptions: {
                                            listenInfos: [
                                              {
                                                protocol: 'udp',
                                                ip: '0.0.0.0',
                                                announcedAddress: 'Your-Public-IPv4',
                                                port: 44444
                                              },
                                              {
                                                protocol: 'tcp',
                                                ip: '0.0.0.0',
                                                announcedAddress: 'Your-Public-IPv4',
                                                port: 44444
                                              }
                                            ]
                                          }
                                        }
                                        [3/26/2024, 17:37:17:730] [Server] Create a WebRtcServer {
                                          worker_pid: 41061,
                                          webRtcServerOptions: {
                                            listenInfos: [
                                              {
                                                protocol: 'udp',
                                                ip: '0.0.0.0',
                                                announcedAddress: 'Your-Public-IPv4',
                                                port: 44445
                                              },
                                              {
                                                protocol: 'tcp',
                                                ip: '0.0.0.0',
                                                announcedAddress: 'Your-Public-IPv4',
                                                port: 44445
                                              }
                                            ]
                                          }
                                        }
                                        ...
                                        
                                        • The console logs I provided illustrate the creation of two WebRtcServers.
                                        • Each server is associated with a unique worker process ID (worker_pid).
                                        • Each server is configured with both UDP and TCP protocols, listening on all available IPv4 addresses (0.0.0.0) and a specific port number.
                                        • The port numbers for each server are incremented sequentially. In this example, the first server listens on port 44444, and the second server listens on port 44445.
                                        1. Listen Infos: Each WebRTC server's configuration (webRtcServerOptions) includes details about the protocols it supports, the IP address it listens on, the announced address (typically the public IPv4 address of your server), and the port it's listening on.

                                        In this scenario, the application requires permission to allow traffic on ports 44444 and 44445.

                                        1 Reply Last reply
                                        1
                                        • nebulonN Offline
                                          nebulonN Offline
                                          nebulon
                                          Staff
                                          wrote on last edited by
                                          #21

                                          So on Cloudron, the firewall is actually closed down and each exposed port needs to be explicitly mentioned. Is there any configuration to limit the ports it will use?

                                          Also I am still not sure if this is independent of the port range for the rtcMin/MaxPort configs or if this replaces it?

                                          1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Bookmarks
                                          • Search