Bugzilla – Bug 152718
vncserver stops giving the service after 2 clients connect
Last modified: 2006-03-13 15:55:14 UTC
the vncserver is started through xinetd, as installed and configured straight from the installation. firewall is told to let remote administration. I can get 2 connections with vncviewer from a remote machine, but I cannot get the third. dropping one of the two existing connections let the server initiating a new one, but it is always the second. the Xvnc is version 1.2.9-186
*** Bug 152719 has been marked as a duplicate of this bug. ***
Could be some wanted limitation. Reinhard?
I can't reprduce it. I was able to initiate four VNC sessions at once (didn't try more). The command I used for all sessions was: vncserver localhost:1 Francesco, what commands did you use to start your sessions?
(In reply to comment #3) > I can't reprduce it. I was able to initiate four VNC sessions at once (didn't > try more). The command I used for all sessions was: > > vncserver localhost:1 > > Francesco, what commands did you use to start your sessions? I use vncserver as service started by xinetd, through the followind (standard) configuration, in the file /etc/xinetd.d/vnc: ... service vnc1 { socket_type = stream protocol = tcp wait = no user = nobody server = /usr/X11R6/bin/Xvnc server_args = :42 -inetd -query localhost -geometry 1024x768 -depth 16 type = UNLISTED port = 5901 } ... I can get a first vncserver start and serve the vncviewer onm my remote pc (running linux fedora3; there, I run vncviewer xxx::5901), and a second one (same machine::port: xxx::5901). the third does not start: vncviewer waits for a connection, and after a while times out. can you try to reproduce it in this way? regards
I was using the same xinetd configuration for the test described in Comment #3, just that I used display numbers instead of port numbers on the client side. But I just re-tried it with port numbers, and that works for me as well. Maybe fedora has a broken vncviewer.
I tried it on many client: fedora, knoppix 3 windows 2000 all give the same problem. could it be related to the fact that suse 10.0 I use is the 64 bit release?
I have only tried it on a 32bit 10.0, and the machine even had some X packages (including Xvnc) updated to version 6.9. So I'll reopen this bug, and re-try it next week (when I am back from vacation) on an x86_64 machine with the original Xvnc package from 10.0.
I've just tried it with an x86_64 machine that has 10.0 installed, and had no problems opening multiple VNC connections. So let me ask you some more questions... Could it be that on your server in /etc/xinetd.conf the values for the "instances" or "cps" parameter is set too low? Have you checked if /var/log/xinetd.log tells you anything about the failed connection attempts? Does it work if you switch off the firewall?
hello max, this is the tail of xinetd.log; note the last 2 lines: vnc2 (1280x1024) exits with status 1 and duration 1 sec.. matlab:/home/simiasota # tail /var/log/xinetd.log 06/2/24@11:37:04: START: vnc2 from=172.22.25.132 06/2/24@17:31:08: START: vnc2 from=172.22.25.132 06/2/24@17:31:09: START: vnc2 from=172.22.25.132 06/2/24@17:45:21: EXIT: vnc2 status=0 duration=852(sec) 06/2/24@17:48:30: START: vnc2 from=172.22.25.132 06/2/27@08:30:01: START: vnc2 from=126.7.160.86 06/2/27@08:31:46: EXIT: vnc2 status=0 duration=105(sec) 06/2/27@10:55:43: START: vnc2 from=172.22.25.120 06/2/28@10:40:06: START: vnc2 from=172.22.25.132 06/2/28@10:40:07: EXIT: vnc2 status=1 duration=1(sec) =========================================================== the file xinetd.conf reports instances = 30 and cps = 50 10: matlab:/home/simiasota # cat /etc/xinetd.conf # # xinetd.conf # # Copyright (c) 1998-2001 SuSE GmbH Nuernberg, Germany. # Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany. # defaults { log_type = FILE /var/log/xinetd.log log_on_success = HOST EXIT DURATION log_on_failure = HOST ATTEMPT # only_from = localhost instances = 30 cps = 50 10 } =================================================== The firewall is stopped at the moment of writing: it was my first concern to check it out. I do remeber there is one option referring to vnc in sax2 configuration, but I tryied to change it too with no effects.
Finally I started xinetd in debug mode, and tried unsuccessfully to get a third connection. this is the report of xinetd debug: matlab:/home/simiasota # 06/2/28@12:02:43: DEBUG: 28274 {main_loop} select returned 1 06/2/28@12:02:43: DEBUG: 28274 {server_start} Starting service vnc2 06/2/28@12:02:43: DEBUG: 28281 {exec_server} duping 14 06/2/28@12:02:43: DEBUG: 28274 {main_loop} active_services = 7 06/2/28@12:02:43: DEBUG: 28274 {main_loop} active_services = 7 06/2/28@12:02:43: DEBUG: 28274 {main_loop} select returned 1 06/2/28@12:02:43: DEBUG: 28274 {check_pipe} Got signal 17 (Child exited) 06/2/28@12:02:43: DEBUG: 28274 {child_exit} waitpid returned = 28281 06/2/28@12:02:43: DEBUG: 28274 {server_end} vnc2 server 28281 exited 06/2/28@12:02:43: INFO: 28274 {conn_free} freeing connection 06/2/28@12:02:43: DEBUG: 28274 {child_exit} waitpid returned = -1 06/2/28@12:02:43: DEBUG: 28274 {main_loop} active_services = 7
I was just about to say, that the first three lines in the first log you posted already looked like there were three connections at the same time.
It seems that there are more than 2 connections: the log shows 7 STARTED connections and 3 EXITS. The algebra should give 4 active connections, nevertheless if I stat the processes, I find the following: matlab:/home/simiasota # ps -ef | grep vnc nobody 8142 1 0 Feb24 ? 00:07:10 Xvnc :42 -inetd -query localhost -geometry 1280x1024 -depth 16 nobody 2727 1 0 Feb27 ? 00:00:46 Xvnc :42 -inetd -query localhost -geometry 1280x1024 -depth 16 root 29080 8447 0 12:52 pts/2 00:00:00 grep vnc to say: the active connections are only 2 I can give more lines from xinetd.log (even the whole log..). do you think it could be useful?
Some log info from Xvnc would be more useful, but I haven't found a way to make it log anything when running in inetd mode. What does vncviewer print out on failed connection attempts, compared to successful ones?
the first 4/5 lines are for a successfull connection (connection #2), the remaining lines are for the uncessefull one (#3): matlab:/home/simiasota # 06/2/28@14:34:50: DEBUG: 31237 {main_loop} select returned 1 06/2/28@14:34:50: DEBUG: 31237 {server_start} Starting service vnc2 06/2/28@14:34:50: DEBUG: 31237 {main_loop} active_services = 6 06/2/28@14:34:50: DEBUG: 31558 {exec_server} duping 13 matlab:/home/simiasota # 06/2/28@14:35:18: DEBUG: 31237 {main_loop} select returned 1 06/2/28@14:35:18: DEBUG: 31237 {server_start} Starting service vnc2 06/2/28@14:35:18: DEBUG: 31580 {exec_server} duping 13 06/2/28@14:35:18: DEBUG: 31237 {main_loop} active_services = 6 06/2/28@14:35:19: DEBUG: 31237 {main_loop} active_services = 6 06/2/28@14:35:19: DEBUG: 31237 {main_loop} select returned 1 06/2/28@14:35:19: DEBUG: 31237 {check_pipe} Got signal 17 (Child exited) 06/2/28@14:35:19: DEBUG: 31237 {child_exit} waitpid returned = 31580 06/2/28@14:35:19: DEBUG: 31237 {server_end} vnc2 server 31580 exited 06/2/28@14:35:19: INFO: 31237 {conn_free} freeing connection 06/2/28@14:35:19: DEBUG: 31237 {child_exit} waitpid returned = 0 06/2/28@14:35:19: DEBUG: 31237 {main_loop} active_services = 6
And what's the output of vncviewer in the successful and failing case?
it does not seems very usefull; in the unsuccessfull case it only adds a "connection reset by peer (104)" (or "end of stream", setting debug of vncviewer to 100): successfull case: [simiasota@sevedemo ~]$ vncviewer 172.22.25.236::5902 VNC viewer for X version 4.0 - built Oct 6 2004 08:06:12 Copyright (C) 2002-2004 RealVNC Ltd. See http://www.realvnc.com for information on VNC. unsuccessfull: [simiasota@sevedemo ~]$ vncviewer 172.22.25.235::5902 VNC viewer for X version 4.0 - built Oct 6 2004 08:06:12 Copyright (C) 2002-2004 RealVNC Ltd. See http://www.realvnc.com for information on VNC. Tue Feb 28 15:02:24 2006 main: read: Connection reset by peer (104)
Could you please also try it with the version of vncviewer that comes with 10.0? That one gives some more debugging output and it is currently the only one I can try to reproduce it with.
It seems offering lot o debug for successfull connections, but poor for the uncessessfull: connection #2 (OK!): simiasota@matlab:~> vncviewer 172.22.25.236::5902 & [1] 577 simiasota@matlab:~> VNC server supports protocol version 3.7 (viewer 3.3) No authentication needed Desktop name "nobody's x11 desktop (gnecca:3)" Connected to VNC server, using protocol version 3.3 VNC server default format: 16 bits per pixel. Least significant byte first in each pixel. True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0 Using default colormap which is TrueColor. Pixel format: 16 bits per pixel. Least significant byte first in each pixel. True colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0 =========================== connection #3 (KO!): simiasota@matlab:~> vncviewer 172.22.25.236::5902 & [2] 582 simiasota@matlab:~> VNC server supports protocol version 3.7 (viewer 3.3) vncviewer: read: Connection reset by peer [2]+ Exit 1 vncviewer 172.22.25.236::5902 simiasota@matlab:~>
Well, at least it shows that the connection breaks very early, before all the parameters are negotiated that would otherwise be printed out.
Yes you are right. another thing is that the problem does not seems to be related to the viewer: I tried realvnc, tightvnc, kde remotedesktop, and vncviewer on many windows OS/linux OS: all the viewers stops almost instantly..
I see no way to track this down and fix it as long as we can't reproduce it here. Stefan, is there a way to get better debugging information out of Xvnc, or how else shall we proceed with this?
I'm not aware of a way to get better debug info of Xvnc. So let's close this now as WORKSFORME.