View Issue Details

IDProjectCategoryView StatusLast Update
0000806bareos-corefile daemonpublic2023-08-02 19:10
Reporterjoop.martens Assigned Tobruno-at-bareos  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionwon't fix 
PlatformLinuxOSCentOSOS Version7
Product Version17.1.3 
Summary0000806: LDAP plugin fails backup of 2012R2 Active Directory with Fatal error: no type in startBackupFile packet
DescriptionI have successfully setup the LDAP plugin to backup an MS 2012R2 Active Directory according the example configuration file.
The LDAP bind user is a member of the "Domain admins" and "Backup operators" AD groups.

The backup job processes 1858 objects after which it fails with the following error:

JobId 589: Fatal error: fd_plugins.c:722 Command plugin "python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd-ldap:uri=ldap\://XXX.ultra-d.local:basedn=dc=ultra-d,dc=local:bind_dn=cn=backupuser,cn=Users,dc=ultra-d,dc=local:password=XXX": no type in startBackupFile packet.

Restarting the job results in the same issue after the exact same amount of processed objects.
It seems that the plugin is choking on a specific ldap object but the debug information does not provide me any hints about the issue of a specific object. I also don't have any reason to doubt that I have a problem with ldap objects in my Active Directory since that seems to be working all just fine.

If I narrow down the backup to a specific OU that does not seem to contain "problem objects" the backup finishes successful.

I would love to debug this issue further on my specific "problem objects" but since the file daemon debug output does not really provide usable information I have no idea how to debug this issue any further.

I suspect that certain attribute or attribute values are a problem for the LDAP plugin.

Besides fixing the issue that also these objects can be processed successfully it would be nice if "problem" objects would be identified and reported in the joblog.

The issue also occurs with Bareos 16.2.4
Steps To ReproduceRun a LDAP backup of Windows 2012R2 Active Directory using:
Plugin = "python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd-ldap:uri=ldap\\://ldapserver.ultra-d.local:basedn=dc=ultra-d,dc=local:bind_dn=cn=backupuser,cn=Users,dc=ultra-d,dc=local:password=XXX"

Using my AD the issue is 100% reproducible but since it seems to choke on specific ldap objects or attributes I'm afraid that it won't be reproducible on any 2012R2 Active Directory.
Additional InformationPackage information:
bareos-filedaemon-17.1.3.1488745251.926ce8b-1309.1.el7.x86_64
bareos-filedaemon-ldap-python-plugin-17.1.3.1488745251.926ce8b-1309.1.el7.x86_64
python-2.7.5-48.el7.x86_64
python-ldap-2.4.15-2.el7.x86_64

Debug output of the filedaemon (bareos-fd -f -d999):

