On 3/19/15, Tontyna <[email protected]> wrote:
> Starting several fossil servers with "ui" increments port from 8080 onwards.
> Starting several fossil servers with "server" increments port ditto.
> Mixing "ui" and "server" instances results in double-bound ports.
> Don't know whether that's a Windows-only issue.
>
> Example: When running `fossil server REPO_A` and `fossil ui REPO_B` at
> the same time both HTTP server instances will listen on port 8080.
>
> Experts will tell you that this is impossible and against builtin socket
> behaviour, bind() or listen() would never ever allow it, but that's what
> happens:

The combination if IP address and TCP port must be unique.  In this
case, you have two instances of Fossil listening on the same TCP port,
but using a different IP address.  The "fossil server" is listening on
the external IP address, apparently, and "fossil ui" is listening on
the loopback address.  HTTP requests from other machines should go to
"fossil server" and HTTP requests from the local machine should go to
"fossil ui".

At least that is the way I read this.

>
> C:\Oblong\fossiltest>netstat -ano | find ":8080"
>    TCP    0.0.0.0:8080       0.0.0.0:0            ABHÖREN         6516
>    TCP    127.0.0.1:8080     0.0.0.0:0            ABHÖREN         7312
>
> PID 6516 and PID 7312 listening on 8080.
>
> Consequence is that REPO_A isn't accessible via HTTP. All
> http://localhost:8080/* requests go to the REPO_B server. When you close
> the REPO_B instance REPO_A magically reappears.
>
> I formerly underwent that double-bind-port feature in non-fossil context
> where -- depending on circumstances only heaven knows -- sometimes the
> first an sometimes the second server instance responded to requests on
> the port involved. Our TCP clients experienced funny mixed-up conversations.
> Seems that double-bind only happens for executables having the same base
> name (e.g. "myTCPserver.exe" or "fossil.exe", different full paths don't
> matter).
> To prevent the double-bind we finally implemented a function PortInUse()
> which parses the output of `netstat`.
>
> Only workaround so far:
> Avoid "ui" and "server" at the same time and/or apply a --port below
> 8080 to your `fossil server`.
>
> - Tontyna
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>


-- 
D. Richard Hipp
[email protected]
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to