Page 1 of 1

Can't get VDRP working (Connection Refused)

Posted: 26. Jan 2017, 16:36
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!

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

Posted: 27. Jan 2017, 10:41
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.

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

Posted: 27. Jan 2017, 11:46
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!

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

Posted: 27. Jan 2017, 21:24
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.

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

Posted: 29. Jan 2017, 02:20
by itsthejb
Thanks again for the help, and the extra info!