barcus/bareos

bareos-webui - restore - File selection - page is blank

Closed this issue · 2 comments

Hello, I have installed bareos 20 docker. Everything works fine with the exception that a restore from webui does not work. The page is blank. I couldn't find a correct error message either. I can restore on the console without any problems. How can I debug the problem?

OS: CentOS Linux release 7.9.2009
Docker version 20.10.2
Docker-compose version 1.27.4
docker-compose.yml:

version: '3'
services:
  bareos-dir:
    image: barcus/bareos-director:20-ubuntu-pgsql
    volumes:
      - /data/bareos/config/director:/etc/bareos
      - /data/bareos/data/director:/var/lib/bareos # required for MyCatalog backup
    environment:
      - DB_HOST=bareos-db
      - DB_PORT=5432
      - DB_PASSWORD=mYo3JCb0WVGUEXS8l73U
      - BAREOS_SD_HOST=bareos-sd
      - BAREOS_SD_PASSWORD=zSNKlvPYEn991EL9ybAV3gvLOkwNCVA18psUESKf
      - BAREOS_FD_HOST=bareos-fd
      - BAREOS_FD_PASSWORD=hnzbzOjAYR1cTcNVOcC7DBKMuCcLsVSJI9ukj1ok
      - BAREOS_WEBUI_PASSWORD=yRjWgE2KzgUguwU
      - SMTP_HOST=smtpd
      - SENDER_MAIL=bareos1@localhost #optional
      - ADMIN_MAIL=root@localhost # Change me!
      # Optional you can gets backup notification via Slack or Telegram
      - WEBHOOK_NOTIFICATION=false # true or false if set to true email notification gets disabled
      - WEBHOOK_TYPE=slack # choose slack or telegram
      - WEBHOOK_URL= # set the slack or telegram URL
      - WEBHOOK_CHAT_ID= # for telegram only set the <chat_id>
    depends_on:
      - bareos-db

  bareos-sd:
    image: barcus/bareos-storage:20-ubuntu
    ports:
      - 9103:9103
    volumes:
      - /data/bareos/config/storage:/etc/bareos
      - /data/bareos/data/storage:/var/lib/bareos/storage
    environment:
      - BAREOS_SD_PASSWORD=zSNKlvPYEn991EL9ybAV3gvLOkwNCVA18psUESKf

  bareos-fd:
    image: barcus/bareos-client:20-ubuntu
    volumes:
      - /data/bareos/config/client:/etc/bareos
      - /data/bareos/data/director:/var/lib/bareos-director # required for MyCatalog backup
    environment:
      - BAREOS_FD_PASSWORD=hnzbzOjAYR1cTcNVOcC7DBKMuCcLsVSJI9ukj1ok
      - FORCE_ROOT=false

  bareos-webui:
    image: barcus/bareos-webui:20-ubuntu
    ports:
      - 8080:80
    environment:
      - BAREOS_DIR_HOST=bareos-dir
      - SERVER_STATS=yes
    volumes:
      - /data/bareos/config/webui:/etc/bareos-webui

  bareos-db:
    image: postgres:9.3
    volumes:
      - /data/pgsql/data:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=mYo3JCb0WVGUEXS8l73U

  smtpd:
    image: namshi/smtp

netstat -tulpen |grep proxy

tcp        0      0 0.0.0.0:9103            0.0.0.0:*               LISTEN      0          53551      10886/docker-proxy
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      0          50147      11025/docker-proxy

Steps to replicate:
Jobs => Action => backup-bareos-fd => run
Jobs => Action => BackupCatalog => run

Restore => Client => bareos-fd
File selection is emty

Run bconsole:

docker-compose exec bareos-dir bconsole
Connecting to Director localhost:9101
 Encryption: TLS_CHACHA20_POLY1305_SHA256 TLSv1.3
1000 OK: bareos-dir Version: 20.0.0 (16 December 2020)
bareos.org build binary
bareos.org binaries are UNSUPPORTED by bareos.com.
Get official binaries and vendor support on https://www.bareos.com
You are connected using the default console

Enter a period (.) to cancel a command.
*list jobs
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
+-------+------------------+-----------+---------------------+------+-------+----------+-----------+-----------+
| jobid | name             | client    | starttime           | type | level | jobfiles | jobbytes  | jobstatus |
+-------+------------------+-----------+---------------------+------+-------+----------+-----------+-----------+
|     1 | backup-bareos-fd | bareos-fd | 2021-01-27 11:00:06 | B    | F     |      138 | 7,269,052 | T         |
|     2 | BackupCatalog    | bareos-fd | 2021-01-27 11:00:42 | B    | F     |       11 |    79,525 | T         |
+-------+------------------+-----------+---------------------+------+-------+----------+-----------+-----------+
You have messages.
*list files jobid=1
 /usr/sbin/
 /usr/sbin/policy-rc.d
 /usr/sbin/initctl
 /usr/sbin/tzconfig
 /usr/sbin/bwild
...

Apache logs
dcexec bareos-webui tail -f -n 2000 /var/log/apache2/error.log