sclsnl01-008-fd (300): backup.c:1450-589 >stored: attr len=181: 1857 5 @LDAP/DC=local/DC=ultra-d/OU=Domain organizations/OU=StreamTV Networks/OU=GlobalGroups/CN=GG_FG_StreamTV_ContentTeam/
sclsnl01-008-fd (150): backup.c:761-589 type=5 do_read=0
sclsnl01-008-fd (150): fd_plugins.c:1041-589 send_plugin_name=python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd-ldap:uri=ldap\://scwsnl01-002.ultra-d.local:basedn=dc=ultra-d,dc=local:bind_dn=cn=backupuser,cn=Users,dc=ultra-d,dc=local:password=XXX
sclsnl01-008-fd (150): fd_plugins.c:1050-589 send plugin name hdr: 1857 26 0
sclsnl01-008-fd (150): fd_plugins.c:1067-589 send plugin start/end: 1857 0
sclsnl01-008-fd (100): python-fd.c:2741-589 python-fd: BareosFdPluginLDAP:end_backup_file() called
sclsnl01-008-fd (100): python-fd.c:2741-589 python-fd: has_next_file(): returning bRC_More
sclsnl01-008-fd (150): fd_plugins.c:711-589 startBackup st_size=7feabb7fd978 st_blocks=7feabb7fd988 sp=7feabb7fd930
sclsnl01-008-fd (100): python-fd.c:2741-589 python-fd: BareosFdPluginLDAP:start_backup_file() called
sclsnl01-008-fd (150): fd_plugins.c:765-589 startBackup returned type=3, fname=@LDAP/DC=local/DC=ultra-d/OU=Domain organizations/OU=StreamTV Networks/OU=GlobalGroups/CN=GG_FG_StreamTV_ContentTeam/data.ldif
sclsnl01-008-fd (130): backup.c:534-589 FT_REG saving: @LDAP/DC=local/DC=ultra-d/OU=Domain organizations/OU=StreamTV Networks/OU=GlobalGroups/CN=GG_FG_StreamTV_ContentTeam/data.ldif
sclsnl01-008-fd (130): backup.c:635-589 filed: sending @LDAP/DC=local/DC=ultra-d/OU=Domain organizations/OU=StreamTV Networks/OU=GlobalGroups/CN=GG_FG_StreamTV_ContentTeam/data.ldif to stored
sclsnl01-008-fd (150): crypto_openssl.c:529-589 crypto_digest_new jcr=7feaac001a68
sclsnl01-008-fd (150): fd_plugins.c:1041-589 send_plugin_name=python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd-ldap:uri=ldap\://scwsnl01-002.ultra-d.local:basedn=dc=ultra-d,dc=local:bind_dn=cn=backupuser,cn=Users,dc=ultra-d,dc=local:password=XXX
sclsnl01-008-fd (150): fd_plugins.c:1050-589 send plugin name hdr: 1858 26 0
sclsnl01-008-fd (150): fd_plugins.c:1067-589 send plugin start/end: 1858 1 1 python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd-ldap:uri=ldap\://scwsnl01-002.ultra-d.local:basedn=dc=ultra-d,dc=local:bind_dn=cn=backupuser,cn=Users,dc=ultra-d,dc=local:password=XXX
sclsnl01-008-fd (300): backup.c:1301-589 encode_and_send_attrs fname=@LDAP/DC=local/DC=ultra-d/OU=Domain organizations/OU=StreamTV Networks/OU=GlobalGroups/CN=GG_FG_StreamTV_ContentTeam/data.ldif
sclsnl01-008-fd (300): backup.c:1318-589 File @LDAP/DC=local/DC=ultra-d/OU=Domain organizations/OU=StreamTV Networks/OU=GlobalGroups/CN=GG_FG_StreamTV_ContentTeam/data.ldif
attribs=A A IHA A A A A TL BAA B BY413G BY413G BY413G A A C
attribsEx=
sclsnl01-008-fd (300): backup.c:1346-589 >stored: attrhdr 1858 1 0sclsnl01-008-fd (200): backup.c:1514-589 No strip for @LDAP/DC=local/DC=ultra-d/OU=Domain organizations/OU=StreamTV Networks/OU=GlobalGroups/CN=GG_FG_StreamTV_ContentTeam/data.ldif
sclsnl01-008-fd (300): backup.c:1450-589 >stored: attr len=190: 1858 3 @LDAP/DC=local/DC=ultra-d/OU=Domain organizations/OU=StreamTV Networks/OU=GlobalGroups/CN=GG_FG_StreamTV_ContentTeam/data.ldif
sclsnl01-008-fd (150): backup.c:761-589 type=3 do_read=1
sclsnl01-008-fd (100): bfile.c:1101-589 bopen: fname @LDAP/DC=local/DC=ultra-d/OU=Domain organizations/OU=StreamTV Networks/OU=GlobalGroups/CN=GG_FG_StreamTV_ContentTeam/data.ldif, flags 0, mode 0, rdev 0
sclsnl01-008-fd (400): bfile.c:1104-589 call plugin_bopen fname=@LDAP/DC=local/DC=ultra-d/OU=Domain organizations/OU=StreamTV Networks/OU=GlobalGroups/CN=GG_FG_StreamTV_ContentTeam/data.ldif
sclsnl01-008-fd (150): fd_plugins.c:1855-589 plugin_bopen flags=0
sclsnl01-008-fd (100): python-fd.c:2741-589 python-fd: BareosFdPluginLDAP:plugin_io() called with function 1
sclsnl01-008-fd (150): fd_plugins.c:1880-589 Return from plugin open status=0
sclsnl01-008-fd (400): bfile.c:1106-589 Plugin bopen stat=0
sclsnl01-008-fd (300): backup.c:1159-589 Saving data, type=3
sclsnl01-008-fd (300): backup.c:1179-589 >stored: datahdr 1858 2 0sclsnl01-008-fd (150): fd_plugins.c:1930-589 plugin_bread
sclsnl01-008-fd (100): python-fd.c:2741-589 python-fd: BareosFdPluginLDAP:plugin_io() called with function 2
sclsnl01-008-fd (130): backup.c:1026-589 Send data to SD len=1227
sclsnl01-008-fd (150): fd_plugins.c:1930-589 plugin_bread
sclsnl01-008-fd (100): python-fd.c:2741-589 python-fd: BareosFdPluginLDAP:plugin_io() called with function 2
sclsnl01-008-fd (400): bfile.c:1182-589 Close file 0
sclsnl01-008-fd (150): fd_plugins.c:1894-589 ===== plugin_bclose
sclsnl01-008-fd (100): python-fd.c:2741-589 python-fd: BareosFdPluginLDAP:plugin_io() called with function 4
sclsnl01-008-fd (150): fd_plugins.c:1916-589 plugin_bclose stat=0
sclsnl01-008-fd (300): backup.c:398-589 filed>stored:header 1858 3 0sclsnl01-008-fd (150): fd_plugins.c:1041-589 send_plugin_name=python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd-ldap:uri=ldap\://scwsnl01-002.ultra-d.local:basedn=dc=ultra-d,dc=local:bind_dn=cn=backupuser,cn=Users,dc=ultra-d,dc=local:password=XXX
sclsnl01-008-fd (150): fd_plugins.c:1050-589 send plugin name hdr: 1858 26 0
sclsnl01-008-fd (150): fd_plugins.c:1067-589 send plugin start/end: 1858 0
sclsnl01-008-fd (100): python-fd.c:2741-589 python-fd: BareosFdPluginLDAP:end_backup_file() called
sclsnl01-008-fd (100): python-fd.c:2741-589 python-fd: has_next_file(): returning bRC_More
sclsnl01-008-fd (150): fd_plugins.c:711-589 startBackup st_size=7feabb7fd978 st_blocks=7feabb7fd988 sp=7feabb7fd930
sclsnl01-008-fd (100): python-fd.c:2741-589 python-fd: BareosFdPluginLDAP:start_backup_file() called
sclsnl01-008-fd (850): message.c:1557-589 Enter Jmsg type=3
sclsnl01-008-fd (800): jcr.c:1005-589 set_jcr_job_status(D_Backup_AD.2017-04-04_10.47.59_23, f)
sclsnl01-008-fd (800): jcr.c:1016-589 OnEntry JobStatus=R newJobstatus=f
sclsnl01-008-fd (800): jcr.c:1026-589 Set new stat. old: R,0 new: f,9
sclsnl01-008-fd (800): jcr.c:1031-589 leave setJobStatus old=R new=f
sclsnl01-008-fd (850): message.c:858-589 Enter dispatch_message type=3 msg=sclsnl01-008-fd JobId 589: Fatal error: fd_plugins.c:722 Command plugin "python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd-ldap:uri=ldap\://scwsnl01-002.ultra-d.local:basedn=dc=ultra-d,dc=local:bind_dn=cn=backupuser,cn=Users,dc=ultra-d,dc=local:password=XXX": no type in startBackupFile packet.
sclsnl01-008-fd (850): message.c:1129-589 DIRECTOR for following msg: sclsnl01-008-fd JobId 589: Fatal error: fd_plugins.c:722 Command plugin "python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd-ldap:uri=ldap\://scwsnl01-002.ultra-d.local:basedn=dc=ultra-d,dc=local:bind_dn=cn=backupuser,cn=Users,dc=ultra-d,dc=local:password=XXX": no type in startBackupFile packet.
sclsnl01-008-fd (800): jcr.c:1005-589 set_jcr_job_status(D_Backup_AD.2017-04-04_10.47.59_23, E)
sclsnl01-008-fd (800): jcr.c:1016-589 OnEntry JobStatus=f newJobstatus=E
sclsnl01-008-fd (100): heartbeat.c:153-589 Send kill to heartbeat id
sclsnl01-008-fd (100): backup.c:185-589 end blast_data ok=0
sclsnl01-008-fd (800): jcr.c:1005-589 set_jcr_job_status(D_Backup_AD.2017-04-04_10.47.59_23, E)
sclsnl01-008-fd (800): jcr.c:1016-589 OnEntry JobStatus=f newJobstatus=E
sclsnl01-008-fd (110): dir_cmd.c:2108-589 Error in blast_data.
sclsnl01-008-fd (150): fd_plugins.c:399-589 plugin_ctx=7feaac002e88 JobId=589
sclsnl01-008-fd (150): fd_plugins.c:201-589 name=<NULL> len=0 plugin=bpipe-fd.so plen=5
sclsnl01-008-fd (150): fd_plugins.c:239-589 Event 4 disabled for this plugin.
sclsnl01-008-fd (150): fd_plugins.c:201-589 name=<NULL> len=0 plugin=python-fd.so plen=6
sclsnl01-008-fd (100): python-fd.c:2741-589 python-fd: handle_plugin_event called with bEventEndBackupJob
sclsnl01-008-fd (150): fd_plugins.c:432-589 Cancel return from generate_plugin_event
sclsnl01-008-fd (100): dir_cmd.c:511-589 Quit command loop. Canceled=1
sclsnl01-008-fd (200): runscript.c:149-589 runscript: running all RUNSCRIPT object (ClientAfterJob) JobStatus=f
sclsnl01-008-fd (110): dir_cmd.c:549-589 End FD msg: 2800 End Job TermCode=102 JobFiles=1858 ReadBytes=1756604 JobBytes=1756604 Errors=1 VSS=0 Encrypt=0

