View Issue Details

IDProjectCategoryView StatusLast Update
0000598bareos-corewebuipublic2016-12-21 17:13
Reporterbsantana Assigned To 
PriorityhighSeverityfeatureReproducibilityalways
Status closedResolutionunable to reproduce 
PlatformLinuxOSCentOSOS Version6
Product Version15.2.2 
Summary0000598: Error when I press Restore
DescriptionParse error: syntax error, unexpected '[' in /var/www/html/bareos-webui/module/Restore/src/Restore/Controller/RestoreController.php on line 49 Call Stack: 0.0002 643608 1. {main}() /var/www/html/bareos-webui/public/index.php:0 0.0720 10751840 2. Zend\Mvc\Application->run() /var/www/html/bareos-webui/public/index.php:24 0.0727 10789768 3. Zend\EventManager\EventManager->trigger() /usr/share/php/Zend/Mvc/Application.php:309 0.0727 10789768 4. Zend\EventManager\EventManager->triggerListeners() /usr/share/php/Zend/EventManager/EventManager.php:207 0.0728 10792568 5. call_user_func() /usr/share/php/Zend/EventManager/EventManager.php:468 0.0728 10792600 6. Zend\Mvc\DispatchListener->onDispatch() /usr/share/php/Zend/EventManager/EventManager.php:468 0.0729 10792600 7. Zend\Mvc\Controller\ControllerManager->get() /usr/share/php/Zend/Mvc/DispatchListener.php:97 0.0729 10792864 8. Zend\ServiceManager\AbstractPluginManager->get() /usr/share/php/Zend/Mvc/Controller/ControllerManager.php:133 0.0729 10792864 9. Zend\ServiceManager\ServiceManager->get() /usr/share/php/Zend/ServiceManager/AbstractPluginManager.php:103 0.0729 10793560 10. Zend\ServiceManager\ServiceManager->create() /usr/share/php/Zend/ServiceManager/ServiceManager.php:503 0.0729 10793560 11. Zend\ServiceManager\ServiceManager->doCreate() /usr/share/php/Zend/ServiceManager/ServiceManager.php:569 0.0729 10793608 12. Zend\ServiceManager\AbstractPluginManager->createFromInvokable() /usr/share/php/Zend/ServiceManager/ServiceManager.php:613 0.0729 10793976 13. Zend\Loader\StandardAutoloader->autoload() /usr/share/php/Zend/ServiceManager/ServiceManager.php:0 0.0729 10794056 14. Zend\Loader\StandardAutoloader->loadClass() /usr/share/php/Zend/Loader/StandardAutoloader.php:215
Steps To ReproduceOpen WebUI and intermediately go to 'Restore' option, I get this message.
Additional Informationphp-ZendFramework2 version 2.2.8
Bareos version 15.2.2
PHP version 5.3.3
nginx 1.0.15
TagsNo tags attached.

Activities

frank

frank

2016-01-21 12:25

developer   ~0002135

Are you sure both, bareos-webui and bareos-dir, are on latest version?

In addition check if your location in nginx configuration is set up properly so query parameters are passed.

E.g.

location / {
    try_files $uri $uri/ /index.php?$query_string;
}
bsantana

bsantana

2016-01-22 22:29

reporter   ~0002157

Yes, both of them are on the latest version.

Installed Packages
Name : bareos-director
Arch : x86_64
Version : 15.2.2
Release : 35.1.el6
From repo : bareos_bareos-15.2
URL : http://www.bareos.org/


Installed Packages
Name : bareos-webui
Arch : noarch
Version : 15.2.2
Release : 41.1.el6
URL : https://github.com/bareos/bareos-webui

Nginx configuration:

server {
   listen 80;
   server_name bareos.server.com;
location / {
        index index.php;
        error_page 404 = /index.php;
        try_files $uri $uri/ /index.php?$query_string;
        if (!-e $request_filename) {
        rewrite ^/(.*)$ /index.php?$1 last;
        break;
  }
}

location ~ .php$ {
        try_files $uri /index.php =404;
        fastcgi_pass unix:/var/tmp/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_buffer_size 128k;
        fastcgi_buffers 256 4k;
        fastcgi_busy_buffers_size 256k;
        fastcgi_temp_file_write_size 256k;
        fastcgi_param APPLICATION_ENV production;
   }
}

