View Issue Details

IDProjectCategoryView StatusLast Update
0000429bareos-corewebuipublic2015-07-13 09:50
Reporterstefan.tandecki Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platformx86-64OSopenSuSEOS Version13.2
Product Version14.2.3 
Summary0000429: New Webui fails to connect to database
DescriptionAfter installation of the new Webui, testing with accessing http://<servername>/bareos-webui/install/test fails for "Connection Test" and "Read-Access Test". The database connection info in /etc/bareos-webui/directors.ini is exactly the same as in /etc/bareos/bareos-dir.conf (director and webui are also on the same server). Important might be that the schema name in my MySQL database has been changed from the default "bareos" to "BAREOS" and I have the slight feeling that the dbname attribute is not used at all for the connection (looks like that in InstallController.php)
Steps To ReproduceInstall Webui on the same server as the director, use the same db connection data, use non-default dbname (MySQL schema)
TagsNo tags attached.

Activities

tigerfoot

tigerfoot

2015-03-01 16:39

developer   ~0001283

I'm seeing the same result with install/test
see attached print-sreen

I'm using postgresql db with read only user bareos_webui + password as stated in the install documentation.

The funny thing is the bareos_webui is working so its a minor defect but hard to understand why it would fail.
db bareos
schema public
grant done for bareos_webui and setup complete.
tigerfoot

tigerfoot

2015-03-01 16:40

developer  

bareos_webui.jpg (57,364 bytes)   
bareos_webui.jpg (57,364 bytes)   
tigerfoot

tigerfoot

2015-03-01 16:42

developer  

bareos_webui-working.jpg (100,671 bytes)   
bareos_webui-working.jpg (100,671 bytes)   
stefan.tandecki

stefan.tandecki

2015-03-02 07:06

reporter  

bareos-webui-error.png (127,632 bytes)   
bareos-webui-error.png (127,632 bytes)   
stefan.tandecki

stefan.tandecki

2015-03-02 07:07

reporter   ~0001284

...well, unfortunately bareos-webui still does not work for me (see bareos-webui-error.png)
tigerfoot

tigerfoot

2015-03-02 07:57

developer   ~0001285

I've seen once this error, then try the install/test
After having restarted apache2 postgresql and bareos-dir everything has worked.

Also be sure (the doc was misleading) to have the inclusion line in bareos-dir.conf file for bareos-webui.conf
@/etc/bareos/bareos-dir.d/bareos-webui.conf

And finally I've used FQDN for the db server in etc/bareos-webui/directors.ini
dbaddress et diraddress replacing the localhost value there.
frank

frank

2015-03-02 15:36

developer   ~0001286

I've been able to reproduce the issue and will take care of it.
kdroge

kdroge

2015-03-03 07:56

reporter   ~0001287

New to bareos but had the same issue. After a little digging through the code, it appears the page tests the password's existence fine, but the connection test is using the wrong value for a "good" password status. As a result, the connection test is never performed and therefore always fails.

/usr/share/bareos-webui/module/Install/src/Install/Controller/InstallController.php

Line 248 should be:
self::getDbPasswordStatus() == 0

Currently it is:
self::getDbPasswordStatus() == -1
stefan.tandecki

stefan.tandecki

2015-03-03 09:27

reporter   ~0001288

