Score:0

phpvirtualbox: Could not connect to host (http://127.0.0.1:18083/)

cn flag

Server: Ubuntu 20.04 LTS

Virtualbox Version: 6.1.26r145957

VBoxManage list extpacks


Extension Packs: 1
Pack no. 0:   Oracle VM VirtualBox Extension Pack
Version:      6.1.26
Revision:     145957
Edition:
Description:  Oracle Cloud Infrastructure integration, USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe.
VRDE Module:  VBoxVRDP
Usable:       true
Why unusable:

When checking the status of vboxweb.service:

systemctl status vboxweb.service

● vboxweb.service    Loaded: masked (Reason: Unit vboxweb.service is
masked.)     Active: inactive (dead)

If I try to manually start the service:

sudo systemctl start vboxweb

Failed to start vboxweb.service: Unit vboxweb.service is masked.

phpvirtualbox config.php:

/* Username / Password for system user that runs VirtualBox */
var $username = '***';
var $password = '***';

/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */
var $location = 'http://127.0.0.1:18083/';

/* Default language. See languages folder for more language options.
 * Can also be changed in File -> Preferences -> Language in
 * phpVirtualBox.
 */
var $language = 'en';

/* Set the standard VRDE Port Number / Range, e.g. 1010-1020 or 1027 */
var $vrdeports = '9000-9100';

The user in the config.php is part of the vboxusers group.

The files in the phpvirtualbox web folder belong to this user.

phpvirtualbox error in the browser after logging in with admin/admin (I have also tried the username and password of the user configured in the phpvirtualbox config.php):

Exception Object
(
    [message:protected] => Could not connect to host (http://127.0.0.1:18083/)
    [string:Exception:private] => 
    [code:protected] => 64
    [file:protected] => /mnt/raiddisk/public_html/phpvirtualbox/endpoints/api.php
    [line:protected] => 134
    [trace:Exception:private] => Array
        (
        )

    [previous:Exception:private] => 
)

If I try to look for errors in systemctl:

systemctl --failed

vboxweb-service.service loaded failed failed vboxweb-service.service

I have no idea what else to try. I have installed virtualbox directly using the sources from the virtualbox website. I have also tried uninstalling and reinstalling everything.

From what I can tell the vboxweb-service.service is failing to start. But there is no helpful error message to understand why.

Score:0
cn flag

So it turns out that this was the issue: https://www.virtualbox.org/ticket/20479

I manually copied the missing file out of the virtualbox deb file and then tried starting the vboxwebsrv service which did not work. I had to unmask and enable the vboxwebsrv service and then I was able to start it:

systemctl unmask vboxweb-service

systemctl enable vboxweb-service

systemctl restart vboxweb-service
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.