pangzhongliang / phpvirtualbox

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

vboxwebservice is blamed not to communicate, but its log is pretty clean... #697

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, 

just set up a new box, but this time, it isn't working too well...
though I set up several phpvirtual installations in the last couple of years:

Currently using 

Oracle VM VirtualBox web service Version 4.2.14
(C) 2007-2013 Oracle Corporation
All rights reserved.
VirtualBox web service 4.2.14 r86644 linux.amd64 (Jun 21 2013 14:54:36) release 
log

And the latest phpvirtual, together with Apache/2.2.22 (Debian) + 
Server built:   Mar  4 2013 22:05:16

Everytime I try to log in, after a while the following comes up...:

An error occurred communicating with your vboxwebsrv. No more requests will be 
sent by phpVirtualBox until the error is corrected and this page is refreshed. 
The details of this connection error should be displayed in a subsequent dialog 
box.

> 1) Username / password not correct in config.php
> -- Make sure they are correct.

double checked this - I even changed  the password to a simpler, all lowercase 
one ... just to make shure
no effect.

> 2) vboxwebsrv is not running as the user configured in config.php
>
> -- Run vboxwebsrv as user specified in config.php. This will generally 
involve configuring a >username in /etc/vbox/vbox.cfg. Detailed instructions 
for specifying the user can be found here:

vboxwebsrv is run as the very one user... If I kill it, log in as the user vbox 
and
run it in foreground I don't get any errors there.... thats the funny thing:

vbox@xws:~$ /usr/lib/virtualbox/vboxwebsrv -H 127.0.0.1 -p 18083 -t 0
Oracle VM VirtualBox web service Version 4.2.14
(C) 2007-2013 Oracle Corporation
All rights reserved.
VirtualBox web service 4.2.14 r86644 linux.amd64 (Jun 21 2013 14:54:36) release 
log
00:00:00.000132 main     Log opened 2013-06-26T10:36:57.233813000Z
00:00:00.000137 main     OS Product: Linux
00:00:00.000138 main     OS Release: 3.2.0-4-amd64
00:00:00.000139 main     OS Version: #1 SMP Debian 3.2.46-1
00:00:00.000160 main     DMI Product Name: GA-970A-DS3
00:00:00.000167 main     DMI Product Version:  
00:00:00.000225 main     Host RAM: 16003MB total, 15750MB available
00:00:00.000230 main     Executable: /usr/lib/virtualbox/vboxwebsrv
00:00:00.000230 main     Process ID: 3413
00:00:00.000231 main     Package type: LINUX_64BITS_DEBIAN_7_0
00:00:00.259682 SQPmp    Socket connection successful: host = 127.0.0.1, port = 
18083, master socket = 8
00:00:04.397040 SQPmp    Request 1 on socket 9 queued for processing (1 items 
on Q)
00:00:04.397130 SQW01    New SOAP thread started
00:00:04.397157 SQW01    Processing connection from IP=127.0.0.1 socket=9 (0 
out of 1 threads idle)
00:00:04.409087 SQPmp    Request 2 on socket 10 queued for processing (1 items 
on Q)
00:00:04.409125 SQW02    New SOAP thread started
00:00:04.409160 SQW02    Processing connection from IP=127.0.0.1 socket=10 (0 
out of 2 threads idle)
00:00:04.422952 SQPmp    Request 3 on socket 13 queued for processing (1 items 
on Q)
00:00:04.422974 SQW03    New SOAP thread started
00:00:04.422998 SQW03    Processing connection from IP=127.0.0.1 socket=13 (0 
out of 3 threads idle)
00:00:04.425337 SQPmp    Request 4 on socket 14 queued for processing (1 items 
on Q)
00:00:04.425363 SQW04    New SOAP thread started
00:00:04.425396 SQW04    Processing connection from IP=127.0.0.1 socket=14 (0 
out of 4 threads idle)
00:00:04.428888 SQPmp    Request 5 on socket 15 queued for processing (1 items 
on Q)
00:00:04.428901 SQW05    New SOAP thread started
00:00:04.428940 SQW05    Processing connection from IP=127.0.0.1 socket=15 (0 
out of 5 threads idle)
00:00:04.430952 SQPmp    Request 6 on socket 16 queued for processing (1 items 
on Q)
00:00:04.430963 SQW06    New SOAP thread started
00:00:04.431000 SQW06    Processing connection from IP=127.0.0.1 socket=16 (0 
out of 6 threads idle)
00:00:07.811453 SQPmp    Request 7 on socket 17 queued for processing (1 items 
on Q)
00:00:07.811519 SQW01    Processing connection from IP=127.0.0.1 socket=17 (0 
out of 6 threads idle)

- thats all after trying to access phpvirtual and the message mentioned above 
pops up.

> 3) vboxwebsrv not running
> -- Make sure it is running via 'ps aux | grep vboxweb'

