I have BareOS installed and it has been working perfectly until
this morning when I encountered the following bug in the WebUI.
Summary:
After logging into the WebUI, a blank page loads. Reloading the page results in the following error message:
Access
denied
Permission to execute the following
commands is required:
list,llist,use,version,.api,.clients,.help
Read the Bareos documentation on how to configure ACL
settings in your Console/Profile resources.
BareOS Version: 19.2.6 (11 February 2020) Linux-3.10.0-1062.9.1.el7.x86_64 ubuntu Ubuntu 18.04 LTS
OS Version: Ubuntu 18.04.4 LTS
What I Have Checked:
[Wed Feb 12 08:42:45.725166 2020] [php7:error] [pid 24275]
[client xx.xx.xx.xx:38130]
PHP Fatal error: Uncaught Error: Call to a member
function prepare() on null in
/usr/share/bareos-webui/module/Auth/view/auth/auth/login.phtml:45
Stack trace:
#0
/usr/share/bareos-webui/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(501):
include()
#1
/usr/share/bareos-webui/vendor/zendframework/zend-view/src/View.php(205):
Zend\\View\\Renderer\\PhpRenderer->render(NULL)
#2
/usr/share/bareos-webui/vendor/zendframework/zend-view/src/View.php(233):
Zend\\View\\View->render(Object(Zend\\View\\Model\\ViewModel))
#3
/usr/share/bareos-webui/vendor/zendframework/zend-view/src/View.php(198):
Zend\\View\\View->renderChildren(Object(Zend\\View\\Model\\ViewModel))
#4
/usr/share/bareos-webui/vendor/zendframework/zend-mvc/src/View/Http/DefaultRenderingStrategy.php(103):
Zend\\View\\View->render(Object(Zend\\View\\Model\\ViewModel))
#5 [internal function]:
Zend\\Mvc\\View\\Http\\DefaultRenderingStrategy->render(Object(Zend\\Mvc\\MvcEvent))
#6
/usr/share/bareos-webui/vendor/zendframework/zend-eventmanager/src/EventManager.php(444):
call_user_func(Arra in
/usr/share/bareos-webui/module/Auth/view/auth/auth/login.phtml
on line 45, referer:
http://bareos.tlh.delta-tech.com/bareos-webui/
What Has Been Changed:
The only change to the system is that libxml was upgraded:
Upgraded:
libxml2:amd64 2.9.4+dfsg1-6.1ubuntu1.2 => 2.9.4+dfsg1-6.1ubuntu1.3
What I have Tried:
Any advice on how I might fix this problem would be greatly
appreciated.
Rick Sutphin
Project Manager
Delta Technologies, Inc.
P.O. Box 2301
Tallahassee, FL 32316-2301
Ofc: 850.575.3977
Fax: 850.575.3908
Cell: 850.251.2345
https://delta-tech.com
Licenses: EF-20000414, ES-0000212 (FL) & LVU-40502 (GA)
Andreas,
Thanks for the response. I did a clean install of BareOS 19.2 on
a fresh server and I have not made any config changes since it was
initially setup and tested - so neither of those things could have
caused the problem. What is strange, is today I am able to log
into the WebUI and I have not made any changes.
In case it is of any help, I am posting the messages from
/var/log/apache2/error.log
/==================== Original Error Message
====================/
[Wed Feb 12 09:20:06.515039 2020] [php7:error] [pid
2177] [client xx.xx.xx.xx:38484]
PHP Fatal error: Uncaught Error: Call to a member
function prepare() on
null in
/usr/share/bareos-webui/module/Auth/view/auth/auth/login.phtml:45
Stack
trace:
#0
/usr/share/bareos-webui/vendor/zendframework/zend-view/src/Renderer/
PhpRenderer.php(501): include()
#1
/usr/share/bareos-webui/vendor/zendframework/zend-view/src/View.php(205):
Zend\\View\\Renderer\\PhpRenderer->render(NULL)
#2
/usr/share/bareos-webui/vendor/zendframework/zend-view/src/View.php(233):
Zend
\\View\\View->render(Object(Zend\\View\\Model\\ViewModel))
#3
/usr/share/bareos-webui/vendor/zendframework/zend-view/src/View.php(198):
Zend\\View\\View->rende
rChildren(Object(Zend\\View\\Model\\ViewModel))
#4
/usr/share/bareos-webui/vendor/zendframework/zend-mvc/src/View/Http/DefaultRenderingStrategy.php(103):
Zend\
\View\\View->render(Object(Zend\\View\\Model\\ViewModel))\n#5
[internal function
]:
Zend\\Mvc\\View\\Http\\DefaultRenderingStrategy->render(Object(Zend\\Mvc\\Mvc
Event))
#6
/usr/share/bareos-webui/vendor/zendframework/zend-eventmanager/src/EventManager.php(444):
call_user_func(Arra in
/usr/share/bareos-webui/module/Auth/view/auth/auth/login.phtml
on line 45, referer: http://bareos.example.com/bareos-webui/
/================= End of Original Error Message
=================/
/=========== Error Messages After WebUI Started
Working =============/
[Wed Feb 12 09:20:09.400345 2020] [php7:warn] [pid
2814] [client xx.xx.xx.xx:38486] PHP
Warning: array_key_exists() expects parameter 2 to be array,
null given in
/usr/share/bareos-webui/module/Application/src/Application/Controller/Plugin/CommandACLPlugin.php
on line 53
[Wed Feb 12 09:20:09.400379 2020] [php7:warn] [pid
2814] [client xx.xx.xx.xx:38486] PHP Warning:
array_key_exists() expects parameter 2 to be array, null given
in
/usr/share/bareos-webui/module/Application/src/Application/Controller/Plugin/CommandACLPlugin.php
on line 53
[Wed Feb 12 09:20:09.400394 2020] [php7:warn] [pid
2814] [client xx.xx.xx.xx:38486] PHP Warning:
array_key_exists() expects parameter 2 to be array, null given
in
/usr/share/bareos-webui/module/Application/src/Application/Controller/Plugin/CommandACLPlugin.php
on line 53
[Wed Feb 12 09:20:09.400407 2020] [php7:warn] [pid
2814] [client xx.xx.xx.xx:38486] PHP Warning:
array_key_exists() expects parameter 2 to be array, null given
in
/usr/share/bareos-webui/module/Application/src/Application/Controller/Plugin/CommandACLPlugin.php
on line 53
[Wed Feb 12 09:20:09.400435 2020] [php7:warn] [pid
2814] [client xx.xx.xx.xx:38486] PHP Warning:
array_key_exists() expects parameter 2 to be array, null given
in
/usr/share/bareos-webui/module/Application/src/Application/Controller/Plugin/CommandACLPlugin.php
on line 53
[Wed Feb 12 09:20:09.400435 2020] [php7:warn] [pid
2814] [client xx.xx.xx.xx:38486] PHP Warning:
array_key_exists() expects parameter 2 to be array, null given
in
/usr/share/bareos-webui/module/Application/src/Application/Controller/Plugin/CommandACLPlugin.php
on line 53
[Wed Feb 12 09:20:09.400447 2020] [php7:warn] [pid
2814] [client xx.xx.xx.xx:38486] PHP Warning:
array_key_exists() expects parameter 2 to be array, null given
in
/usr/share/bareos-webui/module/Application/src/Application/Controller/Plugin/CommandACLPlugin.php
on line 53
[Wed Feb 12 09:20:09.400459 2020] [php7:warn] [pid
2814] [client xx.xx.xx.xx:38486] PHP Warning:
array_key_exists() expects parameter 2 to be array, null given
in
/usr/share/bareos-webui/module/Application/src/Application/Controller/Plugin/CommandACLPlugin.php
on line 53
[Thu Feb 13 06:25:15.841061 2020]
[mpm_prefork:notice] [pid 2133] AH00171: Graceful restart
requested, doing restart
AH00558: apache2: Could not reliably
determine the server's fully qualified domain name, using
127.0.0.1. Set the 'ServerName' directive globally to suppress
this message
[Thu Feb 13 06:25:15.901053 2020]
[mpm_prefork:notice] [pid 2133] AH00163: Apach
e/2.4.29 (Ubuntu) configured -- resuming normal operations
[Thu Feb 13 06:25:15.901109 2020] [core:notice] [pid
2133] AH00094: Command line
: '/usr/sbin/apache2'
[Thu Feb 13 08:56:52.091248 2020] [php7:warn] [pid
28217] [client xx.xx.xx.xx:
45424] PHP Warning: unpack(): Type N: not enough input, need
4, have 0 in /usr/
share/bareos-webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php on
line 172, referer:
http://bareos.example.com/bareos-webui/restore/
[Thu Feb 13 08:57:51.202201 2020] [php7:notice] [pid
28217] [client xx.xx.xx.xx:45424] PHP Notice: Undefined
index: directories in
/usr/share/bareos-webui/module/Restore/src/Restore/Model/RestoreModel.php
on line 76, referer:
http://bareos.example.com/bareos-webui/restore/
[Thu Feb 13 08:57:51.202267 2020] [php7:warn] [pid
28217] [client xx.xx.xx.xx:45424] PHP Warning: count():
Parameter must be an array or an object that implements
Countable in
/usr/share/bareos-webui/module/Restore/src/Restore/Model/RestoreModel.php
on line 76, referer:
http://bareos.example.com/bareos-webui/restore/
[Thu Feb 13 08:57:51.202284 2020] [php7:notice] [pid
28217] [client xx.xx.xx.xx:45424] PHP Notice: Undefined
index: directories in
/usr/share/bareos-webui/module/Restore/src/Restore/Model/RestoreModel.php
on line 77, referer:
http://bareos.example.com/bareos-webui/restore/
[Thu Feb 13 08:57:51.202297 2020] [php7:warn] [pid
28217] [client xx.xx.xx.xx:45424] PHP Warning: array_merge():
Argument #2 is not an array in /usr/share/bareos.example.com/bareos-webui/restore/
[Thu Feb 13 08:57:51.202297 2020] [php7:warn] [pid 28217]
[client xx.xx.xx.xx:45424] PHP Warning: array_merge(): Argument
#2 is not an array in
/usr/share/bareos-webui/module/Restore/src/Restore/Model/RestoreModel.php
on line 77, referer:
http://bareos.example.com/bareos-webui/restore/
[Thu Feb 13 08:57:51.202308 2020] [php7:warn] [pid 28217]
[client xx.xx.xx.xx:45424] PHP Warning: Invalid argument
supplied for foreach() in
/usr/share/bareos-webui/module/Restore/src/Restore/Model/RestoreModel.php
on line 79, referer:
http://bareos.example.com/bareos-webui/restore/
/=========== End of Error Messages After WebUI
Started Working =============/
on how to configure ACL settings in your Console/Profile resources. *BareOS Version:* 19.2.6 (11 February 2020) Linux-3.10.0-1062.9.1.el7.x86_64 ubuntu Ubuntu 18.04 LTS *OS Version:* Ubuntu 18.04.4 LTS *What I Have Checked:* 1. using bconsole, I checked the status of all BareOS components and they are all normal. In addition last night's backups all completed sucessfully 2. checked /var/log/apache2/error.log and found the following error: |[Wed Feb 12 08:42:45.725166 2020] [php7:error] [pid 24275] [client xx.xx.xx.xx:38130] || || ||PHP Fatal error: Uncaught Error: Call to a member function prepare() on null in /usr/share/bareos-webui/module/Auth/view/auth/auth/login.phtml:45|| || ||Stack trace:|| ||#0 /usr/share/bareos-webui/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(501): include()|| || ||#1 /usr/share/bareos-webui/vendor/zendframework/zend-view/src/View.php(205): Zend\\View\\Renderer\\PhpRenderer->render(NULL)|| || ||#2 /usr/share/bareos-webui/vendor/zendframework/zend-view/src/View.php(233): Zend\\View\\View->render(Object(Zend\\View\\Model\\ViewModel))|| || ||#3 /usr/share/bareos-webui/vendor/zendframework/zend-view/src/View.php(198): Zend\\View\\View->renderChildren(Object(Zend\\View\\Model\\ViewModel))|| || ||#4 /usr/share/bareos-webui/vendor/zendframework/zend-mvc/src/View/Http/DefaultRenderingStrategy.php(103): Zend\\View\\View->render(Object(Zend\\View\\Model\\ViewModel))|| || ||#5 [internal function]: Zend\\Mvc\\View\\Http\\DefaultRenderingStrategy->render(Object(Zend\\Mvc\\MvcEvent))|| || ||#6 /usr/share/bareos-webui/vendor/zendframework/zend-eventmanager/src/EventManager.php(444): call_user_func(Arra in /usr/share/bareos-webui/module/Auth/view/auth/auth/login.phtml on line 45, referer: http://bareos.example.com/bareos-webui/|