View Issue Details

IDProjectCategoryView StatusLast Update
0000408bareos-coredirectorpublic2015-03-25 19:19
Reporterbk Assigned To 
PrioritynormalSeveritycrashReproducibilityhave not tried
Status closedResolutionfixed 
PlatformLinuxOSUbuntuOS Version14.04
Product Version14.2.2 
Summary0000408: I am trying to do a backup via ndmp. and the director crashes.
Descriptionthe error i get:
...
astrobkup-dir: getmsg.c:135-18 bget_dirmsg 62: Status Job=BackupNDMPdump.2015-01-26_11.37.00_04 JobStatus=70

astrobkup-dir: ndmp_dma.c:2029-18 Storage daemon connection OK
astrobkup-dir: ndmp_dma.c:1249-18 Failed ASSERT: store->password.encoding == p_encoding_clear
BAREOS interrupted by signal 11: Segmentation violation
Kaboom! bareos-dir, astrobkup-dir got signal 11 - Segmentation violation. Attempting traceback.
Kaboom! exepath=/usr/sbin/
Calling: /usr/sbin/btraceback /usr/sbin/bareos-dir 25252 /var/lib/bareos
It looks like the traceback worked...
Dumping: /var/lib/bareos/astrobkup-dir.25252.bactrace
Steps To Reproducein bareos-sd.conf:
NDMP {
 Name = nas1A
 Username = user1
 Password = password1
 Authtype = Clear
}
in bareos-dir.conf:

Client {
  Name = nas1Aclient
  Address = <client ip address>
  Enabled = yes
  Protocol = NDMPv4
  Auth Type = Clear
  Username = user1
  Password = password1
}

TagsNo tags attached.

Relationships

child of 0000393 closed Release bareos-14.2.3 

Activities

mvwieringen

mvwieringen

2015-01-26 13:46

developer   ~0001215

Looks to be a configuration problem. It triggers an ASSERT in the code that
checks that the storage used is actually using the right password encoding
which should be clear text not md5. You probably used the wrong storage e.g.
you need to configure an extra NDMP storage which is paired with the native
storage.

We tried adding quite some ways to make sure a misconfiguration is found and
reported but it seems this config bypasses the current available checks.

The ASSERTS are there to make sure we don't continue with bogus information.

How does your storage config look like ?
bk

bk

2015-01-26 13:53

reporter   ~0001216

in bareos-dir.conf:
# my Storage
Storage {
  Name = NDMPstoragefile
  Address = astrobkup # N.B. Use a fully qualified name here
  Password = "Kro4/r/e7odJfIO0XxVRpuBjuKiWPCQLqAjq5nL59fJ1"
  Media Type = nas26file
  Device = nas26sd
  Protocol = NDMPv4
  Paired Storage = NDMPstoragepaired
  Media type = File
}

# my Storage paired
Storage {
  Name = NDMPstoragepaired
  Address = astrobkup
# Media Type = File
  Media Type = nas26file
  Password = "Kro4/r/e7odJfIO0XxVRpuBjuKiWPCQLqAjq5nL59fJ1"
  #Device = FileStorage
  Device = nas26sd

}
in bareos-sd.conf:
NDMP {
 Name = nas1A
 Username = ndmpnas1A
 Password = ndmppassofnas1A
 Authtype = Clear
}
Device {
  Name = nas26sd
  Media Type = nas26file
# Archive Device = /var/lib/bareos/storage
  Archive Device = /mnt/NAS26/__NDMP__
  Device Type = file
  LabelMedia = yes; # lets Bareos label unlabeled media
  Random Access = yes;
  AutomaticMount = yes; # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Requires Mount = no
}
bk

bk

2015-01-26 14:04

reporter   ~0001217

I try to follow the guide: https://github.com/bareos/bareos/blob/master/README.NDMP

but it isn't helped.
regular backup works fine.
mvwieringen

mvwieringen

2015-01-26 14:14

developer   ~0001218

You didn't follow the examples fully. Your problem is that you specify your
password before you said what protocol the storage is using. As the config
engine determines how to store a password according to the storage daemon
protocol used it thinks it talking to a native storage daemon as you later on
say its NDMP.

Further more the password for NDMPstoragefile is wrong it should be ndmppassofnas1A as its the NDMP password used by the directors DMA to login into
native SD using the NDMP protocol.

The example says:

Storage {
  Name = NDMPFile
  Address = ... # N.B. Use a fully qualified name here
  Port = 10000
  Protocol = NDMPv4
  Auth Type = Clear # Clear == Clear Text, MD5 == Challenge protocol
  Username = ndmp # username of the NDMP user on the TAPE AGENT e.g. the Bareos SD but accessed via the NDMP protocol.
  Password = test # password of the NDMP user on the TAPE AGENT e.g. the Bareos SD but accessed via the NDMP protocol.
  Device = FileStorage
  Media Type = File
  PairedStorage = File
}

