View Issue Details

IDProjectCategoryView StatusLast Update
0000939bareos-coredirectorpublic2021-11-22 11:42
ReporterIvanBayan Assigned Tobruno-at-bareos  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.04
Product Version17.2.4 
Fixed in Version21.0.0 
Summary0000939: Bareos director stays malfunction if DB server was un-available for a time
DescriptionIf DB server has gone away, bareos director would stays malfunction even after DB returns back.

As you can see below sqlquery from bconsole works fine, but estimate command doesn't:
*.sql query="SELECT COUNT(Job) FROM JOB;"
Using Catalog "MyCatalog"
+-------+
| count |
+-------+
| 4,360 |
+-------+
*estimate job=ow-mssql01_mssql
Using Catalog "MyCatalog"
You have messages.
*

In log file I've found next error messages:
19-Apr 05:40 mia-backup03-dir JobId 0: Fatal error: sql_create.c:537 sql_create.c:537 query SELECT ClientId,Uname FROM Client WHERE Name='ow-mssql01-fd' failed:
no connection to the server

19-Apr 05:40 mia-backup03-dir JobId 0: Error: sql_create.c:579 Create DB Client record INSERT INTO Client (Name,Uname,AutoPrune,FileRetention,JobRetention) VALUES ('ow-mssql01-fd','',0,5184000,15552000) failed. ERR=no connection to the server

19-Apr 05:40 mia-backup03-dir JobId 0: Fatal error: Could not create Client record. ERR=sql_create.c:579 Create DB Client record INSERT INTO Client (Name,Uname,AutoPrune,FileRetention,JobRetention) VALUES ('ow-mssql01-fd','',0,5184000,15552000) failed. ERR=no connection to the server

Moreover, backup became broken too, all jobs executions just stuck:
*run job=mia-backup03_bareos yes
Using Catalog "MyCatalog"

In log file:
19-Apr 05:43 mia-backup03-dir JobId 0: Fatal error: sql_create.c:537 sql_create.c:537 query SELECT ClientId,Uname FROM Client WHERE Name='mia-backup03-fd' failed:
no connection to the server

19-Apr 05:45 mia-backup03-dir JobId 0: Error: sql_create.c:579 Create DB Client record INSERT INTO Client (Name,Uname,AutoPrune,FileRetention,JobRetention) VALUES ('mia-backup03-fd','',0,5184000,15552000) failed. ERR=no connection to the server
Steps To Reproduce1. Stop DB service
2. Wait for a while
3. Start DB service
Additional InformationI have active monitoring checks via bareos api, may be it can affects on situation.
TagsNo tags attached.

Activities

aron_s

aron_s

2018-04-27 13:30

reporter   ~0002977

Reproduced, can be temporarily fixed by forcing the restart of bareos-dir service.
kaulard

kaulard

2021-11-20 22:25

reporter   ~0004346

This problem still occurs in bareos 20.0.1.

After an upgrade of postgresql. (unattended-upgrades).
bareos does not reconnnect to its database and does not
start any jobs until bareos-dir is restarted manually.

20-Nov 21:00 bareos-dir JobId 0: Fatal error: cats/sql_create.cc:536 cats/sql_create.cc:536 query SELECT ClientId,Uname FROM Client WHERE Name='bareos-fd' failed:
no connection to the server

20-Nov 21:02 bareos-dir JobId 0: Error: cats/sql_create.cc:577 Create DB Client record INSERT INTO Client (Name,Uname,AutoPrune,FileRetention,JobRetention) VALUES ('bareos-fd','',0,5184000,15552000) failed. ERR=no connection to the server
bruno-at-bareos

bruno-at-bareos

2021-11-22 11:40

manager   ~0004347

This has been fixed by PR#860 https://github.com/bareos/bareos/pull/860 (not followed here)
It will appear in version 21.
bruno-at-bareos

bruno-at-bareos

2021-11-22 11:42

manager   ~0004348

PR#860 merged https://github.com/bareos/bareos/pull/860

Issue History

Date Modified Username Field Change
2018-04-19 11:49 IvanBayan New Issue
2018-04-27 13:30 aron_s Note Added: 0002977
2021-11-20 22:25 kaulard Note Added: 0004346
2021-11-22 11:40 bruno-at-bareos Note Added: 0004347
2021-11-22 11:42 bruno-at-bareos Assigned To => bruno-at-bareos
2021-11-22 11:42 bruno-at-bareos Status new => closed
2021-11-22 11:42 bruno-at-bareos Resolution open => fixed
2021-11-22 11:42 bruno-at-bareos Fixed in Version => 21.0.0
2021-11-22 11:42 bruno-at-bareos Note Added: 0004348