Can't get VDRP working (Connection Refused)

Discussions related to using VirtualBox on Linux hosts.
Post Reply
itsthejb
Posts: 3
Joined: 26. Jan 2017, 15:59

Can't get VDRP working (Connection Refused)

Post by itsthejb »

Hi all,

This seems to be a common problem. I've read all the other threads that I could find, but no joy. Here's all the info I can think to provide:

Host:
CentOS Linux release 7.3.1611 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
VirtualBox:
5.0.32r112930
Virtual Machine Info:
Attached
It should be listening on port 9000:
# sudo netstat -anp | grep 9000
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1340/php-fpm: maste
tcp6 0 0 :::9000 :::* LISTEN 10442/VBoxHeadless
I'm trying to use Microsoft Remote Desktop on OSX. I get a "Connection Refused" as the main error. Also in phpVirtualBox 5.0-5 I can't use the console, and get
E: TCP: SECURITY_ERROR Error #2048
. I'm only trying to connect on the LAN using the server's IP address - and that's probably all I'll want to do. Little bit strange that the machine gets IP address
10.0.2.15
in the log. When I try to connect to that address I get:
Unable to connect to remote PC. Please verify Remote Desktop is enabled, the remote PC is turned on and available on the network, and then try again.
Any help much appreciated!
Attachments
VBox.log
00:00:02.991302 HGCM: restoring [VBoxSharedClipboard]
00:00:02.991312 Starting host clipboard service
00:00:02.991318 ClipConstructX11: X11 DISPLAY variable not set -- disabling shared clipboard
00:00:02.991385 VMMDev: Guest Additions information report: Interface = 0x00010004 osType = 0x00053100 (Linux >= 2.6, 64-bit)
00:00:02.992583 Display::handleDisplayResize: uScreenId=0 pvVRAM=00007fd5d8f36000 w=1024 h=768 bpp=32 cbLine=0x1000 flags=0x1
00:00:02.994612 Changing the VM state from 'LOADING' to 'SUSPENDED'
00:00:02.994636 Changing the VM state from 'SUSPENDED' to 'RESUMING'
00:00:02.994847 NAT: Link down
00:00:02.994866 Changing the VM state from 'RESUMING' to 'RUNNING'
00:00:02.994869 Console: Machine state changed to 'Running'
00:00:08.061827 AIOMgr: Flush failed with VERR_INVALID_PARAMETER, disabling async flushes
00:00:08.083106 NAT: Link up
00:00:08.083159 NAT: resolv.conf: nameserver 192.168.178.1
00:00:08.083177 NAT: resolv.conf: nameserver fd00::c225:6ff:fe65:faf3
00:00:08.083192 NAT: Adding domain name fritz.box
00:00:08.083194 NAT: DNS#0: 192.168.178.1
00:00:09.392011 NAT: IPv6 not supported
00:00:09.475004 NAT: resolv.conf: nameserver 192.168.178.1
00:00:09.475026 NAT: resolv.conf: nameserver fd00::c225:6ff:fe65:faf3
00:00:09.475044 NAT: Adding domain name fritz.box
00:00:09.475054 NAT: DNS#0: 192.168.178.1
00:00:09.475069 NAT: DHCP offered IP address 10.0.2.15
VBox.log
(1.37 KiB) Downloaded 54 times
info.txt
VBoxManage showvminfo "Ubuntu"
(4.8 KiB) Downloaded 58 times
JEBjames
Posts: 58
Joined: 26. Jan 2017, 18:27
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: Centos, Ubuntu, Debian, Various Windows
Contact:

Re: Can't get VDRP working (Connection Refused)

Post by JEBjames »

That log looks like you are just restoring from a save-state? i.e. not a full log.

I'd suggest checking these four things:

First, try shutting down the guest. I mean a complete shutdown, not paused/save state. On the *host* computer do the netstat while the guest is down. Make sure nothing is running on the vrdp port you want to use.

In your example you are listening on the ipv6 ip address only and not ipv4 address (in use by php-fpm). So you'd only be able to connect over ipv6 addresses. Consider picking another port.