[Wed Jan 27 11:07:07.784547 2021] [php7:warn] [pid 10] [client 192.168.15.5:63069] PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/share/bareos-webui/vendor/zendframework/zend-stdlib/src/ArrayObject.php on line 426, referer: http://bareos.xxxxxxxx.de:8080/restore/?jobid=&client=bareos-fd&restoreclient=&restorejob=&where=&file         set=&mergefilesets=0&mergejobs=0&limit=2000
[Wed Jan 27 11:07:07.838992 2021] [php7:notice] [pid 10] [client 192.168.15.5:63069] PHP Notice:  compact(): Undefined variable: extras in /usr/share/bareos-webui/vendor/zendframework/zend-view/src/Helper/HeadLink.php on line 403, referer: http://bareos.xxxxxxxx.de:8080/restore/?jobid=&client=bareos-fd&restoreclient=&restorejob=&where=&fileset=&mergefilesets=0&mergejobs=0&limit=2000
[Wed Jan 27 11:07:07.839023 2021] [php7:notice] [pid 10] [client 192.168.15.5:63069] PHP Notice:  compact(): Undefined variable: extras in /usr/share/bareos-webui/vendor/zendframework/zend-view/src/Helper/HeadLink.php on line 403, referer: http://bareos.xxxxxxxx.de:8080/restore/?jobid=&client=bareos-fd&restoreclient=&restorejob=&where=&fileset=&mergefilesets=0&mergejobs=0&limit=2000
[Wed Jan 27 11:07:07.839040 2021] [php7:notice] [pid 10] [client 192.168.15.5:63069] PHP Notice:  compact(): Undefined variable: extras in /usr/share/bareos-webui/vendor/zendframework/zend-view/src/Helper/HeadLink.php on line 403, referer: http://bareos.xxxxxxxx.de:8080/restore/?jobid=&client=bareos-fd&restoreclient=&restorejob=&where=&fileset=&mergefilesets=0&mergejobs=0&limit=2000
[Wed Jan 27 11:07:46.158788 2021] [php7:notice] [pid 11] [client 192.168.15.5:63074] PHP Notice:  compact(): Undefined variable: extras in /usr/share/bareos-webui/vendor/zendframework/zend-view/src/Helper/HeadLink.php on line 403, referer: http://bareos.xxxxxxxx.de:8080/auth/login
[Wed Jan 27 11:07:46.159239 2021] [php7:notice] [pid 11] [client 192.168.15.5:63074] PHP Notice:  compact(): Undefined variable: extras in /usr/share/bareos-webui/vendor/zendframework/zend-view/src/Helper/HeadLink.php on line 403, referer: http://bareos.xxxxxxxx.de:8080/auth/login

dcexec bareos-webui tail -f -n 2000 /var/log/apache2/access.log

192.168.15.5 - - [27/Jan/2021:11:07:57 +0000] "GET /job/actions/ HTTP/1.1" 200 3027 "http://bareos.xxxxxxxx.de:8080/job//" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"
192.168.15.5 - - [27/Jan/2021:11:07:58 +0000] "GET /job/getData/?data=runjobs&sort=name&order=asc HTTP/1.1" 200 389 "http://bareos.xxxxxxxx.de:8080/job/actions/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"
192.168.15.5 - - [27/Jan/2021:11:09:36 +0000] "GET /restore/ HTTP/1.1" 200 5174 "http://bareos.xxxxxxxx.de:8080/job/actions/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"
192.168.15.5 - - [27/Jan/2021:11:09:37 +0000] "GET /restore/filebrowser?jobid=&mergefilesets=0&mergejobs=0&limit=2000&id=%23 HTTP/1.1" 200 306 "http://bareos.xxxxxxxx.de:8080/restore/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"
192.168.15.5 - - [27/Jan/2021:11:09:45 +0000] "GET /restore/?jobid=&client=bareos-fd&restoreclient=&restorejob=&where=&fileset=&mergefilesets=0&mergejobs=0&limit=2000 HTTP/1.1" 200 5240 "http://bareos.xxxxxxxx.de:8080/restore/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"
192.168.15.5 - - [27/Jan/2021:11:09:46 +0000] "GET /restore/filebrowser?jobid=2&mergefilesets=0&mergejobs=0&limit=2000&id=%23 HTTP/1.1" 200 306 "http://bareos.xxxxxxxx.de:8080/restore/?jobid=&client=bareos-fd&restoreclient=&restorejob=&where=&fileset=&mergefilesets=0&mergejobs=0&limit=2000" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"

the picture
https://ibb.co/CHvHNR0

Hello @johann8, thank you 👍

I can reproduce this issue, it seems to be related to bvfs cache.
I don't know if something changed about that but you can easily fix it right now
launch bconsole and run .bvfs_update

Enter a period (.) to cancel a command.
*.bvfs_update
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
You have messages

There are some informations in Bareos documentation -> https://docs.bareos.org/bareos-20/IntroductionAndTutorial/InstallingBareosWebui.html

I'm gonna check if there is something more to run in my docker image to do it, maybe a new job

Hello barcus,

I have to thank!
The advice works!
Thank you very much for the reference to the documentation and for your work!
Best regards