VNC on Lucid: Connection reset by peer (104) after first session logout

Bug #607175 reported by Vince O'Farrell
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gdm (Ubuntu)
New
Low
Unassigned

Bug Description

Binary package hint: gdm

Problem occurs on headless server (no screen, no keyboard) which I have just upgraded from 8.04 LTS to 10.04 LTS. I believe the problem appeared after the upgrade. It may be related to 433928 and 578013.

The first VNC connection from a remote system works correctly. After a normal logout from this first server session (which closes the remote vncviewer window), subsequent VNC connection attempts fail with the ubiquitous read: Connection reset by peer (104) message.

Restarting gdm allows connections to be made again.

The following syslog sequence shows the messages from the sequence:
1. failed connection attempt
2. restart gdm
3. successful connection attempt
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Jul 19 11:15:52 uranus console-kit-daemon[859]: WARNING: Couldn't read /proc/4091/environ: Failed to open file '/proc/4091/environ': No such file or directory
Jul 19 11:16:54 uranus gdm-binary[5641]: WARNING: Unable to find users: no seat-id found
Jul 19 11:16:54 uranus acpid: client 3941[0:0] has disconnected
Jul 19 11:16:54 uranus acpid: client connected from 5645[0:0]
Jul 19 11:16:54 uranus acpid: 1 client rule loaded
Jul 19 11:17:01 uranus gdm-simple-greeter[5681]: Gtk-WARNING: /build/buildd/gtk+2.0-2.20.1/gtk/gtkwidget.c:5636: widget not within a GtkWindow
Jul 19 11:17:01 uranus CRON[5686]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jul 19 11:17:02 uranus gdm-simple-greeter[5681]: WARNING: Unable to write to login cache file: /var/lib/gdm/.cache/login_frequency.cache
Jul 19 11:17:02 uranus xinetd[5693]: warning: can't get client address: Transport endpoint is not connected
Jul 19 11:17:13 uranus gdm-simple-greeter[5720]: Gtk-WARNING: /build/buildd/gtk+2.0-2.20.1/gtk/gtkwidget.c:5636: widget not within a GtkWindow
Jul 19 11:17:15 uranus gdm-simple-greeter[5720]: WARNING: Unable to write to login cache file: /var/lib/gdm/.cache/login_frequency.cache
Jul 19 11:17:19 uranus gdm-session-worker[5722]: GLib-GObject-CRITICAL: g_value_get_boolean: assertion `G_VALUE_HOLDS_BOOLEAN (value)' failed
Jul 19 11:17:29 uranus gnome-session[5738]: WARNING: Could not launch application 'gnome-volume-manager.desktop': Unable to start application: Failed to execute child process "/usr/lib/gnome-volume-manager/gnome-volume-manager" (No such file or directory)
---------------------------------------------------------------------------------------------------------------------------------------------------------------

and the processes running after the successful connection:

vince@uranus:/var/log$ ps ax|grep gdm
 5641 ? Ssl 0:00 gdm-binary
 5642 ? Sl 0:00 /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1
 5645 tty8 Ss+ 0:02 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-7LmKg3/database
 5667 ? Ssl 0:00 /usr/bin/gnome-session --autostart=/usr/share/gdm/autostart/LoginWindow/
 5673 ? Ss 0:00 /usr/lib/gnome-settings-daemon/gnome-settings-daemon --gconf-prefix=/apps/gdm/simple-greeter/settings-manager-plugins
 5681 ? S 0:01 /usr/lib/gdm/gdm-simple-greeter
 5683 ? S 0:00 /usr/lib/gdm/gdm-session-worker
 5694 ? Sl 0:00 /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display2
 5722 ? Sl 0:00 /usr/lib/gdm/gdm-session-worker
 5993 pts/1 S+ 0:00 grep gdm

Packages in use:

Linux uranus 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 07:54:58 UTC 2010 i686 GNU/Linux

gdm 2.30.2.is.2.30.0-0ubuntu2
gnome-session-bin 2.30.0-0ubuntu1
vnc4server 4.1.2
vnc4-common 4.1.2

My current workround is *not* to logout but close the remote vncviewer process. The Xvnc session on the server then continues and I reuse it on subsequent connections.

Revision history for this message
Vince O'Farrell (vof) wrote :

I forgot to say that I invoke the vnc server via xinetd. Here is the process info:

vince@uranus:/var/log$ ps ax|grep vnc
 5693 ? Ss 25:24 Xvnc -inetd :1 -query localhost -geometry 1024x768 -depth 16 -once -fp /usr/share/fonts/X11/misc -DisconnectClients=0 -NeverShared -extension XFIXES passwordFile=/root/.vncpasswd
 6006 pts/1 S+ 0:00 grep vnc

The gdm processes after I logout and can not reconnect look like this:

 5641 ? Ssl 0:00 gdm-binary
 5642 ? Sl 0:00 /usr/lib/gdm/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1
 5645 tty8 Ss+ 0:02 /usr/bin/X :0 -br -verbose -auth /var/run/gdm/auth-for-gdm-7LmKg3/database
 5667 ? Ssl 0:00 /usr/bin/gnome-session --autostart=/usr/share/gdm/autostart/LoginWindow/
 5673 ? Ss 0:00 /usr/lib/gnome-settings-daemon/gnome-settings-daemon --gconf-prefix=/apps/gdm/simple-greeter/settings-manager-plugins
 5681 ? S 0:01 /usr/lib/gdm/gdm-simple-greeter
 5683 ? S 0:00 /usr/lib/gdm/gdm-session-worker
 6032 pts/1 S+ 0:00 grep gdm

and there are no vnc processes.

Changed in gdm (Ubuntu):
importance: Undecided → Low
Revision history for this message
Tony Fuller (g-launchpad-tonyfuller-clara-co-uk) wrote :

This bug also means a second user cannot VNC into the Ubuntu machine until the first person has logged out and the Gnome Desktop Manager (gdm) has been restarted. The second user and the first user trying to log in having logged out a message about the server being in application mode (using UltraVNC from Windows).
I have had to write a script run from cron to detect when a user has logged off to automatically restart gdm before another user can VNC in as a workaround.
I have implemented an inetd spawned vncserver on Solaris (sparc) 10 and it works beautifully with multiple users and no need to restart gdm...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.