alright, the change kdroge suggested, works for me to get a pass on the install/test. Nevertheless I cannot get to dashboard, I get the error shown in bareos-webui-error.png, but that might be a completely different problem... ;-(
frank

frank

2015-03-03 14:27

developer   ~0001289

Last edited: 2015-03-03 15:05

kdroge:

In deed, Line 248 should be: self::getDbPasswordStatus() == 0

stefan.tandecki:

Just to be sure, is it really the same exception as shown above in bareos-webui-error.png after fixing line 248?

frank

frank

2015-03-03 15:55

developer   ~0001290

@stefan.tandecki

Argh, what a question ... stupid me, I think so.

Nevertheless, I'm kind of wondering what the reason might be here. Not quite sure, yet. As you said, install/test passes now, all green.

Currently not really able to reproduce the exception on picture above under the circumstances you described so far. I have to dig deeper into it.
stefan.tandecki

stefan.tandecki

2015-03-03 16:30

reporter   ~0001291

@frank: yes, it is this message I get now (despite that the install/test said that connection to DB _and_ director was okay). srvbkp2.zs-net.de is my fqdn for the director (I also tried IP and the short name srvbkp2, always same result). Any hint in which config files what kind of server resp. director names definitely need to match?!
frank

frank

2015-03-04 17:43

developer   ~0001292

Ok, let me first make clear that the install/test currently only tests the first entry (director and corresponding catalog) in your /etc/bareos-webui/directors.ini, which should definitely be improved, meaning iterating over every entry and test them.

@stefan.tandecki

Is srvbkp2.zs-net.de the first and only entry in your directors.ini or do you use multiple directors, maybe by accident or not being aware of how the ini file is structured?

Would be great, if you can post your (anonymized) directors.ini here, that will make things easier to track down the issue in your case.
stefan.tandecki

stefan.tandecki

2015-03-04 17:58

reporter   ~0001293

@frank: I only have one director, I'll attach my directors.ini
stefan.tandecki

stefan.tandecki

2015-03-04 17:58

reporter  

directors.ini (766 bytes)
frank

frank

2015-03-04 18:35

developer   ~0001294

Fix committed to bareos-webui master branch with changesetid 2913.
frank

frank

2015-03-04 18:44

developer   ~0001295

Reopened as discussion is ongoing and just one issue is solved, might be another here.
stefan.tandecki

stefan.tandecki

2015-03-05 13:48

reporter   ~0001299

@frank: I only have one director, I'll attach my directors.ini
frank

frank

2015-03-05 19:07

developer   ~0001300

@stefan.tandecki

I'm going to commit a patch in a few, which I'm pretty sure will fix the issue you reported. If it doesn't, please let us know.

New updated packages will be available tomorrow morning.
frank

frank

2015-03-05 19:07

developer   ~0001301

Fix committed to bareos-webui master branch with changesetid 2916.

Related Changesets

bareos-webui: master 85eba237

2015-03-04 15:09

frank

Ported: N/A

Details Diff
Bugfix 0000429

Connection test was never performed, because of a wrong set value for
password status comparison.

Fixes 0000429: New Webui fails to connect to database
Affected Issues
0000429
mod - module/Install/src/Install/Controller/InstallController.php Diff File

bareos-webui: master 1e768e36

2015-03-05 18:06

frank

Ported: N/A

Details Diff
Fixes a bug in config reader

Wrong array keys in config reader lead to confusion and not being
able to use a catalog db running on a host other than the director host.

Fixes 0000429: New Webui fails to connect to database
Affected Issues
0000429
mod - config/autoload/global.php Diff File
mod - module/Auth/src/Auth/Form/LoginForm.php Diff File

Issue History

Date Modified Username Field Change
2015-02-28 11:04 stefan.tandecki New Issue
2015-03-01 16:39 tigerfoot Note Added: 0001283
2015-03-01 16:40 tigerfoot File Added: bareos_webui.jpg
2015-03-01 16:42 tigerfoot File Added: bareos_webui-working.jpg
2015-03-02 07:06 stefan.tandecki File Added: bareos-webui-error.png
2015-03-02 07:07 stefan.tandecki Note Added: 0001284
2015-03-02 07:57 tigerfoot Note Added: 0001285
2015-03-02 13:56 joergs Assigned To => frank
2015-03-02 13:56 joergs Status new => assigned
2015-03-02 15:36 frank Note Added: 0001286
2015-03-02 15:36 frank Status assigned => acknowledged
2015-03-03 07:56 kdroge Note Added: 0001287
2015-03-03 09:27 stefan.tandecki Note Added: 0001288
2015-03-03 14:27 frank Note Added: 0001289
2015-03-03 14:40 frank Note Edited: 0001289
2015-03-03 15:05 frank Note Edited: 0001289
2015-03-03 15:55 frank Note Added: 0001290
2015-03-03 16:30 stefan.tandecki Note Added: 0001291
2015-03-04 17:43 frank Note Added: 0001292
2015-03-04 17:58 stefan.tandecki Note Added: 0001293
2015-03-04 17:58 stefan.tandecki File Added: directors.ini
2015-03-04 18:35 frank Changeset attached => bareos-webui master 85eba237
2015-03-04 18:35 frank Note Added: 0001294
2015-03-04 18:35 frank Status acknowledged => resolved
2015-03-04 18:35 frank Resolution open => fixed
2015-03-04 18:44 frank Note Added: 0001295
2015-03-04 18:44 frank Status resolved => feedback
2015-03-04 18:44 frank Resolution fixed => reopened
2015-03-05 13:48 stefan.tandecki Note Added: 0001299
2015-03-05 13:48 stefan.tandecki Status feedback => assigned
2015-03-05 19:07 frank Note Added: 0001300
2015-03-05 19:07 frank Changeset attached => bareos-webui master 1e768e36
2015-03-05 19:07 frank Note Added: 0001301
2015-03-05 19:07 frank Status assigned => resolved
2015-03-31 15:26 mvwieringen adm Assigned To frank =>
2015-07-13 09:50 joergs Status resolved => closed
2015-07-13 09:50 joergs Resolution reopened => fixed