dgzyk / phpvirtualbox

Automatically exported from code.google.com/p/phpvirtualbox
Other
0 stars 0 forks source link

vboxwebservice does not connect to phpvirtualbox #569

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I installed phpvirtualbox 4.1 and Virtualbox 4.1 from virtualbox.org in a Linux 
Debian Squeeze machine with php 5.3. I can run the virtual machines from 
console using VBoxHeadless but I can't connect with phpvirtualbox or 
vboxwebservice.

I configured the file /etc/default/virtualbox with:

VBOXWEB_USER='myuser'
VBOXWEB_HOST=127.0.0.1
VBOXWEB_PORT=18083
VBOXWEB_LOGFILE=/home/gunhost/vboxweb.log

Then I restarted vboxwebservice with:

/etc/init.d/vboxweb-service stop
/etc/init.d/vboxweb-service start

But the process is shown by ps but it is not shown by netstat -pan and I can't 
connect to the port using a web browser (lynx).

Te log reports:

myuser@myhost:~$ cat vboxweb.log
VirtualBox web service 4.1.18 r78361 linux.amd64 (Jun 20 2012 10:09:49) release 
log
00:00:00.000 main     Log opened 2012-08-08T15:08:46.233240000Z
00:00:00.000 main     OS Product: Linux
00:00:00.000 main     OS Release: 2.6.32-5-amd64
00:00:00.000 main     OS Version: #1 SMP Sun May 6 04:00:17 UTC 2012
00:00:00.000 main     OS Service Pack: #1 SMP Sun May 6 04:00:17 UTC 2012
00:00:00.000 main     Executable: /usr/lib/virtualbox/vboxwebsrv
00:00:00.000 main     Process ID: 2719
00:00:00.000 main     Package type: LINUX_64BITS_DEBIAN_6_0
myuser@myhost:~$

How can I debug it more to try to find the problem?

Thanks.

Original issue reported on code.google.com by javierma...@gmail.com on 8 Aug 2012 at 3:33

GoogleCodeExporter commented 8 years ago
Hello,

Do you see the anything when run:

netstat -an | grep 18083

?

Original comment by imooreya...@gmail.com on 13 Aug 2012 at 3:53

GoogleCodeExporter commented 8 years ago
No, netstat -an does not show anything for port 18083. The weird thing
is that is listed in ps -ax but doesn't appear in netstat.

Thanks.

Original comment by javierma...@gmail.com on 13 Aug 2012 at 4:19

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Stop the service by running:

/etc/init.d/vboxweb-service stop

as root. Then:

su - myuser 

.. whatever the user configured in /etc/default/virtualbox is..

Then as that user, run:

/usr/lib/virtualbox/vboxwebsrv

.. do you see any errors printed?

Original comment by imooreya...@gmail.com on 13 Aug 2012 at 4:21

GoogleCodeExporter commented 8 years ago
Thanks, I did it and I got this result:

gunhost:/home/gunhost# /etc/init.d/vboxweb-service stop
gunhost:/home/gunhost# /etc/init.d/vboxweb-service start
Starting VirtualBox web service:done..
gunhost:/home/gunhost# netstat -an | grep 18083
gunhost:/home/gunhost# /etc/init.d/vboxweb-service stop
Stopping VirtualBox web service:
 failed!
gunhost:/home/gunhost# /etc/init.d/vboxweb-service stop
Stopping VirtualBox web service:No /usr/lib/virtualbox/vboxwebsrv found
running; none killed.
done..
gunhost:/home/gunhost# su - gunhost
gunhost@gunhost:~$ /usr/lib/virtualbox/vboxwebsrv
Oracle VM VirtualBox web service version 4.1.18
(C) 2005-2012 Oracle Corporation
All rights reserved.
VirtualBox web service 4.1.18 r78361 linux.amd64 (Jun 20 2012 10:09:49)
release log
00:00:00.001 main     Log opened 2012-08-14T00:20:26.013383000Z
00:00:00.001 main     OS Product: Linux
00:00:00.001 main     OS Release: 2.6.32-5-amd64
00:00:00.001 main     OS Version: #1 SMP Sun May 6 04:00:17 UTC 2012
00:00:00.001 main     OS Service Pack: #1 SMP Sun May 6 04:00:17 UTC 2012
00:00:00.001 main     Executable: /usr/lib/virtualbox/vboxwebsrv
00:00:00.001 main     Process ID: 17086
00:00:00.001 main     Package type: LINUX_64BITS_DEBIAN_6_0
00:00:01.404 SQPmp    #### SOAP FAULT: Cannot assign requested address
[SOAP-ENV:Server]
^C
gunhost@gunhost:~$ cat /etc/default/virtualbox
VBOXWEB_USER='gunhost'
VBOXWEB_HOST=127.0.0.1
VBOXWEB_PORT=18083
VBOXWEB_LOGFILE=/home/gunhost/vboxweb.log
gunhost@gunhost:~$

Original comment by javierma...@gmail.com on 14 Aug 2012 at 12:24

GoogleCodeExporter commented 8 years ago
Hello,

It looks like vboxwebsrv can't bind to the port. Are you using selinux?

Original comment by imooreya...@gmail.com on 15 Aug 2012 at 1:14

GoogleCodeExporter commented 8 years ago
No, selinux is supposed to be disabled in the kernel (according to what it says 
in http://wiki.debian.org/SELinux/). When I installed the server, it was no 
selinux installation (and no iptables rules) and VBoxWebServ was working fine. 
After some upgrades (apt-get install dist-upgrade) vbox web server stopped 
working.

The only selinux pakage that i have installed is:

ii  libselinux1    2.0.96-1       SELinux runtime shared libraries

Thanks.

Original comment by javierma...@gmail.com on 15 Aug 2012 at 2:05

GoogleCodeExporter commented 8 years ago
I'm sorry, but I really have no idea. *Something* on your system is stopping 
vboxwebsrv from listening on 127.0.0.1 port 18083. I believe this because it is 
not showing up in netstat and you see the error message "SOAP FAULT: Cannot 
assign requested address." You can try working it out on either the 
virtualbox.org forums or a debian forum.

Original comment by imooreya...@gmail.com on 21 Aug 2012 at 12:36