Further information:
Our vncserver script (and the vncserver script for other Xvnc
implementations, such as TigerVNC) has a hard-coded limit of 99
sessions, mainly because:
(a) All VNC viewers expect Display :{n} to map to TCP port 5900+{n} on
the server, and
(b) Starting with VNC display :100, the RFB ports would start
interfering with X11 TCP ports (6000-), and the HTTP ports would start
interfering with RFB ports (5900-).
Technically the only RFB ports registered with IANA are 5900 and 5800,
so Xvnc solutions are already stomping on ports that aren't registered
to RFB. However, those ports are registered to somewhat esoteric
applications that probably wouldn't be used on a VNC server, so thus far
it hasn't been a problem. If people need more than 99 TurboVNC
sessions, then the best solution would probably be for vncserver to pick
an unused TCP port for the 100th and subsequent sessions and require
that viewers connect to those sessions using {host}::{port} rather than
{host}:{display_number}. Thus far, no one has requested more than 99
sessions in the nearly 15 years that TurboVNC has existed, but I'm just
putting all of this out there in case someone does have a need for it.
With the TurboVNC Session Manager, which will be introduced this year in
TurboVNC 3.0, it would even be possible for the viewer to automatically
connect to the port that the server automatically assigns.
As to the issue at hand:
I tried to reproduce it with TurboVNC 2.2 on RHEL 7 and wasn't able to.
I've got 99 sessions, and a glitch ain't one. I started them all with
-listen tcp and the HTTP daemon activated, and I verified that I can run
xdpyinfo and glxinfo against all 99 sessions. I also started them
asynchronously, to simulate multiple users banging away on the server
simultaneously. I confirmed that, with the aforementioned settings,
TurboVNC 2.2 is occupying the same TCP ports that TurboVNC 2.1 occupied:
- IPv4 and IPv6 ports 6000+{n} for the X11 connection
- IPv4 port 5900+{n} for the RFB connection (this would change to IPv6
if -ipv6 is passed to the server)
- IPv4 port 5800+{n} for the HTTP connection (this would also change to
IPv6 if -ipv6 is passed to the server)
I also tried with -ipv6 and got the same result. I am happy to re-test
this on your Linux distribution of choice. Question: did anything else
change other than the TurboVNC version? I could see, for instance, a
different window manager creating some sort of resource exhaustion that
didn't exist previously. Other straws to grasp at, based on looking at
the TurboVNC change log:
- TurboVNC 2.2 introduced a software GLX extension, which may be causing
some sort of resource exhaustion (although I tested with it enabled
above.) If you are using VirtualGL, then you can safely start the
server with -extension GLX to disable the software GLX extension, in
case that is causing the problem.
- TurboVNC 2.2 enabled multi-threaded Tight encoding by default.
Although you shouldn't be running into a thread limit because of that,
stranger things have happened. You can revert to the TurboVNC 2.1.x
behavior by passing -nomt to the server. I seriously doubt this is the
cause, since those threads aren't actually created until a viewer connects.
Other than that, the upgrade to xorg-xserver 1.19.6 was the only other
major change to the server, but without the ability to reproduce the
problem or any further information on it (error messages?), I'm clueless.
On 1/12/19 7:44 PM, Rafael Guimaraes wrote:
> I haven't tested it without -listen tcp... It's a must in our
> environment, so I don't know the behavior without It...
>
> Em sáb, 12 de jan de 2019 17:23, DRC <
d...@virtualgl.org
> <mailto:
d...@virtualgl.org> escreveu:
>
> So it goes away if you don’t use ‘-listen tcp’?
>
> On Jan 7, 2019, at 8:23 PM, Rafael Guimaraes <
rgu...@gmail.com
> <mailto:
rgu...@gmail.com>> wrote:
>
>> I am currently using the -listen tcp, since users are allowed to
>> export display to the TurboVNC session. So, the problem happens
>> with -listen tcp on...
>>
>> Em sex, 4 de jan de 2019 às 05:43, DRC <
d...@virtualgl.org
>> <mailto:
d...@virtualgl.org>> escreveu:
>>
>> There is no such limit in TurboVNC. If such a limit exists, it
>> is apparently being imposed by the operating system somehow.
>> Not sure what would have changed in 2.2 to cause the maximum
>> number of sessions to decrease. It might have had something to
>> do with upgrading the Xorg code base to 1.19.x. It would be a
>> useful data point to see whether the ‘-listen tcp’ option has
>> any effect. That option used to be the default, but it is not
>> anymore.
>>
>> On Jan 3, 2019, at 2:20 PM, Rafael Guimaraes <
rgu...@gmail.com
>>> <mailto:
turbovnc-deve...@googlegroups.com>.
>>> <
https://groups.google.com/d/msgid/turbovnc-devel/CAMCG4_-%2BT4Oxk6H-xdt82APPaqqB8A5Hot-d237hZGvATshsng%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>> <mailto:
turbovnc-deve...@googlegroups.com>.
>> To view this discussion on the web visit
>>
https://groups.google.com/d/msgid/turbovnc-devel/613DF5A5-72A8-4A70-B9D2-FE988593264B%40virtualgl.org
>> <
https://groups.google.com/d/msgid/turbovnc-devel/613DF5A5-72A8-4A70-B9D2-FE988593264B%40virtualgl.org?utm_medium=email&utm_source=footer>.
>> <mailto:
turbovnc-deve...@googlegroups.com>.
>> To view this discussion on the web visit
>>
https://groups.google.com/d/msgid/turbovnc-devel/CAMCG4_8826CZrqxCfuSdmsSvZ9xvr4%3DVVwCmS%2B5fx9jke3-5ag%40mail.gmail.com
>> <
https://groups.google.com/d/msgid/turbovnc-devel/CAMCG4_8826CZrqxCfuSdmsSvZ9xvr4%3DVVwCmS%2B5fx9jke3-5ag%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> <mailto:
turbovnc-deve...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/turbovnc-devel/DCFFC243-898D-409F-B63D-01C49EB115BD%40virtualgl.org
> <
https://groups.google.com/d/msgid/turbovnc-devel/DCFFC243-898D-409F-B63D-01C49EB115BD%40virtualgl.org?utm_medium=email&utm_source=footer>.
> <mailto:
turbovnc-deve...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/turbovnc-devel/CAMCG4_8iBJDrEy5Wk0Cq6nevdiSbfU1H_D2iRrwZn7okbs%2BudQ%40mail.gmail.com
> <
https://groups.google.com/d/msgid/turbovnc-devel/CAMCG4_8iBJDrEy5Wk0Cq6nevdiSbfU1H_D2iRrwZn7okbs%2BudQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.