On a fresh installed IPA server where I do a backup and restore right after installation I get:
a bytes-like object is required, not 'str' The ipa-restore command failed. See /var/log/iparestore.log for more information
2018-01-23T04:05:29Z DEBUG stderr= 2018-01-23T04:05:29Z DEBUG Creating log directories for dogtag 2018-01-23T04:05:29Z INFO Restoring from userRoot in MY-DOMAIN-TLD 2018-01-23T04:05:29Z DEBUG File "/usr/lib/python3.6/site-packages/ipapython/admintool.py", line 174, in execute return_value = self.run() File "/usr/lib/python3.6/site-packages/ipaserver/install/ipa_restore.py", line 396, in run self.ldif2db(instance, backend, online=options.online) File "/usr/lib/python3.6/site-packages/ipaserver/install/ipa_restore.py", line 554, in ldif2db ldif_parser.parse() File "/usr/lib64/python3.6/site-packages/ldif.py", line 470, in parse return self.parse_entry_records() # parse() File "/usr/lib64/python3.6/site-packages/ldif.py", line 460, in parse_entry_records self.handle(dn,entry) File "/usr/lib/python3.6/site-packages/ipaserver/install/ipa_restore.py", line 130, in handle self.writer.unparse(dn, entry) File "/usr/lib64/python3.6/site-packages/ldif.py", line 210, in unparse self._unparseAttrTypeandValue('dn', dn) File "/usr/lib64/python3.6/site-packages/ldif.py", line 158, in _unparseAttrTypeandValue self._unfold_lines(': '.join([attr_type, attr_value.decode('ascii')])) File "/usr/lib64/python3.6/site-packages/ldif.py", line 121, in _unfold_lines self._output_file.write(line)
2018-01-23T04:05:29Z DEBUG The ipa-restore command failed, exception: TypeError: a bytes-like object is required, not 'str' 2018-01-23T04:05:29Z ERROR a bytes-like object is required, not 'str' 2018-01-23T04:05:29Z ERROR The ipa-restore command failed. See /var/log/iparestore.log for more information
What goes wrong here ?
What version of IPA? Are you using Fedora?
$ rpm -q freeipa-server freeipa-client ipa-server ipa-client 389-ds-base
On 01/23/2018 02:09 AM, Matt . via FreeIPA-users wrote:
On a fresh installed IPA server where I do a backup and restore right after installation I get:
a bytes-like object is required, not 'str' The ipa-restore command failed. See /var/log/iparestore.log for more information
2018-01-23T04:05:29Z DEBUG stderr= 2018-01-23T04:05:29Z DEBUG Creating log directories for dogtag 2018-01-23T04:05:29Z INFO Restoring from userRoot in MY-DOMAIN-TLD 2018-01-23T04:05:29Z DEBUG File "/usr/lib/python3.6/site-packages/ipapython/admintool.py", line 174, in execute return_value = self.run() File "/usr/lib/python3.6/site-packages/ipaserver/install/ipa_restore.py", line 396, in run self.ldif2db(instance, backend, online=options.online) File "/usr/lib/python3.6/site-packages/ipaserver/install/ipa_restore.py", line 554, in ldif2db ldif_parser.parse() File "/usr/lib64/python3.6/site-packages/ldif.py", line 470, in parse return self.parse_entry_records() # parse() File "/usr/lib64/python3.6/site-packages/ldif.py", line 460, in parse_entry_records self.handle(dn,entry) File "/usr/lib/python3.6/site-packages/ipaserver/install/ipa_restore.py", line 130, in handle self.writer.unparse(dn, entry) File "/usr/lib64/python3.6/site-packages/ldif.py", line 210, in unparse self._unparseAttrTypeandValue('dn', dn) File "/usr/lib64/python3.6/site-packages/ldif.py", line 158, in _unparseAttrTypeandValue self._unfold_lines(': '.join([attr_type, attr_value.decode('ascii')])) File "/usr/lib64/python3.6/site-packages/ldif.py", line 121, in _unfold_lines self._output_file.write(line)
2018-01-23T04:05:29Z DEBUG The ipa-restore command failed, exception: TypeError: a bytes-like object is required, not 'str' 2018-01-23T04:05:29Z ERROR a bytes-like object is required, not 'str' 2018-01-23T04:05:29Z ERROR The ipa-restore command failed. See /var/log/iparestore.log for more information
What goes wrong here ?
FreeIPA-users mailing list -- freeipa-users@lists.fedorahosted.org To unsubscribe send an email to freeipa-users-leave@lists.fedorahosted.org
Hi,
Yes Fedora 27, not sure if I had the same on the latest 4.5.4 on F26 as that installed was broked in some strange way without any changes and has kinda the same issue I thought.
What I run now on F27 is:
# rpm -q freeipa-server freeipa-client ipa-server ipa-client 389-ds-base freeipa-server-4.6.1-3.fc27.x86_64 freeipa-client-4.6.1-3.fc27.x86_64 package ipa-server is not installed package ipa-client is not installed 389-ds-base-1.3.7.8-1.fc27.x86_64
On 2018-01-23 12:16, Matt . via FreeIPA-users wrote:
Hi,
Yes Fedora 27, not sure if I had the same on the latest 4.5.4 on F26 as that installed was broked in some strange way without any changes and has kinda the same issue I thought.
What I run now on F27 is:
# rpm -q freeipa-server freeipa-client ipa-server ipa-client 389-ds-base freeipa-server-4.6.1-3.fc27.x86_64 freeipa-client-4.6.1-3.fc27.x86_64 package ipa-server is not installed package ipa-client is not installed 389-ds-base-1.3.7.8-1.fc27.x86_64
Hi Matt,
the bug in ipa-restore has been fixed in https://pagure.io/freeipa/c/68d2fa40bc4a7454b34be4a5392cac3829a37870 in master and was backported to 4.6 branch. We haven't released a new IPA version with the fix, yet. I'll see what we can do about that.
Christian
Hi Christian,
Thanks for the heads up!
I will remove that part of code, that will fix it for the time being!
Cheers,
Matt
freeipa-users@lists.fedorahosted.org