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:

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
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to