Fatal Error in BareosFdWrapper.py

83 views
Skip to first unread message

Stefan Harbich

unread,
Aug 3, 2019, 6:48:26 PM8/3/19
to bareos-users
Hello my dears,
after the current beta release I get the following error message with the LDAP plugin:
...
2019-08-04 00:23:02dsme01-fd JobId 392: Connected Storage daemon at bareos.example.com.de:9103, encryption: TLS_CHACHA20_POLY1305_SHA256
2019-08-04 00:23:02bareos-sd JobId 392: Volume "Full-0031" previously written, moving to end of data.
2019-08-04 00:23:02dsme01-fd JobId 392: Extended attribute support is enabled
2019-08-04 00:23:02bareos-sd JobId 392: Ready to append to end of Volume "Full-0031" size=27934861499
2019-08-04 00:23:02dsme01-fd JobId 392: ACL support is enabled
2019-08-04 00:23:02dsme01-fd JobId 392: Fatal error: python-fd: Traceback (most recent call last):
File "/usr/lib/bareos/plugins/BareosFdWrapper.py", line 62, in plugin_io
return bareos_fd_plugin_object.plugin_io(context, IOP)
File "/usr/lib/bareos/plugins/BareosFdPluginLDAP.py", line 152, in plugin_io
IOP.buf = bytearray(self.ldap.ldif)
TypeError: unicode argument without an encoding

2019-08-04 00:23:02dsme01-fd JobId 392: Error: Read error on file @LDAP/dc=com/dc=example/data.ldif. ERR=Erfolg
2019-08-04 00:23:02bareos-dir JobId 392: Fatal error: Director's comm line to SD dropped.
2019-08-04 00:23:02bareos-dir JobId 392: Error: Bareos bareos-dir 19.1.2 (01Feb19):
Build OS: Linux-4.4.175-89-default debian Debian GNU/Linux 10 (buster)
JobId: 392
Job: backup-ldap.2019-08-04_00.22.59_00
Backup Level: Full
Client: "bareos-fd" 19.1.2 (01Feb19) Linux-4.4.175-89-default,debian,Debian GNU/Linux 10 (buster),Debian_10,x86_64
FileSet: "plugin-ldap" 2019-05-20 22:52:13
Pool: "Full" (From command line)
Catalog: "MyCatalog" (From Client resource)
Storage: "File" (From Job resource)
Scheduled time: 04-Aug-2019 00:22:58
Start time: 04-Aug-2019 00:23:02
End time: 04-Aug-2019 00:23:02
Elapsed time: 0 secs
Priority: 10
FD Files Written: 2
SD Files Written: 0
FD Bytes Written: 0 (0 B)
SD Bytes Written: 191 (191 B)
Rate: 0.0 KB/s
Software Compression: None
VSS: no
Encryption: no
Accurate: no
Volume name(s):
Volume Session Id: 18
Volume Session Time: 1564587101
Last Volume Bytes: 0 (0 B)
Non-fatal FD errors: 3
SD Errors: 0
FD termination status: Fatal Error
SD termination status: Error
Bareos binary info: bareos.org build: Get official binaries and vendor support on bareos.com
Termination: *** Backup Error ***

2019-08-04 00:23:01bareos-dir JobId 392: Start Backup JobId 392, Job=backup-ldap.2019-08-04_00.22.59_00
2019-08-04 00:23:01bareos-dir JobId 392: Connected Storage daemon at bareos.intern.example.com:9103, encryption: TLS_CHACHA20_POLY1305_SHA256
...
Is there already a solution here?
Greetings from Stefan Harbich

Frank Ueberschar

unread,
Aug 5, 2019, 4:43:28 AM8/5/19
to bareos...@googlegroups.com

My dear fellow,

Could you eleminate the suspicion that it was already broken for you on Bareos-18.2?


Am 04.08.19 um 00:48 schrieb Stefan Harbich:
--
You received this message because you are subscribed to the Google Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/32f4da1b-357e-4a5a-9ed2-c724f46945e0%40googlegroups.com.
-- 
Mit freundlichen Grüßen

 Frank Ueberschar                          frank.ue...@bareos.com
 Bareos GmbH & Co. KG                      Phone: +49 221 63 06 93-88
 http://www.bareos.com                     Fax:   +49 221 63 06 93-10

 Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
 Geschäftsführer: Stephan Dühr, M. Außendorf, J. Steffens, P. Storz

