Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    SocketException starting Linux ProGet in Docker

    Scheduled Pinned Locked Moved Support
    linuxproget
    7 Posts 2 Posters 29 Views
    Loading More Posts
    • 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.
    • ? This user is from outside of this forum
      Guest
      last edited by

      I assume I am doing something wrong with my docker setup as this appeared after restarting a previously working instance. But I am at a loss as nothing changed in my config and the error is a bind error which only makes sense of the socket is being sent bad info.

      Docker Command:
      /usr/bin/docker run -v /etc/localtime:/etc/localtime:ro -v /home/proget/packages:/var/proget/packages -v /home/proget/extensions:/var/proget/extensions -p 8081:80 --name=proget --net=bridge -e PROGET_DATABASE="Server=172.17.0.1;Database=proget;User Id=;Password=;" inedo/proget:latest

      Stack Trace:

      Starting DockerUploadCleanupExecuter...

      Unhandled Exception:
      System.Net.Sockets.SocketException (0x80004005): The requested address is not valid in this context

      Server stack trace:
      at System.Net.Sockets.Socket.Bind (System.Net.EndPoint localEP) [0x0004c] in <5641e4edad4f4464ba58c620a7b8ea48>:0
      at System.Net.EndPointListener..ctor (System.Net.HttpListener listener, System.Net.IPAddress addr, System.Int32 port, System.Boolean secure) [0x0004a] in <5641e4edad4f4464ba58c620a7b8ea48>:0
      at System.Net.EndPointManager.GetEPListener (System.String host, System.Int32 port, System.Net.HttpListener listener, System.Boolean secure) [0x000be] in <5641e4edad4f4464ba58c620a7b8ea48>:0
      at System.Net.EndPointManager.AddPrefixInternal (System.String p, System.Net.HttpListener listener) [0x00064] in <5641e4edad4f4464ba58c620a7b8ea48>:0
      at System.Net.EndPointManager.AddListener (System.Net.HttpListener listener) [0x00030] in <5641e4edad4f4464ba58c620a7b8ea48>:0

      Exception rethrown at [0]:
      at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_remoting_wrapper (intptr,intptr)
      at (wrapper remoting-invoke) Inedo.Web.Server.HttpListenerHost:Start (Inedo.Web.Server.WebServerConfiguration)
      at (wrapper xdomain-invoke) Inedo.Web.Server.HttpListenerHost:Start (Inedo.Web.Server.WebServerConfiguration)
      at (wrapper remoting-invoke-with-check) Inedo.Web.Server.HttpListenerHost:Start (Inedo.Web.Server.WebServerConfiguration)
      at Inedo.Web.Server.IntegratedServer.ProcessRequests () [0x00042] in <a916a109296c4f6da15cf8a9df666821>:0
      at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <f712f98eb8e445c8918edaf595bbe465>:0
      at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <f712f98eb8e445c8918edaf595bbe465>:0
      at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <f712f98eb8e445c8918edaf595bbe465>:0
      at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <f712f98eb8e445c8918edaf595bbe465>:0
      at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <f712f98eb8e445c8918edaf595bbe465>:0
      [ERROR] FATAL UNHANDLED EXCEPTION: System.Net.Sockets.SocketException (0x80004005): The requested address is not valid in this context

      Server stack trace:
      at System.Net.Sockets.Socket.Bind (System.Net.EndPoint localEP) [0x0004c] in <5641e4edad4f4464ba58c620a7b8ea48>:0
      at System.Net.EndPointListener..ctor (System.Net.HttpListener listener, System.Net.IPAddress addr, System.Int32 port, System.Boolean secure) [0x0004a] in <5641e4edad4f4464ba58c620a7b8ea48>:0
      at System.Net.EndPointManager.GetEPListener (System.String host, System.Int32 port, System.Net.HttpListener listener, System.Boolean secure) [0x000be] in <5641e4edad4f4464ba58c620a7b8ea48>:0
      at System.Net.EndPointManager.AddPrefixInternal (System.String p, System.Net.HttpListener listener) [0x00064] in <5641e4edad4f4464ba58c620a7b8ea48>:0
      at System.Net.EndPointManager.AddListener (System.Net.HttpListener listener) [0x00030] in <5641e4edad4f4464ba58c620a7b8ea48>:0

      Exception rethrown at [0]:
      at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_remoting_wrapper (intptr,intptr)
      at (wrapper remoting-invoke) Inedo.Web.Server.HttpListenerHost:Start (Inedo.Web.Server.WebServerConfiguration)
      at (wrapper xdomain-invoke) Inedo.Web.Server.HttpListenerHost:Start (Inedo.Web.Server.WebServerConfiguration)
      at (wrapper remoting-invoke-with-check) Inedo.Web.Server.HttpListenerHost:Start (Inedo.Web.Server.WebServerConfiguration)
      at Inedo.Web.Server.IntegratedServer.ProcessRequests () [0x00042] in <a916a109296c4f6da15cf8a9df666821>:0
      at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <f712f98eb8e445c8918edaf595bbe465>:0
      at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <f712f98eb8e445c8918edaf595bbe465>:0
      at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <f712f98eb8e445c8918edaf595bbe465>:0
      at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <f712f98eb8e445c8918edaf595bbe465>:0
      at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <f712f98eb8e445c8918edaf595bbe465>:0

      Product: ProGet
      Version: 4.7.6

      1 Reply Last reply Reply Quote 0
      • benB Offline
        ben inedo-engineer
        last edited by

        Is something else listening on port 8081 on the host? ProGet's docker image only tries to listen using a System.Net.HttpListener with the prefix "http://*:80/", which ends up listening on port 80 on all available interfaces in the container.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Was the first thing I checked. netstat -atp --numeric-ports shows nothing bound to 8081. There is however something bound to port 80 on the host.

          1 Reply Last reply Reply Quote 0
          • benB Offline
            ben inedo-engineer
            last edited by

            Hmm, I just tried it locally and Docker gives a very different error message for my hypothesis:

            docker: Error response from daemon: driver failed programming external connectivity on endpoint proget (559abf94e7064e2fa65b27ebf9c334b517927912b0eb73763a0875c6c060d4a7): Error starting userland proxy: listen tcp 0.0.0.0:8081: bind: address already in use.
            

            Is it possible something is still holding one end of a connection open to port 8081 on the host?

            1 Reply Last reply Reply Quote 0
            • ? This user is from outside of this forum
              Guest
              last edited by

              Something that is invisible to netstat and survived a restart? (NOTE: ran netstat as root)

              1 Reply Last reply Reply Quote 0
              • benB Offline
                ben inedo-engineer
                last edited by

                Hmm, if you rebooted the host, that's probably not it.

                1 Reply Last reply Reply Quote 0
                • ? This user is from outside of this forum
                  Guest
                  last edited by

                  Tried stoping the service that was tying up port 80. No help.

                  1 Reply Last reply Reply Quote 0

                  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
                  • 1 / 1
                  • First post
                    Last post
                  Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation