Unable to connect to VirtualBox RDP server #242

Closed
helgef opened this Issue Dec 1, 2011 · 11 comments

Comments

Projects
None yet
4 participants
@helgef

helgef commented Dec 1, 2011

Tested with commit a0a25a6

VirtualBox implements its own RDP server displaying its guest OS. FreeRDP does not work with this server. MS Remote Desktop client (for mac) works fine.

Show connected, but never displays:

Helges-MacBook-Air:X11 helge$ ./xfreerdp 192.168.1.150
Warning xf_GetWindowProperty (104): Property 294 does not exist
connected to 192.168.1.150:3389

@helgef

This comment has been minimized.

Show comment
Hide comment
@helgef

helgef Dec 1, 2011

Does not work under 0.8 either - However 0.8 gives a more verbose output, might help:

Helges-MacBook-Air:X11 helge$ ./xfreerdp 192.168.1.150
keyboard_layout: 0x409
connecting to 192.168.1.150:3389
connecting to 192.168.1.150:3389
connecting to 192.168.1.150:3389
Standard RDP encryption negotiated
dyld: lazy symbol binding failed: Symbol not found: _hexdump
Referenced from: /Users/helge/FreeRDP-old/libfreerdp-core/.libs/libfreerdp-core.0.dylib
Expected in: flat namespace

dyld: Symbol not found: _hexdump
Referenced from: /Users/helge/FreeRDP-old/libfreerdp-core/.libs/libfreerdp-core.0.dylib
Expected in: flat namespace

Trace/BPT trap: 5
Helges-MacBook-Air:X11 helge$

helgef commented Dec 1, 2011

Does not work under 0.8 either - However 0.8 gives a more verbose output, might help:

Helges-MacBook-Air:X11 helge$ ./xfreerdp 192.168.1.150
keyboard_layout: 0x409
connecting to 192.168.1.150:3389
connecting to 192.168.1.150:3389
connecting to 192.168.1.150:3389
Standard RDP encryption negotiated
dyld: lazy symbol binding failed: Symbol not found: _hexdump
Referenced from: /Users/helge/FreeRDP-old/libfreerdp-core/.libs/libfreerdp-core.0.dylib
Expected in: flat namespace

dyld: Symbol not found: _hexdump
Referenced from: /Users/helge/FreeRDP-old/libfreerdp-core/.libs/libfreerdp-core.0.dylib
Expected in: flat namespace

Trace/BPT trap: 5
Helges-MacBook-Air:X11 helge$

@helgef helgef closed this Dec 1, 2011

@helgef helgef reopened this Dec 1, 2011

@atong

This comment has been minimized.

Show comment
Hide comment
@atong

atong Dec 2, 2011

Member

VRDP doesnt seem to like freerdp's rdp_client_connect_demand_active() sequence; VRDP doesnt reply after that.

Member

atong commented Dec 2, 2011

VRDP doesnt seem to like freerdp's rdp_client_connect_demand_active() sequence; VRDP doesnt reply after that.

@awakecoding

This comment has been minimized.

Show comment
Hide comment
@awakecoding

awakecoding Dec 10, 2011

Member

@atong-tcs I came to the same conclusion. I tried figuring it out, the ShareId seems to be correct. I don't know what the VRDP doesn't like in our client Confirm Active PDU.

Member

awakecoding commented Dec 10, 2011

@atong-tcs I came to the same conclusion. I tried figuring it out, the ShareId seems to be correct. I don't know what the VRDP doesn't like in our client Confirm Active PDU.

@awakecoding

This comment has been minimized.

Show comment
Hide comment
@awakecoding

awakecoding Dec 12, 2011

Member

I've asked on #vbox and #vbox-dev, I couldn't get in touch with someone working on VRDP yet. I compiled VirtualBox myself but then I realized that VRDP was closed-source, so I wasted my time doing it. I now have opened a ticket, for what it's worth: https://www.virtualbox.org/ticket/10017

While we're at it, I was discussing with some people on IRC, and since VRDP is provided as an "extension pack" it would be totally possible for us to write a replacement RDP server for VirtualBox that could be used instead of the closed-source VRDP component.

Member

awakecoding commented Dec 12, 2011

I've asked on #vbox and #vbox-dev, I couldn't get in touch with someone working on VRDP yet. I compiled VirtualBox myself but then I realized that VRDP was closed-source, so I wasted my time doing it. I now have opened a ticket, for what it's worth: https://www.virtualbox.org/ticket/10017

While we're at it, I was discussing with some people on IRC, and since VRDP is provided as an "extension pack" it would be totally possible for us to write a replacement RDP server for VirtualBox that could be used instead of the closed-source VRDP component.

@awakecoding

This comment has been minimized.

Show comment
Hide comment
@awakecoding

awakecoding Dec 15, 2011