Stefan Harbich

unread,
Aug 7, 2019, 6:57:43 PM8/7/19
to bareos-users
No under 18.2 did it work. The odd thing is that an incremental backup works and not a full backup
To unsubscribe from this group and stop receiving emails from it, send an email to bareos...@googlegroups.com.
-- 
Mit freundlichen Grüßen

 Frank Ueberschar                          frank.u...@bareos.com

Stefan Harbich

unread,
Aug 8, 2019, 6:01:10 PM8/8/19
to bareos-users
Even after the current update, the problem persists, incremental backups go through, a full Bachup terminates with errors.
...
dsme01-fd JobId 407: Fatal error: python-fd: Traceback (most recent call last):

File "/usr/lib/bareos/plugins/BareosFdWrapper.py", line 62, in plugin_io
return bareos_fd_plugin_object.plugin_io(context, IOP)
File "/usr/lib/bareos/plugins/BareosFdPluginLDAP.py", line 152, in plugin_io
IOP.buf = bytearray(self.ldap.ldif)
TypeError: unicode argument without an encoding
...

Stefan Harbich

unread,
Aug 8, 2019, 6:47:51 PM8/8/19
to bareos-users
This seems to be a general problem with the LDAP plugin. Even an incremental backup does not work if changes have been made in the LDAP. See log file.
...
bareos-dir JobId 409: Error: Bareos bareos-dir 19.1.2 (01Feb19):

Build OS: Linux-4.4.175-89-default debian Debian GNU/Linux 10 (buster)
JobId: 409
Job: backup-ldap.2019-08-09_00.42.05_18
Backup Level: Incremental, since=2019-08-09 00:24:04
Client: "bareos-fd" 19.1.2.1564991154.12f64126b3 (01Feb19) Linux-5.1.16-300.fc30.x86_64,debian,Debian GNU/Linux 10 (buster),Debian_10,x86_64

FileSet: "plugin-ldap" 2019-05-20 22:52:13
Pool: "Incremental" (From command line)

Catalog: "MyCatalog" (From Client resource)
Storage: "File" (From Job resource)
Scheduled time: 09-Aug-2019 00:42:05
Start time: 09-Aug-2019 00:42:07
End time: 09-Aug-2019 00:42:08
Elapsed time: 1 sec

Priority: 10
FD Files Written: 2
SD Files Written: 0
FD Bytes Written: 0 (0 B)
SD Bytes Written: 281 (281 B)

Rate: 0.0 KB/s
Software Compression: None
VSS: no
Encryption: no
Accurate: no
Volume name(s):
Volume Session Id: 5
Volume Session Time: 1565276888

Last Volume Bytes: 0 (0 B)
Non-fatal FD errors: 3
SD Errors: 0
FD termination status: Fatal Error
SD termination status: Running

Bareos binary info: bareos.org build: Get official binaries and vendor support on bareos.com
Termination: *** Backup Error ***

2019-08-09 00:42:07bareos-dir JobId 409: Start Backup JobId 409, Job=backup-ldap.2019-08-09_00.42.05_18
2019-08-09 00:42:07bareos-dir JobId 409: Connected Storage daemon at bareos.intern.harnet.de:9103, encryption: TLS_CHACHA20_POLY1305_SHA256
2019-08-09 00:42:07bareos-dir JobId 409: Using Device "FileStorage" to write.
2019-08-09 00:42:07bareos-dir JobId 409: Connected Client: bareos-fd at dsme01.intern.harnet.de:9102, encryption: TLS_CHACHA20_POLY1305_SHA256
2019-08-09 00:42:07bareos-dir JobId 409: Handshake: Immediate TLS2019-08-09 00:42:07bareos-dir JobId 409: Encryption: TLS_CHACHA20_POLY1305_SHA256
2019-08-09 00:42:07dsme01-fd JobId 409: Connected Storage daemon at bareos.intern.harnet.de:9103, encryption: TLS_CHACHA20_POLY1305_SHA256
2019-08-09 00:42:07dsme01-fd JobId 409: Extended attribute support is enabled
2019-08-09 00:42:07dsme01-fd JobId 409: ACL support is enabled
2019-08-09 00:42:07bareos-sd JobId 409: Volume "Incremental-0011" previously written, moving to end of data.
2019-08-09 00:42:07bareos-sd JobId 409: Ready to append to end of Volume "Incremental-0011" size=3576814041
2019-08-09 00:42:07dsme01-fd JobId 409: Fatal error: python-fd: Traceback (most recent call last):

