View Issue Details

IDProjectCategoryView StatusLast Update
0001181bareos-coredirectorpublic2024-03-20 14:54
Reporterteka74 Assigned Toarogge  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionunable to reproduce 
PlatformDual-CPU XEONOSUbuntuOS Version18.04
Product Version19.2.5 
Summary0001181: director failed to start
DescriptionAfter upgrading my database with the hack from issue 1176, i could start my director and it made a scheduled backup

After this backup, I tried to reboot my computer, and the director failed to start


root@backup:~# service bareos-director start
Job for bareos-director.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status bareos-director.service" and "journalctl -xe" for details.
root@backup:~# service bareos-director status
● bareos-director.service - Bareos Director Daemon service
   Loaded: loaded (/lib/systemd/system/bareos-director.service; enabled; vendor preset: enabled)
   Active: failed (Result: protocol) since Sat 2020-02-08 02:41:02 CET; 14s ago
     Docs: man:bareos-dir(8)
  Process: 4522 ExecStart=/usr/sbin/bareos-dir (code=exited, status=1/FAILURE)
  Process: 4521 ExecStartPre=/usr/sbin/bareos-dir -t -f (code=exited, status=1/FAILURE)

Feb 08 02:41:02 backup bareos-dir[4521]: Config error: expected an equals, got: {
Feb 08 02:41:02 backup bareos-dir[4521]: : line 1, col 9 of file /etc/bareos/bareos-dir.d/fileset/WindowsAll.conf
Feb 08 02:41:02 backup bareos-dir[4521]: FileSet {
Feb 08 02:41:02 backup bareos-dir[4522]: bareos-dir: ERROR TERMINATION at lib/parse_conf_state_machine.cc:128
Feb 08 02:41:02 backup bareos-dir[4522]: Config error: expected an equals, got: {
Feb 08 02:41:02 backup bareos-dir[4522]: : line 1, col 9 of file /etc/bareos/bareos-dir.d/fileset/WindowsAll.conf
Feb 08 02:41:02 backup bareos-dir[4522]: FileSet {
Feb 08 02:41:02 backup systemd[1]: bareos-director.service: Can't open PID file /var/lib/bareos/bareos-dir.9101.pid (yet?) after start: No such file or directory
Feb 08 02:41:02 backup systemd[1]: bareos-director.service: Failed with result 'protocol'.
Feb 08 02:41:02 backup systemd[1]: Failed to start Bareos Director Daemon service.
root@backup:~#


are there any changes in the fileset syntax??

found nothing in the current documentation



Thomas
Steps To Reproducereboot

start director

failed
TagsNo tags attached.

Activities

arogge

arogge

2020-02-10 10:59

manager   ~0003759

does "sudo -u bareos bareos-dir -t" test the configuration OK?
teka74

teka74

2020-02-13 00:51

reporter   ~0003802

root@backup:~# sudo -u bareos bareos-dir -t
bareos-dir: ERROR TERMINATION at lib/parse_conf_state_machine.cc:128
Config error: expected an equals, got: {
            : line 1, col 9 of file /etc/bareos/bareos-dir.d/fileset/WindowsAll.conf
FileSet {

root@backup:~#
arogge

arogge

2020-02-13 09:34

manager   ~0003804

Thank you for the feedback!

It seems like the parser thinks it is inside of a resource definition and reads "FileSet" as a keyword, expecting it to be followed by an equals sign ("=").
Could you attach that configuration file (as it is) to this bug, so I can try to reproduce this and find out what is going wrong? Would you also take a look at the other configuration files in the fileset directory?
teka74

teka74

2020-02-14 02:58

reporter   ~0003814

Last edited: 2020-02-19 00:46

Here is my Fileset, it was working with 18.2.5 for a year:



FileSet {
  Name= "WindowsAll"
  Enable VSS = No
  Include {
    Options {
      Signature = MD5
      Compression = GZIP
      Drive Type = fixed
      IgnoreCase = yes
      aclsupport = no
      xattrsupport = no
      WildFile = "[A-Z]:/pagefile.sys"
      WildFile = "[A-Z]:/hiberfil.sys"
      WildFile = "*.mp4"
      WildDir = "[A-Z]:/RECYCLER"
      WildDir = "[A-Z]:/$RECYCLE.BIN"
      WildDir = "[A-Z]:/System Volume Information"
      Exclude = yes
    }
    File = "c:/Freigaben/"
    File = "c:/Lampey/"
  }
}


and I checked my other filesets, all filesets are original since first install, no changes made


Are there any problems with old clients?? On my MS Server 2011 17.2.5 is running ... edit: after updating the win machine to 19.2.6 same error

Thomas

RSmit

RSmit

2020-02-18 14:09

reporter   ~0003824

Seems to me that you did not close the "FileSet" Section with a "}"... This should be at the last line...
teka74

teka74

2020-02-19 00:44

reporter   ~0003834

@RSmit

no, checked it, I think forgot one } with the copy&paste

3 times { and 3 times }

edited my older post
arogge

arogge

2020-02-19 08:43

manager   ~0003835

I will need an example how to trigger this. Either your director configuration (i.e. /etc/bareos/bareos-dir.d) in a tarball, preferably with the passwords removed.
If you don't want to upload it here (which I can totally understand) you can send it to me via e-mail: andreas.rogge@bareos.com

If you can reduce the configuration to the bare minimum that is required to reproduce the problem, that would save a lot of my time.
RSmit

RSmit

2020-02-19 10:12

reporter   ~0003840

I have tried your config file in one of my Directors, but it doesn't fail... So the problem might be somewhere else...
The syntax your using has not changed as far as I can tell...
Some things to try for general troubleshooting:
- Have you tried to run you Director in Debug 200 (bareos-dir -d 200) mode? This helps me a lot when I have configuration problems.
- What happens if remove the ".conf" from your WindowsAll config file and start the director? Note: there can be an other message from a Job missing this config...
- Might there be a /etc/bareos/bareos-dir.conf file from an earlier version of Bareos? (long shot, but you never know...)
- Can you start your Director if you remove the ".conf" from all your config files in [bareos]/client/, [bareos]/fileset/, [bareos]/schedule and [bareos]/job (where [bareos] = /etc/bareos/bareos-dir.d/)... If so re-add ".conf" to the config files one by one an try to restart the director... If not, you could send the remaining config to Andreas...
teka74

teka74

2020-02-19 22:51

reporter   ~0003842

@arogge @RSmit

Aftes several tests and your tips, i got my director running

tested it with gdb and debuglevel 200, gdb told me a list of config files to read. I checked all these configs and couldn't see any syntax errors. Then I saw, I had some older test configs under /etc/bareos, but all these were renamed without ".conf". I moved these files to my home dir, and the director started!

My suggestion: the director tries to read these files, what he shouldn't not have to do.

perhaps, check this for coming versions, and/or give a hint to the manual for other users


Thomas
arogge

arogge

2020-02-26 16:50

manager   ~0003861

Something more detailed than "I had some older test configs under /etc/bareos" would really help to reproduce this.
teka74

teka74

2020-02-29 00:02

reporter   ~0003881

@arogge @RSmit

here are examples, used it for testing after first install (I began with 17.2.x):


/etc/bareos/bareos-dir.d/job/server01.job

Job {
  Name = server01.job
  Client = server01-fd
  JobDefs = Windows
}

/etc/bareos/bareos-dir.d/jobdef/windows

JobDefs {
  Name = "Windows"
  Type = Backup
  Level = Incremental
  FileSet = "WindowsAll" # selftest fileset (0000013)
  Schedule = "AISched"
  Storage = File
  Messages = Standard
  Pool = Incremental
  Priority = 10
  Write Bootstrap = "/var/lib/bareos/%c.bsr"
  Full Backup Pool = Full # write Full Backups into "Full" Pool (0000005)
  Differential Backup Pool = Differential # write Diff Backups into "Differential" Pool (0000008)
  Incremental Backup Pool = Incremental # write Incr Backups into "Incremental" Pool (0000011)
}


I renamed that files (removed the .conf) to prevent bareos using it. After moving that old files to my home dir, the director started up.


Thomas
bruno-at-bareos

bruno-at-bareos

2024-03-20 14:54

manager   ~0005859

As we can't reproduce this, we will closed it.

Issue History

Date Modified Username Field Change
2020-02-08 02:47 teka74 New Issue
2020-02-10 10:59 arogge Assigned To => arogge
2020-02-10 10:59 arogge Status new => feedback
2020-02-10 10:59 arogge Note Added: 0003759
2020-02-13 00:51 teka74 Note Added: 0003802
2020-02-13 00:51 teka74 Status feedback => assigned
2020-02-13 09:34 arogge Status assigned => feedback
2020-02-13 09:34 arogge Note Added: 0003804
2020-02-14 02:58 teka74 Note Added: 0003814
2020-02-14 02:58 teka74 Status feedback => assigned
2020-02-18 14:09 RSmit Note Added: 0003824
2020-02-19 00:44 teka74 Note Added: 0003834
2020-02-19 00:44 teka74 Note Edited: 0003814
2020-02-19 00:46 teka74 Note Edited: 0003814
2020-02-19 08:43 arogge Note Added: 0003835
2020-02-19 08:44 arogge Status assigned => feedback
2020-02-19 10:12 RSmit Note Added: 0003840
2020-02-19 22:51 teka74 Note Added: 0003842
2020-02-19 22:51 teka74 Status feedback => assigned
2020-02-26 16:50 arogge Note Added: 0003861
2020-02-26 16:51 arogge Status assigned => feedback
2020-02-29 00:02 teka74 Note Added: 0003881
2020-02-29 00:02 teka74 Status feedback => assigned
2024-03-20 14:54 bruno-at-bareos Status assigned => closed
2024-03-20 14:54 bruno-at-bareos Resolution open => unable to reproduce
2024-03-20 14:54 bruno-at-bareos Note Added: 0005859