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
  • Brite
  • 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. SFTPGo
  3. SFTPGo or MiroTalk SFU not starting because they use ephemeral ports

SFTPGo or MiroTalk SFU not starting because they use ephemeral ports

Scheduled Pinned Locked Moved SFTPGo
17 Posts 5 Posters 1.3k Views 5 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.
  • imc67I Online
    imc67I Online
    imc67
    translator
    wrote on last edited by
    #4

    BTW: I also restarted Docker via the GUI but it also didn't solved it.

    1 Reply Last reply
    0
    • imc67I Online
      imc67I Online
      imc67
      translator
      wrote on last edited by
      #5

      Thanks to ChatGPT I could solve it:

      "Something" outside Docker was claiming this port

      sudo kill 940
      

      Killed this connection, now the restore worked and the app started.

      1 Reply Last reply
      0
      • jamesJ Online
        jamesJ Online
        james
        Staff
        wrote on last edited by james
        #6

        This might have been a lingering connection from one of your IoT devices.

        ssh     940 root    3u  IPv6  25971      0t0  TCP [2a03:REDACTED:61f0]:41090->[2a01:REDACTED::2]:telnet (ESTABLISHED)
        

        The program used was ssh so I assume a lingering sftp connection since SFTP uses SSH as the binding agent.
        If you can find out what or who 2a03:REDACTED:61f0 and 2a01:REDACTED::2 is you might find the device that had the connection still open.

        1 Reply Last reply
        0
        • imc67I Online
          imc67I Online
          imc67
          translator
          wrote on last edited by imc67
          #7

          Thanks for the hint, I investigated further:
          The left IPv6 is my Cloudron server, from there is had an active connection (ssh outside of Docker) to the right IPv6 my storage box!

          I only use 1 Volume to a Storagebox and 1 Backup location. Could it be that one of those 2 uses the same port-range (41000+100)? @girish

          BTW: @James please redact my ip's in your message (I just corrected mine)

          imc67I 1 Reply Last reply
          1
          • imc67I imc67 marked this topic as a question on
          • J joseph marked this topic as a regular topic on
          • imc67I imc67

            Thanks for the hint, I investigated further:
            The left IPv6 is my Cloudron server, from there is had an active connection (ssh outside of Docker) to the right IPv6 my storage box!

            I only use 1 Volume to a Storagebox and 1 Backup location. Could it be that one of those 2 uses the same port-range (41000+100)? @girish

            BTW: @James please redact my ip's in your message (I just corrected mine)

            imc67I Online
            imc67I Online
            imc67
            translator
            wrote on last edited by imc67
            #8

            said in Server security update reboot: SFTPGo doesn't start:

            Thanks for the hint, I investigated further:
            The left IPv6 is my Cloudron server, from there is had an active connection (ssh outside of Docker) to the right IPv6 my storage box!

            I only use 1 Volume to a Storagebox and 1 Backup location. Could it be that one of those 2 uses the same port-range (41000+100)? @girish

            BTW: @James please redact my ip's in your message (I just corrected mine)

            @girish is this a bug? There are more topics with the same kind of error message

            1 Reply Last reply
            0
            • girishG Do not disturb
              girishG Do not disturb
              girish
              Staff
              wrote on last edited by girish
              #9

              @imc67 some blind guess here. I think what's happening is that something in box side (maybe backups code) is occupying that port 41000. This is in turn blocking the containers from using that port.

              Digging deeper, this seems possible. The ephemeral port range is

              $ cat /proc/sys/net/ipv4/ip_local_port_range
              32768	60999
              

              So, 40000 is not a good choice for a container to listen to. @imc67 a quick fix for you is to change sftpgo to use some other port which is outside the 32768-60999 range. In the meantime, I will fix the package to default to some port range outside the ephemeral port range.

              I think it would be nice to also warn people when try to run containers in ephemeral port ranges. I will put a note in the docs for a start. @james what do you think?

              imc67I 1 Reply Last reply
              2
              • girishG girish

                @imc67 some blind guess here. I think what's happening is that something in box side (maybe backups code) is occupying that port 41000. This is in turn blocking the containers from using that port.

                Digging deeper, this seems possible. The ephemeral port range is

                $ cat /proc/sys/net/ipv4/ip_local_port_range
                32768	60999
                

                So, 40000 is not a good choice for a container to listen to. @imc67 a quick fix for you is to change sftpgo to use some other port which is outside the 32768-60999 range. In the meantime, I will fix the package to default to some port range outside the ephemeral port range.

                I think it would be nice to also warn people when try to run containers in ephemeral port ranges. I will put a note in the docs for a start. @james what do you think?

                imc67I Online
                imc67I Online
                imc67
                translator
                wrote on last edited by imc67
                #10

                @girish good founds! It's also the same issue with MiroTalk (what I know of and experienced) but maybe more apps?

                https://forum.cloudron.io/search?term=bind%3A address already in use&in=titlesposts

                1 Reply Last reply
                0
                • imc67I Online
                  imc67I Online
                  imc67
                  translator
                  wrote on last edited by imc67
                  #11

                  @girish and @James I just updated SFTPGo to 1.1.0, don't see differences, portrange is still 41000 but I also can't change it to ie. 70000, the field becomes RED.

                  EDIT: I can change it to 61000

                  girishG 1 Reply Last reply
                  0
                  • imc67I imc67

                    @girish and @James I just updated SFTPGo to 1.1.0, don't see differences, portrange is still 41000 but I also can't change it to ie. 70000, the field becomes RED.

                    EDIT: I can change it to 61000

                    girishG Do not disturb
                    girishG Do not disturb
                    girish
                    Staff
                    wrote on last edited by
                    #12

                    @imc67 max port is 65535 so it can't be 70000 . A package cannot change the port ranges (just like it cannot change the installated domain names) . But for new installation, it will recommend 20000 instead . I have also fixed up the sfu package, will be published shortly .

                    imc67I 1 Reply Last reply
                    2
                    • girishG girish

                      @imc67 max port is 65535 so it can't be 70000 . A package cannot change the port ranges (just like it cannot change the installated domain names) . But for new installation, it will recommend 20000 instead . I have also fixed up the sfu package, will be published shortly .

                      imc67I Online
                      imc67I Online
                      imc67
                      translator
                      wrote on last edited by
                      #13

                      @girish said in Server security update reboot: SFTPGo doesn't start:

                      A package cannot change the port ranges (just like it cannot change the installated domain names) . But for new installation, it will recommend 20000 instead

                      Maybe you can explicitly mention in the update notes the default / advised ports? Existing installs will not be moved to the "new" ports and thus keep having issues?

                      1 Reply Last reply
                      0
                      • robiR Offline
                        robiR Offline
                        robi
                        wrote on last edited by
                        #14

                        Can you also shrink the ephemeral port range to something tighter @girish ?

                        Conscious tech

                        1 Reply Last reply
                        0
                        • girishG Do not disturb
                          girishG Do not disturb
                          girish
                          Staff
                          wrote on last edited by
                          #15

                          @robi I think the port range comes part of linux/ubuntu setup . I also don't completely know the side effects of making it tighter.

                          robiR 1 Reply Last reply
                          0
                          • girishG girish

                            @robi I think the port range comes part of linux/ubuntu setup . I also don't completely know the side effects of making it tighter.

                            robiR Offline
                            robiR Offline
                            robi
                            wrote on last edited by
                            #16

                            @girish "32768-60999 range" is not the entire valid range for linux, so I would guess it was a configuration default instead.

                            Hence the tightening request.

                            Conscious tech

                            1 Reply Last reply
                            0
                            • J Online
                              J Online
                              joseph
                              Staff
                              wrote on last edited by
                              #17

                              FWIW, I can confirm that on Hetzner/Ubuntu this is the default range.

                              1 Reply Last reply
                              0
                              • J joseph referenced this topic
                              • MiroTalkM MiroTalk referenced this topic
                              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