Second, while the guest is still off double check that the extension pack is installed. Make sure the version of the extension pack matches your version of VirtualBox. If it doesn't match fix this and then reboot.

Just a caution...if the authentication method is "null" it allows remote desktop into the computer without a user/password.

Start your guest again. You should see references to "VRDE" and "Extension Pack" in the log.

Third, the VRDE runs on the *host* computer's ip address, not the guest. i.e. not your guests 10.0.2.15 address. Try doing a remote desktop connection into your *host* computer's ip address. Not the guest's ip address. And unless you change to another port you'll only be able to connect to the ipv6 address and not the ipv4 of your host computer.

Finally, you mentioned running Centos as your host. Depending how you have it configured, you may need to tweak your firewall/selinux configuration to allow the rdp connections from trusted computers.
itsthejb
Posts: 3
Joined: 26. Jan 2017, 15:59

Re: Can't get VDRP working (Connection Refused)

Post by itsthejb »

Hi @JEBjames,

Thanks very much for helping. Here's steps working through your ideas.

1. Ext Pack is one thing I definitely covered, at least!
$ VBoxManage --version
5.0.32r112930

$ VBoxManage list extpacks
Extension Packs: 1
Pack no. 0: Oracle VM VirtualBox Extension Pack
Version: 5.0.32
Revision: 112930
Edition:
Description: USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption.
VRDE Module: VBoxVRDP
Usable: true
Why unusable:
2. Correct that I was pausing the virtual machine on that log. It wasn't working on full boot either, but I get your steps.

3. netstat with shutdown VM gives no result as expected.

4. Firewall is off. I'm behind a router and just port-forward as required. I'll probably only use VirtualBox on the LAN.

5. I switched the port to 3389 to test. New log is attached. Key lines:
$ cat VBox.log | grep VRDE
00:00:00.022520 Oracle VM VirtualBox Extension Pack (Version: 5.0.32 r112930; VRDE Module: VBoxVRDP)
00:00:00.026540 VRDE: loaded version 4 of the server.
00:00:00.026545 VRDE: [IMAGE]
00:00:00.026547 VRDE: [MOUSEPTR]
00:00:00.026548 VRDE: [SCARD]
00:00:00.026549 VRDE: [TSMFRAW]
00:00:00.026551 VRDE: [VIDEOIN]
00:00:00.026552 VRDE: [VRDE::INPUT]
00:00:00.050738 Driver <string> = "AudioVRDE" (cb=10)
00:00:00.050740 AudioDriver <string> = "AudioVRDE" (cb=10)
00:00:00.109043 Audio: Initializing VRDE driver
I wasn't aware that using a high port number like that restricted me to IPV6. Any more info on that for education's sake?

...and it works! :D It would seem that the important point in my case was the port number. phpVirtualBox defaults to the 9000 range...

Thanks very much!
JEBjames
Posts: 58
Joined: 26. Jan 2017, 18:27
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: Centos, Ubuntu, Debian, Various Windows
Contact:

Re: Can't get VDRP working (Connection Refused)

Post by JEBjames »

Good job getting it working! :)

Which ports work? And why? If you are still curious try this:

Stop the guest. Try different ports -- like 3399 and 9001. Start the guest and see if it still works. Keeping in mind that for non-standard ports (anything other than the default 3389) you need to override the port number in your rdp client. E.g. if your host server ip address is "11.22.33.44" and you are running on rdp port 3399 you would need to connect to "11.22.33.44:3399".

If everything other than 9000 works then it was likely some other Linux program (e.g. php-fpm) hogging that particular port 9000 for regular tcp v4 addresses.

If none of the ports work it's some other issue (firewall/etc.). Or you forgot to add the :port part of the address.
itsthejb
Posts: 3
Joined: 26. Jan 2017, 15:59

Re: Can't get VDRP working (Connection Refused)

Post by itsthejb »

Thanks again for the help, and the extra info!
Post Reply