[solved]vboxwebsrv not responding started with init.d script

Discussions related to using VirtualBox on Linux hosts.
Post Reply
mike.whipps
Posts: 7
Joined: 28. May 2013, 01:06

[solved]vboxwebsrv not responding started with init.d script

Post by mike.whipps »

Hi

I've just installed Fedora 18 on a brand new machine, and I've added VirtualBox to it. I can login as the VirtualBox user, run the GUI manager, create and manage new VMs. So far so good. However, this machine will mostly be remote from my location so I want to add phpvirtualbox to it. I've installed Apache and PHP, downloaded and configured phpvirtualbox, and here's where the fun begins.

If I connect to the server with a browser I can log in to the phpvirtualbox front-end, but then all I get is a 'Loading' box, which disappears after a lengthy delay reporting an 'Error fetching HTTP headers'

vboxwebsrv is running (I can see it with PS, executing as vboxuser). If I stop it, and restart it by typing vboxwebsrv at the command line (still logged in my vboxuser) vboxwebsrv starts up and reports that it has successfully connected to the port. I can now login to phpvirtualbox and see my VMs, start them, use the console, stop them, create new ones, blah-blah-blah, all without a hitch.

vboxuser is a member of vboxusers.

Here's my /etc/default/virtualbox file:

Code: Select all

VBOXWEB_USER=vboxuser
VBOXWEB_HOST=127.0.0.1
VBOXWEB_PORT=18083
VBOXWEB_LOGFILE=/home/vboxuser/vbox.log
And here's the first few lines of the log file from the instance created by the init.d script.

Code: Select all

VirtualBox web service 4.2.14 r86644 linux.amd64 (Jun 21 2013 22:39:07) release log
00:00:00.003341 main     Log opened 2013-06-25T01:13:46.990324000Z
00:00:00.003348 main     OS Product: Linux
00:00:00.003350 main     OS Release: 3.9.6-200.fc18.x86_64
00:00:00.003351 main     OS Version: #1 SMP Thu Jun 13 18:56:55 UTC 2013
00:00:00.003381 main     DMI Product Name: To be filled by O.E.M.
00:00:00.003394 main     DMI Product Version: To be filled by O.E.M.
00:00:00.003485 main     Host RAM: 3848MB total, 3278MB available
00:00:00.003490 main     Executable: /usr/lib/virtualbox/vboxwebsrv
00:00:00.003491 main     Process ID: 6859
00:00:00.003492 main     Package type: LINUX_64BITS_FEDORA_18
00:00:00.176573 SQPmp    Socket connection successful: host = 127.0.0.1, port = 18083, master socket = 9
00:02:20.396056 SQPmp    Request 1 on socket 10 queued for processing (1 items on Q)
00:02:20.408683 SQW01    New SOAP thread started
00:02:20.408707 SQW01    Processing connection from IP=127.0.0.1 socket=10 (0 out of 1 threads idle)
00:02:45.649934 SQPmp    Request 2 on socket 11 queued for processing (1 items on Q)
00:02:45.650065 SQW01    Processing connection from IP=127.0.0.1 socket=11 (0 out of 1 threads idle)
00:02:45.669673 SQPmp    Request 3 on socket 10 queued for processing (1 items on Q)
What set of circumstances allow me run vboxwebsrv successfully from my vboxuser command line, but prevent vboxwebsrv from running properly when started at initialisation? Does anyone have any suggestions as to how I can debug this?
Last edited by mike.whipps on 28. Jun 2013, 04:21, edited 1 time in total.
mike.whipps
Posts: 7
Joined: 28. May 2013, 01:06

Re: vboxwebsrv not responding when started with init.d scrip

Post by mike.whipps »

Well - I think I've found the problem here. I set SeLinux to Permissive, and everything started working.

However, the SeLinux troubleshooter isn't reporting anything, so I now have to track down the exact SeLinux policy that's causing the difficulties. This probably isn't the place to ask, but if anyone has any suggestions I'd welcome them.
Post Reply