I've added the line of try_files $uri $uri/ /index.php?$query_string; And when I restart the nginx service, then when I press the restore button again, now there is just a blank page. But when I reviewed the log (bareosweb_error.log) I see the message below.

2016/01/22 17:13:54 [error] 10714#0: *1 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected '[' in /var/www/html/bareos-webui/module/Restore/src/Restore/Controller/RestoreController.php on line 49
PHP message: PHP Stack trace:
PHP message: PHP 1. {main}() /var/www/html/bareos-webui/public/index.php:0
PHP message: PHP 2. Zend\Mvc\Application->run() /var/www/html/bareos-webui/public/index.php:24
PHP message: PHP 3. Zend\EventManager\EventManager->trigger() /usr/share/php/Zend/Mvc/Application.php:309
PHP message: PHP 4. Zend\EventManager\EventManager->triggerListeners() /usr/share/php/Zend/EventManager/EventManager.php:207
PHP message: PHP 5. call_user_func() /usr/share/php/Zend/EventManager/EventManager.php:468
PHP message: PHP 6. Zend\Mvc\DispatchListener->onDispatch() /usr/share/php/Zend/EventManager/EventManager.php:468
PHP message: PHP 7. Zend\Mvc\Controller\ControllerManager->get() /usr/share/php/Zend/Mvc/DispatchListener.php:97
PHP message: PHP 8. Zend\ServiceManager\AbstractPluginManager->get() /usr/share/php/Zend/Mvc/Controller/ControllerManager.php:133
PHP message: PHP 9. Zend\ServiceManager\ServiceManager->get() /usr/share/php/Zend/ServiceManager/AbstractPluginManager.php:103
PHP message: PHP 10. Zend\ServiceManager\ServiceManager->create() /usr/share/php/Zend/ServiceManager/ServiceManager.php:503
PHP message: PHP 11. Zend\ServiceManager\ServiceManager->doCreate() /usr/share/php/Zend/ServiceManager/ServiceManager.php:569
PHP message: PHP 12. Zend\ServiceManager\AbstractPluginManager->createFromInvokable() /usr/share/php/Zend/ServiceManager/ServiceManager.php:613
PHP message: PHP 13. Zend\Loader\StandardAutoloader->autoload() /usr/share/php/Zend/ServiceManager/ServiceManager.php:0
PHP message: PHP 14. Zend\Loader\StandardAutoloader->loadClass() /usr/share/php/Zend/Loader/StandardAutoloader.php:215" while reading response header from upstream, client: myhost, server: bareos.server.com, request: "GET /restore/ HTTP/1.1", upstream: "fastcgi://unix:
frank

frank

2016-01-26 13:18

developer   ~0002160

I was not able to reproduce it on a test system yet.

That error in line 49/50 may indicate that webui has difficulties to get clients names.

However, I've tested various name formats I can think of and still was not able to reproduce.

How does the format of your clients name look like, e.g. "client-fd", "client fd" or is it something else?

In addition, please double check your nginx configuration and keep it as simple as possible for testing, like the really basic one the install manual shows and see if that works.
bsantana

bsantana

2016-01-26 17:46

reporter   ~0002164

Format of my clients names : srv-client-fd

Also I have the clients configuration in ../bareos-dir.d/clients.conf The line @/etc/bareos/bareos-dir.d/clients.conf is included in the bareos-dir.conf

But when I delete the reference line (@/etc/...clients.conf) and put a client basic configuration:

Client {
  Name = srv-bareos-fd
  Address = srv-Bareos
  Password = "secretpassword"
}

into bareos-dir.conf, the clients configured in clients.conf still appears on the bareos-webui portal. I don't understand why, if there is no reference of this file (clients.conf) in the bareos-dir.

And the restore error still persist.
bareos-webui downloaded from http://download.bareos.org/bareos/release/15.2/CentOS_6/noarch/

bareos-webui-15.2.2-41.1.el6.noarch.rpm 04-Dec-2015 22:55 1.0M 15.2
frank

frank

2016-01-27 16:16

developer   ~0002167

> into bareos-dir.conf, the clients configured in clients.conf still appears on the bareos-webui portal. I don't understand why, if there is no reference of this file (clients.conf) in the bareos-dir.