sclsnl01-008-fd (150): fd_plugins.c:1833-589 Free instance fd-plugin_ctx_list=7feaac002e88 JobId=589
sclsnl01-008-fd (580): message.c:519-589 Close_msg jcr=7feaac001a68
sclsnl01-008-fd (500): runscript.c:324-589 runscript: freeing all RUNSCRIPTS object
sclsnl01-008-fd (100): jcr.c:184-589 write_last_jobs seek to 192
sclsnl01-008-fd (580): message.c:519-0 Close_msg jcr=0
sclsnl01-008-fd (850): message.c:549-0 ===Begin close msg resource at 1be7198
sclsnl01-008-fd (850): message.c:663-0 Done walking message chain.
sclsnl01-008-fd (850): message.c:670-0 ===End close msg resource
sclsnl01-008-fd (100): dir_cmd.c:570-0 Done with free_jcr
TagsNo tags attached.

Activities

joop.martens

joop.martens

2018-03-02 13:53

reporter   ~0002937

FYI: Issue still occurs in 17.2.5
bruno-at-bareos

bruno-at-bareos

2023-08-02 19:10

manager   ~0005311

After long wait, I'm closing this bug, as nothing will be changed without either a community code proposal in a formal PR on github, or paying development.
ActiveDirectory being a bit different and special, it will need quite a lot of special handling.

Issue History

Date Modified Username Field Change
2017-04-04 11:54 joop.martens New Issue
2018-03-02 13:53 joop.martens Note Added: 0002937
2023-08-02 19:10 bruno-at-bareos Assigned To => bruno-at-bareos
2023-08-02 19:10 bruno-at-bareos Status new => closed
2023-08-02 19:10 bruno-at-bareos Resolution open => won't fix
2023-08-02 19:10 bruno-at-bareos Note Added: 0005311