Vboxwebsrv on Ubuntu 16.04 - Connection refused

Discussions related to using VirtualBox on Linux hosts.
Post Reply
polo199
Posts: 2
Joined: 20. Jul 2017, 20:56

Vboxwebsrv on Ubuntu 16.04 - Connection refused

Post by polo199 »

Hi guys/girls,

I'm trying to set up a Virtualbox host for personal/professional use on a cloud-hosted, dedicated server. I'm fighting with enabling vboxwebserver so I can remotely manage my VMs without needing any Xserver on the host OS. I intend to use Remotebox for that purpose and then set some headless VMs up.

I think I've managed to get the vboxwebserver to work. However, I cannot connect remotely (Remotebox, Curl, nor nc to IP:18083). I'm getting a "credential refused or server not reachable/not running" error message.

Code: Select all

curl: (7) Failed to connect to 213.246.39.4 port 18083: Connexion refusée
Only local connection to localhost:18083 seems to work (getting a SOAP prompt with curl).

Code: Select all

curl result to localhost:18083
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Fault xmlns:...
I've double-checked IPtables on the host OS but it is not activated. Obviously, I can remote connect to my host machine with SSH and ping. So I seriously doubt any FW is running there.
I created a dedicated user to run the vboxwebserver service: "virtual". After some exploration, I learnt that the service is not using the /etc/default/virtualbox config file but that you have to edit the service main file. I did that and it seems to be OK since the vboxweb service is now run by "virtual". However, the problem is still there: I cannot connect remotely to my Vbox. Here is some info:

Code: Select all

/etc/passwd
virtual:x:1001:116::/home/virtual:

~# ps -aef | grep vbox
virtual   1212     1  0 18:06 ?        00:00:00 /usr/lib/virtualbox/vboxwebsrv --pidfile /home/virtual/vboxweb/vboxweb.pid --background
root      3627  3603  0 22:34 pts/0    00:00:00 grep --color=auto vbox

~# netstat -anp |grep vbox
tcp6       0      0 ::1:18083               :::*                    LISTEN      1212/vboxwebsrv 
unix  2      [ ACC ]     STREAM     LISTENING     18808    1219/VBoxXPCOMIPCD  /tmp/.vbox-virtual-ipc/ipcd
unix  3      [ ]         STREAM     CONNECTED     18809    1219/VBoxXPCOMIPCD  /tmp/.vbox-virtual-ipc/ipcd
unix  3      [ ]         STREAM     CONNECTED     16330    1219/VBoxXPCOMIPCD  /tmp/.vbox-virtual-ipc/ipcd
unix  3      [ ]         STREAM     CONNECTED     16327    1212/vboxwebsrv

~# iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
I hope this helps...

I'm no expert so that might not even be a Vbox issue but more of a Ubuntu missing configuration. However, I'm struggling to find a comprehensive link (Remotebox how-to is not up-to-date).

If someone could help me there... :) Thanks in advance.
MarkClancy
Posts: 2
Joined: 21. Jul 2017, 22:31

Re: Vboxwebsrv on Ubuntu 16.04 - Connection refused

Post by MarkClancy »

What version of vbox are you using? I had this working fine (after much futzing around) on 5.1.22 but after doing the update to 5.1.24 mine fails as well. And worse VMs I built and ran fine under 5.1.22 now crash after starting up if I start them from the command line in headless mode.
polo199
Posts: 2
Joined: 20. Jul 2017, 20:56

Re: Vboxwebsrv on Ubuntu 16.04 - Connection refused

Post by polo199 »

Thanks for your answer Mark.

I'm running Virtualbox 5.0.40 on Ubuntu 16.04. (from dpkg -l)

Code: Select all

ii  virtualbox                         5.0.40-dfsg-0ubuntu1.16.04.1               amd64        x86 virtualization solution - base binaries
Post Reply