It is running
/var/www# ps xaux  | grep vboxweb
vbox      3413  0.0  0.0 196240  8716 pts/1    Sl+  10:36   0:00 
/usr/lib/virtualbox/vboxwebsrv -H 127.0.0.1 -p 18083 -t 0

> 4) vboxwebsrv running on a different IP / port
> 
> -- Check via 'netstat -an | grep PORTNUMBER' where PORTNUMBER is the port you 
have configured  > vboxwebsrv to run on via /etc/vbox/vbox.cfg. If you do not 
have a port specified, the default >is 18083. You should see something listed 
for the IP / port you have configured. If you are >using non-defaults, update 
the $location setting in config.php.

It is up and running - even the host ist IPv6 too, it listens only on Ipv4's 
localhost...:

netstat -an | grep 18083
tcp        0      0 127.0.0.1:18083         0.0.0.0:*               LISTEN     

> 5) VirtualBox does not have a valid authentication library configured
> -- Run the follwing commands AS THE SAME USER THAT VBOXWEBSRV RUNS AS:

> VBoxManage setproperty websrvauthlibrary default
> VBoxManage setproperty vrdeauthlibrary default

I ran it as the vbox user - no effect... bummer

>6) VirtualBox cannot authenticate with the host system. 

> -- This is usually something in your pam configuration that is not allowing 
authentication. I > >am not a pam expert, nor am I familiar with the myriad of 
pam configurations specific to each >linux distro. In this case, the only fix I 
can suggest is to turn off vboxwebsrv authentication >by running the following 
command as the same user that runs vboxwebsrv:

>VBoxManage setproperty websrvauthlibrary null

disabled that as well, no effect, same as above...

I begin to wonder if i fergot any php-library to install, or enabling something 
in apache?

Any help?

Cheers,

Uli-G

Original issue reported on code.google.com by ulrichgi...@gmail.com on 26 Jun 2013 at 10:46

GoogleCodeExporter commented 8 years ago
BTW: This is the phpvirtual error shown when requesting details....:

Exception Object
(
    [message:protected] => Error logging in to vboxwebsrv.
    [string:Exception:private] => 
    [code:protected] => 64
    [file:protected] => /var/www/phpvirtualbox-4.2-4/lib/vboxconnector.php
    [line:protected] => 213
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/phpvirtualbox-4.2-4/lib/vboxconnector.php
                    [line] => 2916
                    [function] => connect
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [1] => Array
                (
                    [file] => /var/www/phpvirtualbox-4.2-4/lib/vboxconnector.php
                    [line] => 918
                    [function] => remote_vboxGetGuestOSTypes
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [fn] => vboxGetGuestOSTypes
                                )

                        )

                )

            [2] => Array
                (
                    [file] => /var/www/phpvirtualbox-4.2-4/lib/ajax.php
                    [line] => 306
                    [function] => __call
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                            [0] => vboxGetGuestOSTypes
                            [1] => Array
                                (
                                    [0] => Array
                                        (
                                            [fn] => vboxGetGuestOSTypes
                                        )

                                    [1] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [data] => Array
                                                        (
                                                            [responseData] => Array
                                                                (
                                                                )

                                                        )

                                                    [errors] => Array
                                                        (
                                                        )

                                                    [persist] => Array
                                                        (
                                                        )

                                                    [messages] => Array
                                                        (
                                                        )

                                                )

                                        )

                                )

                        )

                )

            [3] => Array
                (
                    [file] => /var/www/phpvirtualbox-4.2-4/lib/ajax.php
                    [line] => 306
                    [function] => vboxGetGuestOSTypes
                    [class] => vboxconnector
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [fn] => vboxGetGuestOSTypes
                                )

                            [1] => Array
                                (
                                    [0] => Array
                                        (
                                            [data] => Array
                                                (
                                                    [responseData] => Array
                                                        (
                                                        )

                                                )

                                            [errors] => Array
                                                (
                                                )

                                            [persist] => Array
                                                (
                                                )

                                            [messages] => Array
                                                (
                                                )

                                        )

                                )

                        )

                )

        )

    [previous:Exception:private] => 
)

Location:http://127.0.0.1:18083/

Original comment by ulrichgi...@gmail.com on 26 Jun 2013 at 11:18

GoogleCodeExporter commented 8 years ago
...so, I got it working - somehow...

I added a new user - named "vboxadmin" added him to vboxgroup - let him start 
vboxwebservice, changed the appropriate settings in config.php *AND* had to 
disable the webservice authentification (which I already tried to as the 
"vbox"-user, but didn't work) by

VBoxManage setproperty websrvauthlibrary null

Hope that doesn't hurt too much, since it listens only on localhost, anyway.

The Funny thing is, if I "ps aux | grep vbox" I don't get the username 
"vboxadmin" as owner, I get die UID as owner.... strange, but... who cares?

Cheers,

UG

Original comment by ulrichgi...@gmail.com on 26 Jun 2013 at 12:25

GoogleCodeExporter commented 8 years ago

Original comment by imooreya...@gmail.com on 11 Jul 2013 at 4:43