Member

I enabled TLS security and got a little bit further. I think there might be a race condition somewhere in the activation sequence. If I add a sleep right after the send font list pdu (last pdu to be sent for activation) it will go further, but then I'm getting a realloc error on the first bitmap update.

Member

awakecoding commented Dec 15, 2011

I enabled TLS security and got a little bit further. I think there might be a race condition somewhere in the activation sequence. If I add a sleep right after the send font list pdu (last pdu to be sent for activation) it will go further, but then I'm getting a realloc error on the first bitmap update.

@awakecoding

This comment has been minimized.

Show comment
Hide comment
@awakecoding

awakecoding Dec 20, 2011

Member

after deeper investigation with atong on IRC, we fixed a couple of capabilities bugs and we finally found out that the input callbacks were registered prior to the capabilities exchange. This means that fastpath callbacks were registered no matter if you disabled fastpath or not. This bug affected VRDP which does not support fastpath, but it also affected XRDP. Now both VRDP and XRDP work! :D Closing this issue now.

Member

awakecoding commented Dec 20, 2011

after deeper investigation with atong on IRC, we fixed a couple of capabilities bugs and we finally found out that the input callbacks were registered prior to the capabilities exchange. This means that fastpath callbacks were registered no matter if you disabled fastpath or not. This bug affected VRDP which does not support fastpath, but it also affected XRDP. Now both VRDP and XRDP work! :D Closing this issue now.

@awakecoding awakecoding reopened this Dec 20, 2011

@awakecoding

This comment has been minimized.

Show comment
Hide comment
@awakecoding

awakecoding Dec 20, 2011

Member

oops, I was a bit too fast. VRDP will work with --sec tls for now, but there is still a separate bug with --sec rdp. the bug with --sec rdp seems to be related to the capabilities exchange.

Member

awakecoding commented Dec 20, 2011

oops, I was a bit too fast. VRDP will work with --sec tls for now, but there is still a separate bug with --sec rdp. the bug with --sec rdp seems to be related to the capabilities exchange.

@jacob019

This comment has been minimized.

Show comment
Hide comment
@jacob019

jacob019 Jan 2, 2012

not working for me as of to2a9d9c681d (most recent master), even with --sec tls

jacob@office:~# xfreerdp --sec tls localhost
connected to localhost:3389
Error: protocol security negotiation failure

xfreerdp --sec rdp localhost
connected to localhost:3389
(just hangs here, no window)

jacob019 commented Jan 2, 2012

not working for me as of to2a9d9c681d (most recent master), even with --sec tls

jacob@office:~# xfreerdp --sec tls localhost
connected to localhost:3389
Error: protocol security negotiation failure

xfreerdp --sec rdp localhost
connected to localhost:3389
(just hangs here, no window)

@awakecoding

This comment has been minimized.

Show comment
Hide comment
@awakecoding

awakecoding Jan 2, 2012

Member

@jacob019 if --sec tls fails to negotiate TLS, it's probably because your virtual machine isn't configured properly for it.

Member

awakecoding commented Jan 2, 2012

@jacob019 if --sec tls fails to negotiate TLS, it's probably because your virtual machine isn't configured properly for it.

@jacob019

This comment has been minimized.

Show comment
Hide comment
@jacob019

jacob019 Jan 2, 2012

got it, thanks! No need to specify "--sec tls". Once it is enabled in virtualbox everything just works.

I suggest for the 1.0 release to clearly state in the documentation that freerdp can only connect to virtualbox if TLS security is enabled in virtualbox. Perhaps with a link: http://www.virtualbox.org/manual/ch07.html#vrde-crypt

jacob019 commented Jan 2, 2012

got it, thanks! No need to specify "--sec tls". Once it is enabled in virtualbox everything just works.

I suggest for the 1.0 release to clearly state in the documentation that freerdp can only connect to virtualbox if TLS security is enabled in virtualbox. Perhaps with a link: http://www.virtualbox.org/manual/ch07.html#vrde-crypt

@awakecoding

This comment has been minimized.

Show comment
Hide comment
@awakecoding

awakecoding Jan 13, 2012

Member

this one was a real pain to debug, but I finally found the bug which caused the VRDP connectivity issue. The method encoding the share control header was using the wrong length, which broke VRDP. For some reason other servers didn't mind have a length 12 bytes too long, but it was a bug on our side anyway. Now it is fixed, and both --sec rdp and --sec tls should work out of the box :)

Member

awakecoding commented Jan 13, 2012

this one was a real pain to debug, but I finally found the bug which caused the VRDP connectivity issue. The method encoding the share control header was using the wrong length, which broke VRDP. For some reason other servers didn't mind have a length 12 bytes too long, but it was a bug on our side anyway. Now it is fixed, and both --sec rdp and --sec tls should work out of the box :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment