Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#204 closed defect (invalid)

upgrade of xpra session NAK

Reported by: pmarek Owned by: Antoine Martin
Priority: major Milestone:
Component: Server Keywords:
Cc: smeagol271006@…

Description

I just installed xpra 0.4.0, and, to get my session upgraded in-place, did a kill of the winswitch_daemon, and reconnected.

winswitch tried to restart xpra, I believe:

26717 ?        S     22:55 /usr/bin/python /usr/bin/xpra --xvfb=/usr/bin/
26718 ?        S      4:55  \_ /usr/bin/Xvfb-for-Xpra-:67 +extension Comp
26786 ?        S      0:00 python /usr/lib/winswitch/delayed_start /home/
26787 ?        S      0:00  \_ /bin/sh -c xchat
26788 ?        Sl    35:13      \_ xchat
13327 ?        S      0:00 /usr/bin/python /usr/bin/winswitch_server --da
13371 ?        D      0:00 /usr/bin/python /usr/bin/xpra --bind-tcp=0.0.0

But something went wrong, and the new session was killed - *including* Xvfb and my active xchat.

The logfile has these entries:

[II] 2012/23/06 22:53:33 XpraServerUtil.start_daemon(ServerSession(:67 - xpra - available),
[II] 2012/23/06 22:53:34 virt_server_daemonizer.grab_daemon_pid(['/.../virt_server_daemonizer', ...
 '--', '/usr/bin/xpra', ... 'start', ':67', '--use-display'
[II] 2012/23/06 22:53:34 XpraServerUtil.session_process_started(13371,ServerSession(:67 - xpra - available))
[II] 2012/23/06 22:53:34 XpraServerUtil.do_watch_session_log(...
[II] 2012/23/06 22:53:34 WinSwitchServer.publish() mDNS_publish=True
[II] 2012/23/06 22:53:34 AvahiPublisher.__init__(Window Switch for ...
[EE] 2012/23/06 22:53:34 AvahiPublishers.start() error on publisher AvahiPublisher(Window Switch for ...
[ee] 2012/23/06 22:53:35 Traceback (most recent call last):
[ee] 2012/23/06 22:53:35   File "/usr/lib/pymodules/python2.7/winswitch/net/avahi_publisher.py", line 64, in start
[ee] 2012/23/06 22:53:35     publisher.start()
[ee] 2012/23/06 22:53:35   File "/usr/lib/pymodules/python2.7/winswitch/net/avahi_publisher.py", line 105, in start
[ee] 2012/23/06 22:53:35     bus = dbus.SystemBus()
[ee] 2012/23/06 22:53:35   File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 194, in __new__
[ee] 2012/23/06 22:53:35     private=private)
[ee] 2012/23/06 22:53:35   File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 100, in __new__
[ee] 2012/23/06 22:53:35     bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
[ee] 2012/23/06 22:53:35   File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 122, in __new__
[ee] 2012/23/06 22:53:35     bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
[ee] 2012/23/06 22:53:35 DBusException: org.freedesktop.DBus.Error.NoServer:
  Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused
[II] 2012/23/06 22:53:36 XpraServerUtil.detect_sessions() found: [('DEAD', ':67')]
[II] 2012/23/06 22:53:36 ServerSession.close() self=ServerSession(:67 - xpra - closed), killing ...

Perhaps there's a way to get the new xpra running on a different port, and only grab the Xvfb and kill the old xpra when everything else is ready?

Change History (8)

comment:1 Changed 13 years ago by Antoine Martin

Owner: changed from Antoine Martin to Antoine Martin
Status: newaccepted

First, you can get rid of the large DBUS stacktrace by either:

  • starting a dbus server on this machine
  • turning off dbus with mDNS_publish=False in .winswitch/server/server.conf

As for the dead xpra session, winswitch seems to use the right incantations:

[II] 2012/23/06 22:53:33 XpraServerUtil.start_daemon(ServerSession(:67 - xpra - available),
[II] 2012/23/06 22:53:34 virt_server_daemonizer.grab_daemon_pid(['/.../virt_server_daemonizer', ...
 '--', '/usr/bin/xpra', ... 'start', ':67', '--use-display'
(...)
[II] 2012/23/06 22:53:36 XpraServerUtil.detect_sessions() found: [('DEAD', ':67')]

So this is likely to be an xpra bug, not a winswitch one.

Can you try this:

xpra --no-daemon --bind-tcp=0.0.0.0:10000 start :10

Then in another terminal:

xpra --no-daemon --bind-tcp=0.0.0.0:10001 start :10 --use-display

Does the first one exit properly?
Does the second one stay up?

Last edited 13 years ago by Antoine Martin (previous) (diff)

comment:2 Changed 13 years ago by Antoine Martin

Also, it would help to have the full xpra command line, before the upgrade, and the one that failed to start (with IP/hostname addresses obfuscated rather than removed)

comment:3 Changed 13 years ago by pmarek

turning off dbus with mDNS_publish=False in .winswitch/server/server.conf

Hmmm, I'd like to have the machine being published via mDNS!
There's a running "dbus-daemon --system", but it's outside of the chroot ...

No, the first one doesn't exit properly ...

$ xpra --no-daemon --bind-tcp=0.0.0.0:10000 start :10
[dix] Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/100dpi/:unscaled, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/75dpi/:unscaled, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/Type1, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/100dpi, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/75dpi, removing from list!
[dix] Could not init font path element /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType, removing from list!
Xlib:  extension "RANDR" missing on display ":10".
Xlib:  extension "RANDR" missing on display ":10".
Xlib:  extension "RANDR" missing on display ":10".
Randr not supported: X server does not support required extension Randr
using notification forwarder: DBUSNotificationsForwarder(org.freedesktop.Notifications)

xpra is ready.
New connection received: /home/.../.xpra/uhura-10
Connection lost
Lost WM selection, exiting

xpra is terminating.

xpra end of gtk.main().
upgrading: not cleaning up Xvfb or socket
closing tcp socket
Connection lost

But there are two processes running:

Xvfb-for-Xpra-:10 +extension Composite -screen 0 3840x2560x24+32 -nolisten tcp -noreset -auth /home/.../.Xauthority :10
/usr/bin/python /usr/bin/xpra --bind-tcp=0.0.0.0:15066 --password-file=/home/.../.winswitch/server/sessions/10/session.pass --no-daemon --no-pulseaudio --session-name=unknown start :10 --use-display

Trying the second command then gives

$ xpra --no-daemon --bind-tcp=0.0.0.0:10001 start :10 --use-display
Xlib:  extension "RANDR" missing on display ":10".
Xlib:  extension "RANDR" missing on display ":10".
Xlib:  extension "RANDR" missing on display ":10".
Randr not supported: X server does not support required extension Randr
using notification forwarder: DBUSNotificationsForwarder(org.freedesktop.Notifications)

xpra is ready.
New connection received: /home/marek/.xpra/uhura-10
Connection lost

This command now runs (shell doesn't return), and the other xpra is gone.

The original incantation was

[II] 2012/23/06 22:53:34 virt_server_daemonizer.grab_daemon_pid(['/usr/lib/winswitch/virt_server_daemonizer', 
  '--quiet', '--print-pid', '--daemon', '--log-file', '/home/.../.winswitch/server/sessions/67/xpra.log', '--',
  '/usr/bin/xpra', '--bind-tcp=0.0.0.0:15060', '--password-file=/home/.../.winswitch/server/sessions/67/session.pass', 
  '--no-daemon', '--no-pulseaudio', '--session-name=...', 'start', ':67', '--use-display'],
  /home/...,
  {'LANG': 'en_US.UTF-8', 'SHELL': '/bin/bash', 'DBUS_SESSION_BUS_ADDRESS': 'unix:abstract=/...',
  'PWD': '/home/...', 'USER': '...', 'HOME': '/home/...',
  'PATH': '/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/.../bin:/usr/sbin:', 'DISPLAY': ':67'})
 <subprocess.Popen object at 0x9c79f6c>.returncode=0, stdoutdata=13371\n, stderrdata=, pid=13371

but I cannot give you the old result.

The same command runs now with

/usr/bin/python /usr/bin/xpra --xvfb=/usr/bin/Xvfb +extension Composite -screen 0 3840x2560x24+32 -noreset -auth $XAUTHORITY
  --bind-tcp=0.0.0.0:15064 --password-file=/home/.../.winswitch/server/sessions/63/session.pass --no-daemon
  --no-pulseaudio --session-name=... start :63

comment:4 in reply to:  3 Changed 13 years ago by Antoine Martin

turning off dbus with mDNS_publish=False in .winswitch/server/server.conf

Hmmm, I'd like to have the machine being published via mDNS!
There's a running "dbus-daemon --system", but it's outside of the chroot ...

Then you need to bind mount its socket so it can be reached.


No, the first one doesn't exit properly ...

What makes you think that?

(..)
Lost WM selection, exiting

xpra is terminating.

xpra end of gtk.main().
upgrading: not cleaning up Xvfb or socket
closing tcp socket
Connection lost

Looks fine to me.


But there are two processes running:

Xvfb-for-Xpra-:10 +extension Composite -screen 0 3840x2560x24+32 \
    -nolisten tcp -noreset -auth /home/.../.Xauthority :10
/usr/bin/python /usr/bin/xpra --bind-tcp=0.0.0.0:15066 \
    --password-file=/home/.../.winswitch/server/sessions/10/session.pass \
    --no-daemon --no-pulseaudio --session-name=unknown start :10 --use-display

There are always two processes running, one is the Xvfb (the X11 server), the other is the window manager (xpra).

comment:5 Changed 12 years ago by Antoine Martin

Resolution: needinfo
Status: acceptedclosed

never heard back - closing

comment:6 Changed 12 years ago by smeagol

Cc: smeagol271006@… added
Resolution: needinfo
Status: closedreopened

Hi Antoine,

I'm suffering this behaviour too in Debian Squeeze. Installation method was using your repos.

xpra --no-daemon --bind-tcp=0.0.0.0:10000 start :10

SELinux: Disabled on system, not enabling in X server
[dix] Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
Xlib:  extension "RANDR" missing on display ":10.0".
Xlib:  extension "RANDR" missing on display ":10.0".
Xlib:  extension "RANDR" missing on display ":10.0".
2012-11-27 23:16:01,911 Warning: X server does not support required extension Randr
2012-11-27 23:16:01,996 error loading or registering our dbus notifications forwarder:
2012-11-27 23:16:01,996   the name 'org.freedesktop.Notifications' is already claimed on the session bus
2012-11-27 23:16:01,997 if you do not have a dedicated dbus session for this xpra instance,
2012-11-27 23:16:01,997   you should use the '--no-notifications' flag
2012-11-27 23:16:01,997 
2012-11-27 23:16:01,998 xpra server version 0.7.4
2012-11-27 23:16:02,192 xpra is ready.
2012-11-27 23:16:02,578 New connection received: SocketConnection(/home/martin/.xpra/shodan-10 - )
2012-11-27 23:16:02,581 Connection lost
2012-11-27 23:16:02,763 New connection received: SocketConnection(/home/martin/.xpra/shodan-10 - )
2012-11-27 23:16:02,764 New connection received: SocketConnection(/home/martin/.xpra/shodan-10 - )
2012-11-27 23:16:02,864 Connection lost
2012-11-27 23:16:02,866 Connection lost
2012-11-27 23:16:03,020 New connection received: SocketConnection(/home/martin/.xpra/shodan-10 - )
2012-11-27 23:16:03,131 Connection lost
2012-11-27 23:16:03,492 Lost WM selection, exiting
2012-11-27 23:16:03,492 xpra is terminating.
2012-11-27 23:16:03,494 xpra end of gtk.main().
2012-11-27 23:16:03,494 upgrading: not cleaning up Xvfb or socket
2012-11-27 23:16:03,495 closing tcp socket 0.0.0.0:10000

DISPLAY=:10 gvim
Xlib:  extension "RANDR" missing on display ":10.0".

xpra attach :10

xpra client version 0.7.4
2012-11-27 23:17:50,996 '['setxkbmap', '-query']' failed with exit code 255
2012-11-27 23:17:50,996 the server will try to guess your keyboard mapping, which works reasonably well in most cases
2012-11-27 23:17:50,996 however, upgrading 'setxkbmap' to a version that supports the '-query' parameter is preferred
2012-11-27 23:17:51,086 password is required by the server
2012-11-27 23:17:51,087 Connection lost

xpra --no-daemon --bind-tcp=0.0.0.0:10001 start :10 --use-display

xpra attach :10
xpra client version 0.7.4
2012-11-27 23:25:00,408 '['setxkbmap', '-query']' failed with exit code 255
2012-11-27 23:25:00,409 the server will try to guess your keyboard mapping, which works reasonably well in most cases
2012-11-27 23:25:00,409 however, upgrading 'setxkbmap' to a version that supports the '-query' parameter is preferred
2012-11-27 23:25:00,785 mmap is enabled using 134MBytes area in /tmp/xpra.zuLhZ0.mmap
2012-11-27 23:25:00,845 Attached to :10 (press Control-C to detach)

Now new output from the server

2012-11-27 23:24:59,949 New connection received: SocketConnection(/home/martin/.xpra/shodan-10 - )
2012-11-27 23:25:00,521 Handshake complete; enabling connection
2012-11-27 23:25:00,526 Python/Gtk client version 0.7.4 with uuid ce3423c5957babc4541c1fb323cb869fca17a8268a4fb7906725e86954200ec677ce822daea1da9b399039d0f08ae3352218e849563a2f9b18fa94dd3d096526
2012-11-27 23:25:00,526 mmap is enabled using 134MBytes area in /tmp/xpra.zuLhZ0.mmap
2012-11-27 23:25:00,526 setting key repeat rate from client: 500ms delay / 33ms interval
2012-11-27 23:25:00,530 guessing keyboard layout='pc+logitechmek+us+logitechmek+latam'
2012-11-27 23:25:00,631 setting full keymap definition from client via xkbcomp
2012-11-27 23:25:00,711 keymapping removed invalid keycode entry 108 pointing to more than one modifier (set(['mod1', 'mod5'])): set([('Alt_R', 0), ('Meta_R', 1), ('ISO_Level3_Shift', 2)])
2012-11-27 23:25:01,496 Uh-oh, our size doesn't fit window sizing constraints: 1265x934 vs 1265x908


Despite my horrible own keyboard setup it works as expected.

Can't also run any command from Windows Switch. I have already sent mail to the users list.

Error from winswitch is:
"This server does not export any commands!"
Don't know if related.
Desktop Session also does not Work (VNC). Same error.

Tried placing some .Desktop files with

for x in `ls /usr/share/applications`; do
ln -sf /usr/share/applications/$x ./; done


No luck either

I can provide feedback if needed. Thanks for your wonderful software.
I am at your disposal Sir !

Last edited 12 years ago by Antoine Martin (previous) (diff)

comment:7 Changed 12 years ago by Antoine Martin

Resolution: invalid
Status: reopenedclosed

smeagol, this bug you report as having "me too" is invalid, so I do not know what your problem is nor can I help you.

This log message:

Lost WM selection, exiting

Generally means that winswitch is running on that box and is upgrading the xpra sessions to make them available via its applet. You can disable this feature via .winswitch/server/protocols/xpra.conf or just turn off winswitch when testing xpra standalone.

As for your question regarding the missing start commands, I have already replied to that elsewhere - try those instructions (I won't repeat them here).

comment:8 Changed 12 years ago by smeagol

Sorry for the reopening. Actually some winswitch related process was running (maybe not a clean exit). Don't know hoy I missed it. Works all right! Thanks

Note: See TracTickets for help on using tickets.