Bug 1180417

Summary: zypper as root fails with "unexpected exception"
Product: [SUSE Linux Enterprise Server] PUBLIC SUSE Linux Enterprise Server 15 SP3 Reporter: Jason Craig <os-dev>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: os-dev
Version: unspecified   
Target Milestone: unspecified   
Hardware: x86-64   
OS: SLES 15   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: output of sudo -i zypper lu
snippet of /var/log/zypper.log

Description Jason Craig 2020-12-28 20:03:36 UTC
Created attachment 844730 [details]
output of sudo -i zypper lu

I am trying to run zypper lu, zypper re or zypper up and they all fail with messages similar to the attached. When run as a non-root user it runs fine, but obviously there are only a few commands that can be run (and not the refresh). I looked at the link given and tried to use ZYPP_LOGFILE but no file is created when running as root and the -vv switch does not given any more detailed output. When it runs successfully as a non-root user a file is created with the ZYPP_LOGFILE var. Reboot did not help.
Comment 1 Michael Andres 2021-01-04 16:16:26 UTC
sudo purges parts of the environment. This is probably the reason why ZYPP_LOGFILE does not work for you.

zypper (as root) per default logs to /var/log/zypper.log. Please attach the file.

It would be helpfull to know whether the zypper commands also fail if you execute then in a real root shell (without sudo).
Comment 2 Jason Craig 2021-01-04 19:48:24 UTC
Created attachment 844824 [details]
snippet of /var/log/zypper.log

By "real root shell without sudo" do you mean su? Yes, in a root shell started with su I get the same issue. Attaching part of log that looked most relevant, let me know if you want more.

Looks like a Python/LXML problem...I found similar issue here: https://www.suse.com/support/kb/doc/?id=000019818
Did someone break Python by compiling with --with-fepctl? That link says there is 
an update, "kindly use 3.6.12-3.70.1 version"...how exactly do I install that when zypper won't run?
Comment 3 Jason Craig 2021-01-05 19:15:20 UTC
Seems to be a duplicate of 1180377.

*** This bug has been marked as a duplicate of bug 1180377 ***
Comment 4 Michael Andres 2021-01-07 09:07:32 UTC
Created related https://github.com/openSUSE/libzypp/issues/280
The failing commands stderr should be propagated to the user.
Comment 5 Jason Craig 2021-01-07 17:36:05 UTC
Heartily agree; that would have helped me debug it myself much sooner.