Koozali.org: home of the SME Server
Contribs.org Forums => Development => Topic started by: stephdl on August 08, 2015, 02:40:49 PM
-
new update of my contrib smeserver-phpvirtualbox, due to the politic of oracle, VirtualBox-5.0 doesn't obsolete Virtualbox-4.3, therefore you have to remove first the old rpm (think to pause your VM )
http://wiki.contribs.org/Phpvirtualbox#Installation_phpvirtualbox-5.0_For_SME8_and_SME9
as a side note, it is a huge work that ian moore has done for this update, I think that the development has started again :)
-
Following the instructions in the Wiki, the install went smoothly. However, after a reboot, I'm having trouble accessing the phpvb web GUI. When I browse to that page, I get the following error in a dialog box:
"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."
When I click the OK button on that dialog, I get another saying, "Could not connect to host (http://127.0.0.1:18083/", with a link for Details. When I click that link, I get the following:
Exception Object
(
[message:protected] => Could not connect to host (http://127.0.0.1:18083/)
[string:Exception:private] =>
[code:protected] => 64
[file:protected] => /opt/phpvirtualbox/endpoints/lib/vboxconnector.php
[line:protected] => 220
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /opt/phpvirtualbox/endpoints/lib/vboxconnector.php
[line] => 5266
[function] => connect
[class] => vboxconnector
[type] => ->
[args] => Array
(
)
)
[1] => Array
(
[file] => /opt/phpvirtualbox/endpoints/lib/vboxconnector.php
[line] => 951
[function] => remote_vboxRecentMediaGet
[class] => vboxconnector
[type] => ->
[args] => Array
(
[0] =>
)
)
[2] => Array
(
[file] => /opt/phpvirtualbox/endpoints/api.php
[line] => 316
[function] => __call
[class] => vboxconnector
[type] => ->
[args] => Array
(
[0] => vboxRecentMediaGet
[1] => Array
(
[0] =>
[1] => Array
(
[0] => Array
(
[data] => Array
(
[responseData] => Array
(
)
)
[errors] => Array
(
)
[persist] => Array
(
)
[messages] => Array
(
)
)
)
)
)
)
[3] => Array
(
[file] => /opt/phpvirtualbox/endpoints/api.php
[line] => 316
[function] => vboxRecentMediaGet
[class] => vboxconnector
[type] => ->
[args] => Array
(
[0] =>
[1] => Array
(
[0] => Array
(
[data] => Array
(
[responseData] => Array
(
)
)
[errors] => Array
(
)
[persist] => Array
(
)
[messages] => Array
(
)
)
)
)
)
)
[previous:Exception:private] =>
)
Location:http://127.0.0.1:18083/
/var/log/messages contains the following warning, which may or may not be relevant:
"Aug 17 11:27:55 e-smith httpd: PHP Warning: file_get_contents(/opt/phpvirtualbox/languages/en.xml) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in /opt/phpvirtualbox/endpoints/lib/language.php on line 73"
There is no en.xml file in /opt/phpvirtualbox/languages:
[root@e-smith ~]# ll /opt/phpvirtualbox/languages/
total 144
-rw-r--r-- 1 root root 8908 Aug 8 08:27 de.xml
-rw-r--r-- 1 root root 8804 Aug 8 08:27 es.xml
-rw-r--r-- 1 root root 9059 Aug 8 08:27 fr.xml
-rw-r--r-- 1 root root 8819 Aug 8 08:27 it.xml
-rw-r--r-- 1 root root 8989 Aug 8 08:27 ja.xml
-rw-r--r-- 1 root root 8365 Aug 8 08:27 languages.txt
-rw-r--r-- 1 root root 8801 Aug 8 08:27 pl.xml
-rw-r--r-- 1 root root 8761 Aug 8 08:27 pt_br.xml
-rw-r--r-- 1 root root 8739 Aug 8 08:27 ro.xml
-rw-r--r-- 1 root root 9832 Aug 8 08:27 ru.xml
drwxr-xr-x 2 root root 4096 Aug 14 09:07 source
-rw-r--r-- 1 root root 8198 Aug 8 08:27 zh_cn.xml
-rw-r--r-- 1 root root 8145 Aug 8 08:27 zh_tw.xml
-
Which version of phpvirtualbox, virtualbox, smeserver-virtualbox and smeserver-phpvirtualbox, do you have installed ?
rpm -qa |grep -i virtualbox
-
[dan@e-smith phpvirtualbox]$ rpm -qa | grep virtualbox
smeserver-phpvirtualbox-5.0-5.0.0-1.el6.sme.noarch
smeserver-virtualbox-5.0-5.0.0-2.el6.sme.noarch
phpvirtualbox-5.0-5.0.1-1.el6.sme.noarch
[dan@e-smith phpvirtualbox]$ rpm -qa | grep VirtualBox
VirtualBox-5.0-5.0.2_102096_el6-1.x86_64
-
Upgrade phpvirtualbox please
-
[root@e-smith ~]# yum --enablerepo=stephdl update phpvirtualbox
Loaded plugins: changelog, fastestmirror, smeserver
Setting up Update Process
Loading mirror speeds from cached hostfile
* base: distro.ibiblio.org
* smeaddons: mirror.canada.pialasse.com
* smeextras: mirror.canada.pialasse.com
* smeos: mirror.canada.pialasse.com
* smeupdates: mirror.canada.pialasse.com
* updates: mirror.oss.ou.edu
Package(s) phpvirtualbox available, but not installed.
No Packages marked for Update
[root@e-smith ~]#
-
yes there is http://mirror.de-labrusse.fr/smeserver/6/noarch/phpvirtualbox-5.0-5.0.2-1.el6.sme.noarch.rpm
please
yum clean all --enablerepo=*
-
That seems to have solved it, thanks!
-
You are welcome
-
needed to add the -5.0 to the end of the command to get it to work.
yum --enablerepo=stephdl update phpvirtualbox-5.0
-
Yes....the fault goes to virtualbox team. Each major version of virtualbox gets its own branch.....and you must manually remove the old branch.
It is a pain ;)
One day i will use proxmox....or directly quemu/kvm....
-
One day i will use proxmox....or directly quemu/kvm....
maybe a good idea :lol:
-
Yes....the fault goes to virtualbox team. Each major version of virtualbox gets its own branch.....and you must manually remove the old branch.
it's not a "fault" but (IMVHO) a good decision..
the same made by RH to not change to/upgrade to major version of main daemons/programs during a OS release lifetime.. as you know, during al the support life of, let's say, Centos5, apache, mysql and so on will never be upgraded to a newer major release.. and this is done for stability and reliability reasons.
VB's guys made the same decision.. you can't upgrade/overwrite a old version to/with the newer one accidentally (via a yum update, for example), breaking your server.. if you really want to upgrade, you have to do it consciously.. :)
BTW, VB behaves in the same way in windows too.. IMVHO, Redmond's guys should learn something..
-
Well, I thought it was fixed, but after some other system updates were installed, had to do a post-upgrade;reboot. On reboot, I'm back where I was.
When I go to the phpvb page on my server, I get the same warning dialog I had before. When I click OK, I get the same "could not connect to host" dialog as before. When I click the Details link, I get this:
Exception Object
(
[message:protected] => Could not connect to host (http://127.0.0.1:18083/)
[string:Exception:private] =>
[code:protected] => 64
[file:protected] => /opt/phpvirtualbox/endpoints/lib/vboxconnector.php
[line:protected] => 220
[trace:Exception:private] => Array
(
[0] => Array
(
[file] => /opt/phpvirtualbox/endpoints/lib/vboxconnector.php
[line] => 3147
[function] => connect
[class] => vboxconnector
[type] => ->
[args] => Array
(
)
)
[1] => Array
(
[file] => /opt/phpvirtualbox/endpoints/lib/vboxconnector.php
[line] => 951
[function] => remote_vboxGetGuestOSTypes
[class] => vboxconnector
[type] => ->
[args] => Array
(
[0] =>
)
)
[2] => Array
(
[file] => /opt/phpvirtualbox/endpoints/api.php
[line] => 316
[function] => __call
[class] => vboxconnector
[type] => ->
[args] => Array
(
[0] => vboxGetGuestOSTypes
[1] => Array
(
[0] =>
[1] => Array
(
[0] => Array
(
[data] => Array
(
[responseData] => Array
(
)
)
[errors] => Array
(
)
[persist] => Array
(
)
[messages] => Array
(
)
)
)
)
)
)
[3] => Array
(
[file] => /opt/phpvirtualbox/endpoints/api.php
[line] => 316
[function] => vboxGetGuestOSTypes
[class] => vboxconnector
[type] => ->
[args] => Array
(
[0] =>
[1] => Array
(
[0] => Array
(
[data] => Array
(
[responseData] => Array
(
)
)
[errors] => Array
(
)
[persist] => Array
(
)
[messages] => Array
(
)
)
)
)
)
)
[previous:Exception:private] =>
)
Location:http://127.0.0.1:18083/
[dan@e-smith ~]$ rpm -qa | grep -i virtualbox
VirtualBox-5.0-5.0.2_102096_el6-1.x86_64
smeserver-phpvirtualbox-5.0-5.0.0-1.el6.sme.noarch
smeserver-virtualbox-5.0-5.0.0-2.el6.sme.noarch
phpvirtualbox-5.0-5.0.2-1.el6.sme.noarch
-
what is the output of
/etc/init.d/vboxdrv setup; /etc/init.d/vboxweb-service start
-
[root@e-smith ~]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules [ OK ]
Uninstalling old VirtualBox DKMS kernel modules [ OK ]
Trying to register the VirtualBox kernel modules using DKMS[ OK ]
Starting VirtualBox kernel modules [ OK ]
[root@e-smith ~]# /etc/init.d/vboxweb-service start
[root@e-smith ~]# /etc/init.d/vboxweb-service status
Checking for VBox Web Service ...running
[root@e-smith ~]# netstat -a | grep 18083
[root@e-smith ~]#
There was a significant delay before "OK" on the Uninstalling... and the Trying to register... steps. The web interface is still responding as before. /var/log/messages shows:
Aug 26 12:26:59 e-smith kernel: VBoxPciLinuxLinuxUnload
Aug 26 12:30:01 e-smith php: PHP Warning: require_once(/usr/share/pear/www/horde/lib/Application.php): failed to open stream: No such file or directory in /usr/bin/horde-alarms on line 21
Aug 26 12:30:01 e-smith php: PHP Fatal error: require_once(): Failed opening required '/usr/share/pear/www/horde/lib/Application.php' (include_path='.:/usr/share/pear-addons:/usr/share/pear') in /usr/bin/horde-alarms on line 21
Aug 26 12:30:40 e-smith kernel: vboxdrv: TSC mode is Invariant, tentative frequency 3399974920 Hz
Aug 26 12:30:40 e-smith kernel: VBoxNetFlt: Successfully started.
Aug 26 12:30:40 e-smith kernel: VBoxNetAdp: Successfully started.
Aug 26 12:30:40 e-smith kernel: VBoxPciLinuxInit
Aug 26 12:30:40 e-smith kernel: vboxpci: IOMMU not found (not compiled)
-
do you have installed dkms as per the howto recommends ?
It seems that you have not recompiled virtualbox after the kernel upgrade
i'm attempting to reproduce the issue on another vm not upgraded to centos6.7
-
Yes, I've installed dkms:
[root@e-smith ~]# rpm -qa | grep -i dkms
dkms-2.2.0.3-28.git.7c3e7c5.el6.noarch
I haven't upgraded it since I initially installed virtualbox, if that matters. I haven't manually recompiled anything, but it's my understanding that this should not be necessary.
-
what is the output of
nmap localhost -p 18083
here I have
[root@sme9dev4 ~]# nmap localhost -p 18083
Starting Nmap 6.25 ( http://nmap.org ) at 2015-08-26 22:05 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00015s latency).
PORT STATE SERVICE
18083/tcp closed unknown
this is not good of course :p
-
[root@e-smith ~]# nmap localhost -p 18083
Starting Nmap 6.25 ( http://nmap.org ) at 2015-08-26 16:29 EDT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000035s latency).
PORT STATE SERVICE
18083/tcp closed unknown
Nmap done: 1 IP address (1 host up) scanned in 0.09 seconds
[root@e-smith ~]#
-
I have a workaround
/etc/init.d/vboxweb-service restart
then verify
[root@sme9dev4 ~]# nmap localhost -p 18083
Starting Nmap 6.25 ( http://nmap.org ) at 2015-08-26 22:28 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00012s latency).
PORT STATE SERVICE
18083/tcp open unknown
you should be able to use phpvirtualbox, refresh the page if needed (ctrl+F5)
-
Confirmed.
[root@e-smith ~]# /etc/init.d/vboxweb-service restart
Stopping VirtualBox web service [ OK ]
Starting VirtualBox web service [ OK ]
[root@e-smith ~]# nmap localhost -p 18083
Starting Nmap 6.25 ( http://nmap.org ) at 2015-08-26 16:33 EDT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000042s latency).
PORT STATE SERVICE
18083/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds
[root@e-smith ~]#
The phpvirtualbox page now loads without error.
-
I need to move the vboxweb-service to S99vboxweb-service
mv /etc/rc.d/rc7.d/S86vboxweb-service /etc/rc.d/rc7.d/S99vboxweb-service
please don't do that and wait the next smeserver-phpvirtualbox
-
/home/build/exchange/smeserver-virtualbox-5.0-5.0.0/smeserver-virtualbox-5.0-5.0.0-3.el5.sme.noarch.rpm
/home/build/exchange/smeserver-virtualbox-5.0-5.0.0/smeserver-virtualbox-5.0-5.0.0-3.el5.sme.src.rpm
/home/build/exchange/smeserver-virtualbox-5.0-5.0.0/smeserver-virtualbox-5.0-5.0.0-3.el6.sme.noarch.rpm
/home/build/exchange/smeserver-virtualbox-5.0-5.0.0/smeserver-virtualbox-5.0-5.0.0-3.el6.sme.src.rpm
released
-
That doesn't seem to have resolved it.
[root@e-smith ~]# rpm -qa | grep -i virtualbox
VirtualBox-5.0-5.0.2_102096_el6-1.x86_64
smeserver-phpvirtualbox-5.0-5.0.0-1.el6.sme.noarch
phpvirtualbox-5.0-5.0.2-1.el6.sme.noarch
smeserver-virtualbox-5.0-5.0.0-3.el6.sme.noarch
[root@e-smith ~]# nmap localhost -p 18083
Starting Nmap 6.25 ( http://nmap.org ) at 2015-08-27 08:42 EDT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000035s latency).
PORT STATE SERVICE
18083/tcp closed unknown
Nmap done: 1 IP address (1 host up) scanned in 0.09 seconds
[root@e-smith ~]# /etc/init.d/vboxweb-service restart
Stopping VirtualBox web service [ OK ]
Starting VirtualBox web service [ OK ]
[root@e-smith ~]# nmap localhost -p 18083
Starting Nmap 6.25 ( http://nmap.org ) at 2015-08-27 08:42 EDT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000039s latency).
PORT STATE SERVICE
18083/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds
[root@e-smith ~]#
Installed the update, did post-upgrade and reboot, and was still unable to get to the phpvirtualbox page. After restarting the vboxweb service, it's up again.
-
please what is the output of ll /etc/rc.d/rc7.d/S99*
-
[root@e-smith ~]# ll /etc/rc.d/rc7.d/S99*
lrwxrwxrwx 1 root root 32 Apr 16 06:40 /etc/rc.d/rc7.d/S99fail2ban -> /etc/rc.d/init.d/e-smith-service
lrwxrwxrwx 1 root root 32 Aug 23 07:08 /etc/rc.d/rc7.d/S99lm_sensors -> /etc/rc.d/init.d/e-smith-service
lrwxrwxrwx 1 root root 32 Feb 10 2015 /etc/rc.d/rc7.d/S99local -> /etc/rc.d/init.d/e-smith-service
lrwxrwxrwx 1 root root 32 Jul 29 2014 /etc/rc.d/rc7.d/S99mysql.init -> /etc/rc.d/init.d/e-smith-service
lrwxrwxrwx 1 root root 32 Aug 23 07:08 /etc/rc.d/rc7.d/S99sme9admind -> /etc/rc.d/init.d/e-smith-service
lrwxrwxrwx 1 root root 32 Aug 27 08:24 /etc/rc.d/rc7.d/S99vboxweb-service -> /etc/rc.d/init.d/vboxweb-service
[root@e-smith ~]#
-
I have just tested here on a fresh install of sme9-x64 and it works as expected, but since the service is the last to start, the opened port can be delayed a bit (at least 30 seconds after a ssh connexion)
I use : watch 'nmap localhost -p 18083' to see when the port is opened. It seems that after a reconfiguration it is a bit more longer than a simple reboot.
after that can you show us
[root@sme9dev64-4 ~]# config show vboxweb-service
vboxweb-service=service
TCPPort=18083
access=localhost
status=enabled
[root@sme9dev64-4 ~]# config show phpvirtualbox
phpvirtualbox=service
Group=
Name=phpvirtualbox
User=
status=enabled
webauth=enabled
-
So, just to make sure I'm understanding you correctly, you'd like me to do signal-event post-upgrade; signal-event reboot, and after the reboot finishes, watch 'nmap...'? And after that comes up open, the two config show commands you give?
-
the command watch is just here to look in direct the port with nmap, normally after a reboot or a reconfigure the port will need a bit of time to rise up....if after one minute the port is not opened, it is not normal.
concerning the config command it is just to see if you have not tricked something
-
Here's the config information:
[root@e-smith ~]# config show vboxweb-service
vboxweb-service=service
TCPPort=18083
access=localhost
status=enabled
[root@e-smith ~]# config show phpvirtualbox
phpvirtualbox=service
Group=
Name=phpvirtualbox
URL=VB
User=
status=enabled
webauth=enabled
-
Here's the config information:
[root@e-smith ~]# config show vboxweb-service
vboxweb-service=service
TCPPort=18083
access=localhost
status=enabled
[root@e-smith ~]# config show phpvirtualbox
phpvirtualbox=service
Group=
Name=phpvirtualbox
URL=VB
User=
status=enabled
webauth=enabled
sorry for the delay of my answer, all above looks fine.
I don't know/understand what is occuring, I suppose that your problem is not fixed and after a reboot or a reconfiguration the vboxweb-service must be restarted. Right ?
In fact that service is not a part of phpvirtualbox, but from virtualbox, omething has changed between the version 4.3 to 5. Before the service was launched at S35 without problem.
maybe a (bad) trick could be done in that case of non opened port, put in /etc/rc.d/rc.local : /etc/init.d/vboxweb-service restart
keep me in touch
-
I didn't get a chance to reboot until just a few minutes ago. It's now been two+ minutes since I logged in via ssh, and the watch nmap is still showing port 18083 as closed. After manually restarting the vboxweb-service, the port is open immediately.
-
I didn't get a chance to reboot until just a few minutes ago. It's now been two+ minutes since I logged in via ssh, and the watch nmap is still showing port 18083 as closed. After manually restarting the vboxweb-service, the port is open immediately.
that suggests me that something is failing during the execution of the startup script.. env variable? is there anything relevant in the logs?
what about dmesg?
-
I would be interested by
/etc/init.d/vboxweb-service status
just after the reboot
Hard to debug something not reproducible here, what is the history of your server ?