#
# This entry gives the DMA in the Director access to the bareos SD via the NDMP protocol.
# This option is used via the NDMP protocol to open the right TAPE AGENT connection to your
# Bareos SD via the NDMP protocol. The initialization of the SD is done via the native protocol
# and is handled via the PairedStorage keyword.
#
Ndmp {
  Name = ...-ndmp-dma # Can be any name but normally you should use the name of the Director here.
  Username = ndmp # Same username as you specified in the NDMPFile storage definition.
  Password = test # Same password as you specified in the NDMPFile storage definition.
  AuthType = Clear # Clear == Clear Text, MD5 == Challenge protocol
}
bk

bk

2015-01-27 08:23

reporter   ~0001225

Ok. This have fixed my problem.
According to what i see the order inside each section is important.
May be it will help other people if you could highlight this in your guide.
(or may be you already did, but i have missed it )

mvwieringen,
Thanks a lot for your help.
mvwieringen

mvwieringen

2015-01-27 09:48

developer   ~0001226

Only the order of the protocol is important as that determines the password
encoding. I added two patches one that updates the README.NDMP that the protocol
has to come before the password and added a second patch that validates the
password encoding so you get a fatal error instead of an ASSERT.
mvwieringen

mvwieringen

2015-01-28 09:53

developer   ~0001228

Fix committed to bareos master branch with changesetid 2656.
joergs

joergs

2015-01-30 14:44

developer   ~0001244

Fix committed to bareos bareos-14.2 branch with changesetid 2694.
mvwieringen

mvwieringen

2015-03-25 16:51

developer   ~0001443

Fix committed to bareos2015 bareos-14.2 branch with changesetid 4456.
joergs

joergs

2015-03-25 19:19

developer   ~0001595

Due to the reimport of the Github repository to bugs.bareos.org, the status of some tickets have been changed. These tickets will be closed again.
Sorry for the noise.

Related Changesets

bareos: master 85a312b1

2015-01-26 15:23

mvwieringen

Ported: N/A

Details Diff
Explitly check password encoding for NDMP resources.

If you define for a client or storage daemon the protocol after you
configured the password it will store the password using the wrong
encoding as at the time of parsing it still thinks you will be using the
native protocol.

Fixes 0000408: Director crashes on password encoding for NDMP storage.
Affected Issues
0000408
mod - src/dird/ndmp_dma.c Diff File

bareos: bareos-14.2 c5077fa2

2015-01-26 15:23

mvwieringen


Committer: joergs

Ported: N/A

Details Diff
Explitly check password encoding for NDMP resources.

If you define for a client or storage daemon the protocol after you
configured the password it will store the password using the wrong
encoding as at the time of parsing it still thinks you will be using the
native protocol.

Fixes 0000408: Director crashes on password encoding for NDMP storage.
Affected Issues
0000408
mod - src/dird/ndmp_dma.c Diff File

bareos2015: bareos-14.2 10f6fd63

2015-01-26 15:23

mvwieringen

Ported: N/A

Details Diff
Explitly check password encoding for NDMP resources.

If you define for a client or storage daemon the protocol after you
configured the password it will store the password using the wrong
encoding as at the time of parsing it still thinks you will be using the
native protocol.

Fixes 0000408: Director crashes on password encoding for NDMP storage.
Affected Issues
0000408
mod - src/dird/ndmp_dma.c Diff File

Issue History

Date Modified Username Field Change
2015-01-26 10:52 bk New Issue
2015-01-26 10:55 bk File Added: astrobkup-dir.25252.bactrace
2015-01-26 13:46 mvwieringen Note Added: 0001215
2015-01-26 13:47 mvwieringen Status new => feedback
2015-01-26 13:53 bk Note Added: 0001216
2015-01-26 13:53 bk Status feedback => new
2015-01-26 14:04 bk Note Added: 0001217
2015-01-26 14:14 mvwieringen Note Added: 0001218
2015-01-26 14:15 mvwieringen Status new => feedback
2015-01-26 15:08 mvwieringen File Deleted: astrobkup-dir.25252.bactrace
2015-01-27 08:23 bk Note Added: 0001225
2015-01-27 08:23 bk Status feedback => new
2015-01-27 09:48 mvwieringen Note Added: 0001226
2015-01-28 09:53 mvwieringen Changeset attached => bareos master 85a312b1
2015-01-28 09:53 mvwieringen Note Added: 0001228
2015-01-28 09:53 mvwieringen Status new => resolved
2015-01-28 09:53 mvwieringen Resolution open => fixed
2015-01-28 12:23 joergs Relationship added child of 0000393
2015-01-30 14:44 joergs Changeset attached => bareos bareos-14.2 c5077fa2
2015-01-30 14:44 joergs Note Added: 0001244
2015-03-25 16:51 mvwieringen Changeset attached => bareos2015 bareos-14.2 10f6fd63
2015-03-25 16:51 mvwieringen Note Added: 0001443
2015-03-25 19:19 joergs Note Added: 0001595
2015-03-25 19:19 joergs Status resolved => closed