rdesktop connection rejected - VRDE and VNC on same port

Discussions related to using VirtualBox on Linux hosts.
lotus49
Posts: 9
Joined: 10. Aug 2009, 22:09
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian Wheezy

rdesktop connection rejected - VRDE and VNC on same port

Post by lotus49 »

I am using VirtualBox 4.2.16_Debianr86992 (running on Debian of course). When I start my new VM I get the following output:

Code: Select all

root@stonechat:/home/simon# VBoxHeadless --startvm "phoenix"
Oracle VM VirtualBox Headless Interface 4.2.16_Debian
(C) 2008-2013 Oracle Corporation
All rights reserved.

16/11/2013 20:24:24 Listening for VNC connections on TCP port 3389
16/11/2013 20:24:24 Listening for VNC connections on TCP6 port 5900
VRDE server is listening on port 3389.
When I try to log into the VM from another machine using rdesktop (on an Ubuntu desktop) I get disconnected immediately:

Code: Select all

Autoselected keyboard map en-gb
ERROR: Connection closed
and on the VirtualBox host I get:

Code: Select all

16/11/2013 20:51:27   other clients:
16/11/2013 20:51:27 webSocketsHandshake: invalid client header
16/11/2013 20:51:27 Client 192.168.1.232 gone
16/11/2013 20:51:27 Statistics             events    Transmit/ RawEquiv ( saved)
16/11/2013 20:51:27  TOTALS              :      0 |         0/        0 (  0.0%)
16/11/2013 20:51:27 Statistics             events    Received/ RawEquiv ( saved)
16/11/2013 20:51:27  TOTALS              :      0 |         0/        0 (  0.0%)
I read elsewhere (viewtopic.php?f=7&t=58226&p=270424&hili ... er#p270424) that VRDE and VNC should not be running on the same port. I don't know if this is the problem but I didn't configure them to do so.

If that is the problem, how do I reconfigure the VNC server so that it does not run on the standard RDP port?
 Edit:  Having done some further investigation, I have a litte more information (although sadly no more understanding). I tried to change the VRDE port but this automatically changed the IPV4 VNC port to the same value. I presume that this is not an accident and that the RDP and VNC servers run on the same port by design. This being the case, what's going wrong? 
Last edited by lotus49 on 17. Nov 2013, 01:03, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by Perryg »

From the hosts terminal type VBoxManage showvminfo <VM Name> --details and post here. Replace <VM Name> with the actual name of the VM. Use " " if the name has a space in it.

I also would like for you to post the actual command you are using to try to connect to the guest.
lotus49
Posts: 9
Joined: 10. Aug 2009, 22:09
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian Wheezy

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by lotus49 »

This is the output of VBoxManage showvminfo "phoenix" --details:

Code: Select all

Name:            phoenix
Groups:          /
Guest OS:        Debian
UUID:            9e89efd5-b996-4ad0-b774-d6d2b58817b7
Config file:     /var/virtualbox/phoenix/phoenix.vbox
Snapshot folder: /var/virtualbox/phoenix/Snapshots
Log folder:      /var/virtualbox/phoenix/Logs
Hardware UUID:   9e89efd5-b996-4ad0-b774-d6d2b58817b7
Memory size:     256MB
Page Fusion:     off
VRAM size:       8MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
Synthetic Cpu:   off
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): DVD
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          off
PAE:             off
Time offset:     0ms
RTC:             local time
Hardw. virt.ext: on
Hardw. virt.ext exclusive: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
State:           aborted (since 2013-11-17T01:04:44.000000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration:
Autostart Enabled: off
Autostart Delay: 0
Storage Controller Name (0):            IDE Controller
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
IDE Controller (0, 0): /var/virtualbox/phoenix/phoenix_root.vdi (UUID: 4c25471e-fbf5-4e94-b31c-683d5676bcc2)
IDE Controller (1, 0): /var/virtualbox/debian-7.2.0-i386-netinst.iso (UUID: 23c0b2dd-b7be-4275-be89-d080601e0b19)
NIC 1:           MAC: 080027772A6C, Attachment: Bridged Interface 'wlan0', Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           disabled
Clipboard Mode:  disabled
Drag'n'drop Mode:  disabled
VRDE:            disabled
USB:             disabled
EHCI:            disabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups:  <none>

Shared folders:  <none>

VRDE Connection:    not active
Clients so far:     0

Guest:

Configured memory balloon size:      0 MB
This is the exact command I am running:

Code: Select all

$ rdesktop 192.168.1.218:3389
It is probably worth pointing out that I also tried using Remmina on both protocols (ie RDP and VNC) and in neither case was I able to connect.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by Perryg »

So VRDE is disabled for the guest and rdesktop does not work for VNC.
I would enable VRDE in the guest, set the port, then rdesktop to the hosts IP and guests port.

Note: You did install the extension pack right?
lotus49
Posts: 9
Joined: 10. Aug 2009, 22:09
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian Wheezy

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by lotus49 »

Perryg wrote:So VRDE is disabled for the guest and rdesktop does not work for VNC.
I would enable VRDE in the guest, set the port, then rdesktop to the hosts IP and guests port.
I had understood from the manual that VRDE is automatically used whenever a VM is started using VBoxHeadless but I have manually turned this on (plus installing the extension pack, see below) and now the relevant part of the output of VBoxManage showvminfo "phoenix" --details is:

Code: Select all

VRDE:            enabled (Address 0.0.0.0, Ports 3389, MultiConn: off, ReuseSingleConn: off, Authentication type: null)
VRDE property: TCP/Ports  = "3389"
VRDE property: TCP/Address = <not set>
VRDE Connection:    not active
This looked much more promising but unfortunately, the result is exactly the same in both the output on the host and the connecting client.
Perryg wrote:Note: You did install the extension pack right?
I hadn't but thanks for pointing that out and I now have. Although it never would have worked without that, it doesn't seem to have helped.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by Perryg »

Code: Select all

rdesktop 192.168.1.218:3389
So is 192.168.1.218 the IP address of the host?

If so be sure that you reboot the host and also make sure that your user name is in the vboxusers group on the host (requires a reboot as well)
lotus49
Posts: 9
Joined: 10. Aug 2009, 22:09
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian Wheezy

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by lotus49 »

Yes, that's right.

On the host, there is an error message pertaining to the connection that says:

Code: Select all

17/11/2013 21:27:31   other clients:
17/11/2013 21:27:31 webSocketsHandshake: invalid client header
17/11/2013 21:27:31 Client 192.168.1.200 gone
17/11/2013 21:27:31 Statistics             events    Transmit/ RawEquiv ( saved)
17/11/2013 21:27:31  TOTALS              :      0 |         0/        0 (  0.0%)
17/11/2013 21:27:31 Statistics             events    Received/ RawEquiv ( saved)
17/11/2013 21:27:31  TOTALS              :      0 |         0/        0 (  0.0%)
so it is clear that the machines are communicating with each other. If you are eagle-eyed, you will see that this is a different IP address to that quoted above as I tried to connect from a Windows machine (192.168.1.200) using the built-in RDP client but exactly the same thing happened. I am fairly much convinced that whatever is wrong is wrong on the server not the clients.

I was originally running the VMs as root. I was only doing this while I was testing but I have now set up a vbox user which is a member of the vboxusers group and has full rw permissions over the directory in which the VMs are stored. However, once again, this has made no difference and I am getting exactly the same result. I also tried a Windows VNC client. The only difference with this was that trying to connect with this didn't produce any output on the host, which was different to when I used the Windows RDP client and rdesktop and Remmini from an Ubuntu machine.

I don't know if there is something that I have done in creating the VM that caused this as I have done almost no configuration on it but I'll try creating another VM and see whether that makes any difference. The only possible factor that occurs to me is that the host is currently communicating (IPV4) over a wireless connection. I don't know whether this is at all relevant but I thought it worth mentioning as I know there are some limitations on the use of wireless bridged networks. At the moment, trying a wired network is not an alternative as the ethernet drivers are not working on the host. I'll try to fix that and see whether that helps as well.
 Edit:  Fixing the ethernet drivers was easier than I expected but changing the bridged adapter from wlan0 to eth0 has made no difference at all. I've really run out of time to try to fix this now but later in the week I shall try starting again from scratch and see how I get on. I suppose I might try downloading a pre-configured VM and see whether that works.

Thanks for your help so far. 
lotus49
Posts: 9
Joined: 10. Aug 2009, 22:09
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian Wheezy

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by lotus49 »

I have now re-created a VM and tried to connect from the host itself rather than a remote machine but it made absolutely no difference at all.

I am completely stumped.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by Perryg »

Post the newest guest log, the newest VBoxsvc.log, the results of id from the hosts terminal, as well as the following:
VBoxManage list extpacks
VBoxManage showvminfo <guest name>
ChristianGeorge
Posts: 2
Joined: 26. Feb 2014, 16:54

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by ChristianGeorge »

Hi

I am having the same issue on Ubuntu 13.10 vbox 4.2.16.

It seem that vbox uses the same port for both VNC and VRDP. I can not see any description on how to set them individually.

Here is some info.

Code: Select all


cdg@cdgserver 0 ~  2
$ VBoxManage showvminfo WinXpHomeOem_En
Name:            WinXpHomeOem_En
Groups:          /
Guest OS:        Windows XP
UUID:            8e4c69f0-e891-4998-a7e2-c420ae598e36
Config file:     /home/cdg/VirtualBox VMs/WinXpHomeOem_En/WinXpHomeOem_En.vbox
Snapshot folder: /home/cdg/VirtualBox VMs/WinXpHomeOem_En/Snapshots
Log folder:      /home/cdg/VirtualBox VMs/WinXpHomeOem_En/Logs
Hardware UUID:   8e4c69f0-e891-4998-a7e2-c420ae598e36
Memory size:     2048MB
Page Fusion:     off
VRAM size:       16MB
CPU exec cap:    100%
HPET:            off
Chipset:         piix3
Firmware:        BIOS
Number of CPUs:  1
Synthetic Cpu:   off
CPUID overrides: None
Boot menu mode:  message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI:            on
IOAPIC:          off
PAE:             off
Time offset:     0ms
RTC:             local time
Hardw. virt.ext: on
Hardw. virt.ext exclusive: on
Nested Paging:   on
Large Pages:     off
VT-x VPID:       on
State:           aborted (since 2014-02-26T14:35:57.000000000)
Monitor count:   1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address: 
Teleporter Password: 
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration: 
Autostart Enabled: off
Autostart Delay: 0
Storage Controller Name (0):            IDE
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
IDE (0, 0): /home/cdg/VirtualBox VMs/WinXpHomeOem_En/WinXpHomeOem_En.vdi (UUID: 96a42ead-b990-48d6-9ac3-a03ed57196b4)
IDE (1, 0): /home/cdg/.VirtualBox/VBoxGuestAdditions_4.2.16.iso (UUID: 6fa2f4b9-fec5-431a-91b5-5b8a3937d285)
NIC 1:           MAC: 080027D7F59C, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 2:           disabled
NIC 3:           disabled
NIC 4:           disabled
NIC 5:           disabled
NIC 6:           disabled
NIC 7:           disabled
NIC 8:           disabled
Pointing Device: USB Tablet
Keyboard Device: PS/2 Keyboard
UART 1:          disabled
UART 2:          disabled
LPT 1:           disabled
LPT 2:           disabled
Audio:           enabled (Driver: ALSA, Controller: AC97)
Clipboard Mode:  HostToGuest
Drag'n'drop Mode:  disabled
VRDE:            enabled (Address 0.0.0.0, Ports 3390, MultiConn: on, ReuseSingleConn: off, Authentication type: null)
Video redirection: disabled
VRDE property: TCP/Ports  = "3390"
VRDE property: TCP/Address = <not set>
USB:             enabled
EHCI:            enabled

USB Device Filters:

<none>

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups:  <none>

Shared folders:  <none>

VRDE Connection:    not active
Clients so far:     0

Guest:

Configured memory balloon size:      0 MB



cdg@cdgserver 0 ~  2
$ VBoxManage list extpacks             
Extension Packs: 2
Pack no. 0:   VNC
Version:      4.2.16
Revision:     86992
Edition:      
Description:  VNC plugin module
VRDE Module:  VBoxVNC
Usable:       true 
Why unusable: 

Pack no. 1:   Oracle VM VirtualBox Extension Pack
Version:      4.2.16
Revision:     86992
Edition:      
Description:  USB 2.0 Host Controller, VirtualBox RDP, PXE ROM with E1000 support.
VRDE Module:  VBoxVRDP
Usable:       true 
Why unusable: 

cdg@cdgserver 0 ~  2
$ vboxheadless --startvm WinXpHomeOem_En 
Oracle VM VirtualBox Headless Interface 4.2.16_Ubuntu
(C) 2008-2013 Oracle Corporation
All rights reserved.

26/02/2014 15:50:19 Listening for VNC connections on TCP port 3390
26/02/2014 15:50:19 Listening for VNC connections on TCP6 port 5900
VRDE server is listening on port 3390.

^C

Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by Perryg »

ChristianGeorge
Posts: 2
Joined: 26. Feb 2014, 16:54

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by ChristianGeorge »

Thanks.

The following has very help full:

Code: Select all

$ VBoxManage setproperty vrdeextpack "Oracle VM VirtualBox Extension Pack"
Now only RDP is running. It is a shame that you can not run both at the same time.
jlinkels58
Posts: 7
Joined: 29. May 2017, 04:06

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by jlinkels58 »

@ChristianGeorge @PerryG

Thanks for posting your problem and solution. I took me the better part of the evening to find this thread. All other threads with RDP connection problems insist that you have Oracle VM VirtualBox Extension Pack installed, but none talks about uninstalling VNC.

This solved my problem as well, although I had to restart the VirtualBox service before the change was in effect.

I don't understand why I had the VNC extension installed. But it is clear it should not have been there.

jlinkels
sbarrett
Posts: 1
Joined: 9. Nov 2018, 00:22

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by sbarrett »

It seems like this thread, and every one I can find on google, ended up at the conclusion of "Just install the virtual box extension pack". I haven't found anyone who has actually gotten the VNC extension pack working.

I want to use the built in VNC extension pack, not the vbox extension pack, because it avoids licensing issues. Has anyone figured out how to get this working? If it doesn't work at all, why is it included in virtualbox by default?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: rdesktop connection rejected - VRDE and VNC on same port

Post by socratis »

sbarrett wrote:It seems like this thread, and every one I can find on google
Have you tried the User Manual ch. 9.23. Other extension packs?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply