View Issue Details

IDProjectCategoryView StatusLast Update
0000939bareos-core[All Projects] directorpublic2021-11-22 11:42
ReporterIvanBayanAssigned 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.
bareos-master: impactyes
bareos-master: actionfixed
bareos-19.2: impactyes
bareos-19.2: actionnone
bareos-18.2: impactyes
bareos-18.2: actionnone
bareos-17.2: impactno
bareos-17.2: actionnone
bareos-16.2: impactno
bareos-16.2: actionnone
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action

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

developer   ~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

developer   ~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 bareos-master: impact => yes
2021-11-22 11:42 bruno-at-bareos bareos-master: action => fixed
2021-11-22 11:42 bruno-at-bareos bareos-19.2: impact => yes
2021-11-22 11:42 bruno-at-bareos bareos-19.2: action => none
2021-11-22 11:42 bruno-at-bareos bareos-18.2: impact => yes
2021-11-22 11:42 bruno-at-bareos bareos-18.2: action => none
2021-11-22 11:42 bruno-at-bareos bareos-17.2: impact => no
2021-11-22 11:42 bruno-at-bareos bareos-17.2: action => none
2021-11-22 11:42 bruno-at-bareos bareos-16.2: impact => no
2021-11-22 11:42 bruno-at-bareos bareos-16.2: action => none
2021-11-22 11:42 bruno-at-bareos Note Added: 0004348