In this case it's not retrieved from your configuration files, it's retrieved from the catalog db as previously a job has run for that client. Thus they do appear in webui as long as they are kept in your catalog.
bsantana

bsantana

2016-01-27 22:05

reporter   ~0002168

Thanks for your help.

But the error with the restore still, I really don't know what else I can do.
bsantana

bsantana

2016-01-29 22:22

reporter   ~0002173

Hello,

If I comment those lines, I can see the restore screen, but with multiples errors, but I can do the restore well.

Those lines are relevant for the restore operation or not?

#if($this->restore_params['client'] == null) {
                                #$this->restore_params['client'] = @array_pop($this->getClients(2))['name'];
                        #}
bsantana

bsantana

2016-01-29 22:25

reporter   ~0002174

although this error, the restore was fine.

Notice: Undefined index: fileset in /var/www/html/bareos-webui/module/Restore/src/Restore/Form/RestoreForm.php on line 496 Call Stack: 0.0003 659312 1. {main}() /var/www/html/bareos-webui/public/index.php:0 0.1013 10578680 2. Zend\Mvc\Application->run() /var/www/html/bareos-webui/public/index.php:28 0.1024 10616608 3. Zend\EventManager\EventManager->trigger() /usr/share/php/Zend/Mvc/Application.php:309 0.1025 10616608 4. Zend\EventManager\EventManager->triggerListeners() /usr/share/php/Zend/EventManager/EventManager.php:207 0.1026 10619408 5. call_user_func() /usr/share/php/Zend/EventManager/EventManager.php:468 0.1026 10619440 6. Zend\Mvc\DispatchListener->onDispatch() /usr/share/php/Zend/EventManager/EventManager.php:468 0.1051 11015760 7. Zend\Mvc\Controller\AbstractController->dispatch() /usr/share/php/Zend/Mvc/DispatchListener.php:114 0.1051 11016336 8. Zend\EventManager\EventManager->trigger() /usr/share/php/Zend/Mvc/Controller/AbstractController.php:117 0.1051 11016336 9. Zend\EventManager\EventManager->triggerListeners() /usr/share/php/Zend/EventManager/EventManager.php:207 0.1055 11029792 10. call_user_func() /usr/share/php/Zend/EventManager/EventManager.php:468 0.1055 11029824 11. Zend\Mvc\Controller\AbstractActionController->onDispatch() /usr/share/php/Zend/EventManager/EventManager.php:468 0.1055 11029904 12. Restore\Controller\RestoreController->indexAction() /usr/share/php/Zend/Mvc/Controller/AbstractActionController.php:83 1.2095 13408616 13. Restore\Form\RestoreForm->__construct() /var/www/html/bareos-webui/module/Restore/src/Restore/Controller/RestoreController.php:82 1.2132 13729880 14. Restore\Form\RestoreForm->getBackupList() /var/www/html/bareos-webui/module/Restore/src/Restore/Form/RestoreForm.php:94
frank

frank

2016-06-10 17:37

developer   ~0002294

Is this still an issue?

Issue History

Date Modified Username Field Change
2016-01-14 21:28 bsantana New Issue
2016-01-18 17:49 frank Assigned To => frank
2016-01-18 17:49 frank Status new => assigned
2016-01-21 12:25 frank Note Added: 0002135
2016-01-21 12:25 frank Status assigned => feedback
2016-01-22 22:29 bsantana Note Added: 0002157
2016-01-22 22:29 bsantana Status feedback => assigned
2016-01-26 13:18 frank Note Added: 0002160
2016-01-26 13:20 frank Status assigned => feedback
2016-01-26 17:46 bsantana Note Added: 0002164
2016-01-26 17:46 bsantana Status feedback => assigned
2016-01-27 16:16 frank Note Added: 0002167
2016-01-27 22:05 bsantana Note Added: 0002168
2016-01-29 22:22 bsantana Note Added: 0002173
2016-01-29 22:25 bsantana Note Added: 0002174
2016-06-10 17:37 frank Note Added: 0002294
2016-06-10 17:37 frank Status assigned => feedback
2016-12-21 17:12 frank Assigned To frank =>
2016-12-21 17:13 frank Status feedback => closed
2016-12-21 17:13 frank Resolution open => unable to reproduce