I've been trying to install Phpvirtualbox for most of the evening now but I can't get it to work. I can access the webinterface but when I try to login with admin/admin I always get the error "Could not connect to host".
I've edited config.php in the vbox root and I've added "root" and "$password of root" in the config. I've used 127.0.0.1:18083 in the config as well as 192.168.0.140 which is the server ip address. I have installed virtualbox + phpvirtualbox (via ports in freebsd) under root because it's for an internal network and will be behind a VPN. I've also try disabling authentication but that doesn't work either.
Exception Object
( [message:protected] => Could not connect to host (http://127.0.0.1:18083/) [string:Exception:private] => [code:protected] => 64 [file:protected] => /usr/local/www/phpvirtualbox/lib/ajax.php [line:protected] => 128 [trace:Exception:private] => Array
(
) [previous:Exception:private] =>
)
When I run : netstat -an | grep 18083" I get no output. So it looks like vboxwebsrv just isn't working. When I run vboxwebsrv -v manually I get the following error: "#### SOAP FAULT: Host not found [SOAP-ENV:Server]". While I run it manually netstat still doesn't return anything.
root@unix:/usr/local/www/phpvirtualbox # vboxwebsrv -v
Oracle VM VirtualBox web service Version 4.2.16_OSE
(C) 2007-2013 Oracle Corporation
All rights reserved.
VirtualBox web service 4.2.16_OSE r86992 freebsd.amd64 (Sep 21 2013 02:33:49) release log
00:00:00.000072 main Log opened 2013-09-21T00:57:11.123053000Z
00:00:00.000081 main OS Product: FreeBSD
00:00:00.000085 main OS Release: 9.1-RELEASE-p5
00:00:00.000089 main OS Version: FreeBSD 9.1-RELEASE-p5 #1: Sun Aug 11 21:04:46 CEST 2013 root@unix:/usr/obj/usr/src/sys/GENERIC_EPIC2
00:00:00.000093 main Host RAM: 8049MB total, 2639MB available
00:00:00.000096 main Executable: /usr/local/lib/virtualbox/vboxwebsrv
00:00:00.000096 main Process ID: 99820
00:00:00.000097 main Package type: BSD_64BITS_GENERIC (OSE)
00:00:00.003849 main Pumping COM event queue
00:00:00.003908 main Pumping COM event queue
00:00:00.003923 Watchdog Watchdog thread started
00:00:00.003929 Watchdog Watchdog: sleeping 5 seconds
00:00:00.031879 SQPmp #### SOAP FAULT: Host not found [SOAP-ENV:Server]
00:00:05.005663 Watchdog Watchdog: checking 0 sessions
00:00:05.005678 Watchdog Watchdog: sleeping 5 seconds
I've reinstall VirtualBox completely with build support. Php works as well in apache (took me a good hour to figure out why I had a blank page).
system information:
FreeBSD unix 9.1-RELEASE-p5 FreeBSD 9.1-RELEASE-p5 #1: Sun Aug 11 21:04:46 CEST 2013
apache22-2.2.25 = up-to-date with port
php5-5.4.17 = up-to-date with port
php5-json-5.4.17 = up-to-date with port
php5-mysql-5.4.17 = up-to-date with port
php5-session-5.4.17 = up-to-date with port
php5-simplexml-5.4.17 = up-to-date with port
php5-soap-5.4.17 = up-to-date with port
phpvirtualbox-4.2.5 = up-to-date with port
virtualbox-ose-4.2.16_2 = up-to-date with port
virtualbox-ose-kmod-4.2.16 = up-to-date with port
EDIT:
I have no idea why it doesn't work when it gets started via "/usr/local/etc/rc.d/vboxwebsrv start". If I start it via "vboxwebsrv -H 127.0.0.1" everything does work without errors. Very very strange.
Is there any way I can edit the rc.d script so it does start with that flag? Or is there another way to solve this so it automatically starts up the way it is supposed?
I've already tried adding the flag in the rc.d script to no avail. (link to rc.d script: http://pastebin.com/0zvs2McV)
Last edit: sukosevato 2013-09-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You may want to try localhost rather than 127.0.0.1
When we ran lsof -i we found the vboxwebsrv was listed as IPv6. In our config.php we had used the IPv4 address. Changing it to localhost resolved the issue (pun intended).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am fairly certain I am having the same problem as you had. I have installed my software at /var/www/vm/html and I noticed ownership wasn't right, so I ran the following: sudo find . -user www-data -exec chown vbmachine:vboxusers {} \;
That changed the ownership to my user (vbmachine) and group but didn't resolve the problem.
Would you have any other places I can look for permissions issues?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all!
Although I have tried every suggestion on this thread (or other threads here), I couldn't manage to pass this error:
Exception Object
( [message:protected] => Could not connect to host (http://127.0.0.1:18083/) [string:Exception:private] => [code:protected] => 64 [file:protected] => /var/www/html/phpvbox/endpoints/api.php [line:protected] => 134 [trace:Exception:private] => Array
(
)
[previous:Exception:private] =>
)
It comes after the first login attempt (admin/admin)
Any idea is appreciated.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is hard to find out a solution via alteration each reasonable line of code, but I have somehow overcomed the recent error by modifying line 16 of current config.php file as: var $location = 'http://localhost:18083/';
Replaced 127.0.0.1 with localhost
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have, as I posted earlier. Here's a follow up:
My preivous post was on such a system that the host was Ubuntu Server 16.04 with Virtualbox 5.0.20 installed from Ubuntu repository.
I have tried on a new server installation with similar hardware but with VirtualBox from Oracle's own repository. On that installation, phpVirtualBox has just worked flawlessly without needing to change the "127.0.0.1" address to "localhost". Ubuntu has something wrong on its own VirtualBox compilation and that issue is being posted relative forums.
Cheers!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello together,
I am using ubuntu 16.04 LTS and phpvirtualbox 5.0.5
After some updates I could not connect to the server by IP Adress.
I tried several things described on some articles. But without success. Do someone have any idea how to solve it. I am not the linux expert to be honest (just starting), so I need some help to get a starting point.
I have same problem login on new OS.
Virtualbox probably isnt running because your kernel module is not compiled for your kernel
In my case I needed apt -y install linux-headers-$(uname -r)
Reboot
That's all.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey,
I've been trying to install Phpvirtualbox for most of the evening now but I can't get it to work. I can access the webinterface but when I try to login with admin/admin I always get the error "Could not connect to host".
I've edited config.php in the vbox root and I've added "root" and "$password of root" in the config. I've used 127.0.0.1:18083 in the config as well as 192.168.0.140 which is the server ip address. I have installed virtualbox + phpvirtualbox (via ports in freebsd) under root because it's for an internal network and will be behind a VPN. I've also try disabling authentication but that doesn't work either.
When I run : netstat -an | grep 18083" I get no output. So it looks like vboxwebsrv just isn't working. When I run vboxwebsrv -v manually I get the following error: "#### SOAP FAULT: Host not found [SOAP-ENV:Server]". While I run it manually netstat still doesn't return anything.
I've reinstall VirtualBox completely with build support. Php works as well in apache (took me a good hour to figure out why I had a blank page).
system information:
FreeBSD unix 9.1-RELEASE-p5 FreeBSD 9.1-RELEASE-p5 #1: Sun Aug 11 21:04:46 CEST 2013
apache22-2.2.25 = up-to-date with port
php5-5.4.17 = up-to-date with port
php5-json-5.4.17 = up-to-date with port
php5-mysql-5.4.17 = up-to-date with port
php5-session-5.4.17 = up-to-date with port
php5-simplexml-5.4.17 = up-to-date with port
php5-soap-5.4.17 = up-to-date with port
phpvirtualbox-4.2.5 = up-to-date with port
virtualbox-ose-4.2.16_2 = up-to-date with port
virtualbox-ose-kmod-4.2.16 = up-to-date with port
EDIT:
I have no idea why it doesn't work when it gets started via "/usr/local/etc/rc.d/vboxwebsrv start". If I start it via "vboxwebsrv -H 127.0.0.1" everything does work without errors. Very very strange.
Is there any way I can edit the rc.d script so it does start with that flag? Or is there another way to solve this so it automatically starts up the way it is supposed?
I've already tried adding the flag in the rc.d script to no avail. (link to rc.d script: http://pastebin.com/0zvs2McV)
Last edit: sukosevato 2013-09-21
Hello,
Yes. Please see: https://sourceforge.net/p/phpvirtualbox/wiki/vboxweb-service%20Configuration%20in%20Linux/
You may want to try localhost rather than 127.0.0.1
When we ran
lsof -i
we found the vboxwebsrv was listed as IPv6. In our config.php we had used the IPv4 address. Changing it to localhost resolved the issue (pun intended).Also having this issue. In my config file is as follows:
var $location = 'http://localhost:18083/';
It's still chucking up the Unable to connect to host error. Is this where you suggest I put localhost?
I had this exact error installing after installing it about a dozen times with no issues.
I caused the issue by moving the home directory of vbox (using sudo)
The issue was in permissions, and ownership of the home directory.
I solved it once I noticed the ownership was to root for the home directory.
chown -aR vbox:vboxusers <home directory="">
May have to sudo in Ubuntu
Make sure all files in /var/www/html/phpvirtualbox all have ownership in vboxusers group as well.
Last edit: Robert O 2016-03-28
I am fairly certain I am having the same problem as you had. I have installed my software at /var/www/vm/html and I noticed ownership wasn't right, so I ran the following: sudo find . -user www-data -exec chown vbmachine:vboxusers {} \;
That changed the ownership to my user (vbmachine) and group but didn't resolve the problem.
Would you have any other places I can look for permissions issues?
Hi all!
Although I have tried every suggestion on this thread (or other threads here), I couldn't manage to pass this error:
Exception Object
(
[message:protected] => Could not connect to host (http://127.0.0.1:18083/)
[string:Exception:private] =>
[code:protected] => 64
[file:protected] => /var/www/html/phpvbox/endpoints/api.php
[line:protected] => 134
[trace:Exception:private] => Array
(
)
)
It comes after the first login attempt (admin/admin)
Any idea is appreciated.
After disabling authentication from phpvbox' config.php, error message became like this:
Exception Object
(
[message:protected] => Could not connect to host (http://127.0.0.1:18083/)
[string:Exception:private] =>
[code:protected] => 64
[file:protected] => /var/www/html/phpvbox/endpoints/lib/vboxconnector.php
[line:protected] => 220
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /var/www/html/phpvbox/endpoints/lib/vboxconnector.php
[line] => 4110
[function] => connect
[class] => vboxconnector
[type] => ->
[args] => Array
(
)
)
Location:http://127.0.0.1:18083/
It is hard to find out a solution via alteration each reasonable line of code, but I have somehow overcomed the recent error by modifying line 16 of current config.php file as:
var $location = 'http://localhost:18083/';
Replaced 127.0.0.1 with localhost
In my case it worked perfectly - changing 127.0.0.1 to localhost solved the problem and I was able to login.
This worked for me! Thanks
Have you found a working solution?
I have, as I posted earlier. Here's a follow up:
My preivous post was on such a system that the host was Ubuntu Server 16.04 with Virtualbox 5.0.20 installed from Ubuntu repository.
I have tried on a new server installation with similar hardware but with VirtualBox from Oracle's own repository. On that installation, phpVirtualBox has just worked flawlessly without needing to change the "127.0.0.1" address to "localhost". Ubuntu has something wrong on its own VirtualBox compilation and that issue is being posted relative forums.
Cheers!
Hello, I have exactly the same problem and I have not been able to solve it, I need urgent help
I've tried all the suggestions her and I keep getting the same error:
If I turn on noAuth it makes an even longer error message.
Hello together,
I am using ubuntu 16.04 LTS and phpvirtualbox 5.0.5
After some updates I could not connect to the server by IP Adress.
I tried several things described on some articles. But without success. Do someone have any idea how to solve it. I am not the linux expert to be honest (just starting), so I need some help to get a starting point.
Ran this:
$ sudo /etc/init.d/vboxweb-service start
Got this:
vboxweb-service.sh: Starting VirtualBox web service.
vboxweb-service.sh: failed: VirtualBox kernel module not loaded!.
Did this:
$ sudo /sbin/vboxconfig
Now working! Yay!
I have same problem login on new OS.
Virtualbox probably isnt running because your kernel module is not compiled for your kernel
In my case I needed apt -y install linux-headers-$(uname -r)
Reboot
That's all.