File "/usr/lib/bareos/plugins/BareosFdWrapper.py", line 62, in plugin_io
return bareos_fd_plugin_object.plugin_io(context, IOP)
File "/usr/lib/bareos/plugins/BareosFdPluginLDAP.py", line 152, in plugin_io
IOP.buf = bytearray(self.ldap.ldif)
TypeError: unicode argument without an encoding

2019-08-09 00:42:07dsme01-fd JobId 409: Error: Read error on file @LDAP/dc=de/dc=harnet/ou=dns/dlzZoneName=intern.harnet.de/dlzHostName=oscp/data.ldif. ERR=Erfolg
...

Frank Ueberschar

unread,
Aug 9, 2019, 4:17:02 AM8/9/19
to bareos...@googlegroups.com

Which Python version?


Am 08.08.19 um 00:57 schrieb Stefan Harbich:
To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/910aa7d4-9814-418a-a590-54062b6fe34a%40googlegroups.com.

Message has been deleted

Stefan Harbich

unread,
Aug 9, 2019, 8:22:07 AM8/9/19
to bareos-users
stefan.harbich@dsme01:~$ sudo dpkg -l python
[sudo] Passwort für stefan.harbich: 
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name           Version      Architektur  Beschreibung
+++-==============-============-============-=================================================================
ii  python         2.7.16-1     amd64        interactive high-level object-oriented language (Python2 version)


Am Freitag, 9. August 2019 10:17:02 UTC+2 schrieb Frank Ueberschar:

Which Python version?

Stefan Harbich

unread,
Aug 13, 2019, 4:21:38 PM8/13/19
to bareos-users

Hello Frank,
I have updated to the current testing version. The problem is still there.

Stefan Harbich

unread,
Aug 22, 2019, 2:07:52 AM8/22/19
to bareos-users
Hello Frank,

after update to the version 19.1.2.1566400418..21ec094990-204.100 amd64 the same error.


Am Dienstag, 13. August 2019 22:21:38 UTC+2 schrieb Stefan Harbich:

Stefan Harbich

unread,
Sep 4, 2019, 8:59:48 AM9/4/19
to bareos-users
Hi,
isn't there a solution to this problem?
Greats Stefan

Stefan Harbich

unread,
Sep 7, 2019, 10:17:00 AM9/7/19
to bareos-users
Hi,
i found the solution.

/usr/lib/bareos/plugins/BareosFdPluginLDAP.py
Please change Line 152 from old:
IOP.buf = bytearray(self.ldap.ldif)

to new:

IOP.buf = bytearray((self.ldap.ldif), 'utf8')

Greats by Stefan Harbich

Stefan Harbich

unread,
Feb 26, 2020, 3:05:20 PM2/26/20
to bareos-users
Hi there,
why was the solution not yet fixed in version 19.2.6-2?
Greetings from Stefan Harbich

Andreas Rogge

unread,
Feb 27, 2020, 6:13:06 AM2/27/20
to bareos...@googlegroups.com
Am 26.02.20 um 21:05 schrieb Stefan Harbich:
> why was the solution not yet fixed in version 19.2.6-2?
Because nobody opened a Pull-Request for that and as such the change
never made it to the master branch. Also there is no automated test for
your change and you did not explain how this change works, what it does,
why it is necessary and what side-effects it might have.
Even if your change made it into the master branch, it needs to be
backported into the 19.2 branch to end up in a 19.2 release.

If you want your change in Bareos, prepare a patch as described in the
developer guide[1] and tell us why this change is a good idea and why
this doesn't break anything else.
An optimal set of patches contains an automated test (a unittest or a
systemtest) that demonstrates the problem and shows that the bugfix
works correctly.

TL;DR
- mentioning "change X to Y" in a mailinglist-thread is not a patch
- "works on my machine" is not what we consider sufficient QA

Best Regards,
Andreas

[1] https://docs.bareos.org/DeveloperGuide/generaldevel.html#patches
--
Andreas Rogge andrea...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221-630693-86
http://www.bareos.com

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: S. Dühr, M. Außendorf, J. Steffens, Philipp Storz

signature.asc
Reply all
Reply to author
Forward
0 new messages