Sample Header Ad - 728x90

Zypper: System management is locked

0 votes
1 answer
2547 views
I am having trouble updating a SLES 12.5 server. Zypper is not working supposedly due to another zypper process already running:
# zypper lu
System management is locked by the application with pid 25074 (zypper).
Close this application before trying again.
If I try again, the PID changes:
# zypper lu
System management is locked by the application with pid 27117(zypper).
Close this application before trying again.
If I try to kill 27117, it doesn't work as it is not there anymore:
# kill 27117
bash: kill: (27117) - No such process
The PID is stored in
# cat /var/run/zypp.pid
31776
and here too, if I repeat the command, I get a different PID:
# cat /var/run/zypp.pid
525
This is what zypper.log looks like when I issue a zypper lu command:
2023-10-10 22:10:52  myhostname(27119) [zypper] main.cc(main):97 ===== Hi, me zypper 1.13.64
2023-10-10 22:10:52  myhostname(27119) [zypper] main.cc(main):98 ===== 'zypper' 'lu' =====
2023-10-10 22:10:52  myhostname(27119) [zconfig] ZConfig.cc(_autodetectSystemArchitecture):73 Uname architecture is 'x86_64'
2023-10-10 22:10:52  myhostname(27119) [zconfig] ZConfig.cc(_autodetectTextLocale):209 Default text locale is 'en'
2023-10-10 22:10:52  myhostname(27119) [zconfig] ZConfig.cc(Impl):343 libzypp: 16.22.8
2023-10-10 22:10:52  myhostname(27119) [zypp] IniParser.cc(parse):84 Start parsing /etc/zypp/zypp.conf[g___]
2023-10-10 22:10:52  myhostname(27119) [zypp] IniParser.cc(parse):138 Done parsing /etc/zypp/zypp.conf[_eF_]
2023-10-10 22:10:52  myhostname(27119) [Progress++] ProgressData.cc(report):88 {#1|/etc/zypp/zypp.conf}END
2023-10-10 22:10:52  myhostname(27119) [zconfig] ZConfig.cc(Impl):621 ZConfig singleton created.
2023-10-10 22:10:52  myhostname(27119) [zconfig] ZConfig.cc(ZConfig):821 libzypp: 16.22.8
2023-10-10 22:10:52  myhostname(27119) [zconfig] ZConfig.cc(ZConfig):821 libsolv: 0.6.39
2023-10-10 22:10:52  myhostname(27119) [zconfig] ZConfig.cc(ZConfig):821 zypp.conf: '/etc/zypp/zypp.conf'
2023-10-10 22:10:52  myhostname(27119) [zconfig] ZConfig.cc(ZConfig):821 TextLocale: 'en' (en)
2023-10-10 22:10:52  myhostname(27119) [zconfig] ZConfig.cc(ZConfig):821 SystemArchitecture: 'x86_64' (x86_64)
2023-10-10 22:10:52  myhostname(27119) [zypp] PathInfo.cc(assert_dir):354 mkdir /var/tmp/zypp.hVcxMA/zypper 00755
2023-10-10 22:10:52  myhostname(27119) [zypper] Zypper.cc(Zypper):552 Zypper instance created.
2023-10-10 22:10:52  myhostname(27119) [zypper] media.h(MediaCallbacks):182 Set media callbacks..
2023-10-10 22:10:52  myhostname(27119) [zypper] Zypper.cc(processGlobalOptions):891 START
2023-10-10 22:10:52  myhostname(27119) [Measure] Measure.cc(log):178 START MEASURE(ReadConfig)
2023-10-10 22:10:52  myhostname(27119) [zypper] Augeas.cc(Augeas):21 Going to read zypper config using Augeas...
2023-10-10 22:10:52  myhostname(27119) [zypper] Augeas.cc(Augeas):103 Done reading conf files:
2023-10-10 22:10:52  myhostname(27119) [zypper] Augeas.cc(Augeas):108 user conf read: no
2023-10-10 22:10:52  myhostname(27119) [zypper] Augeas.cc(Augeas):109 global conf read: yes
2023-10-10 22:10:52  myhostname(27119) [Measure] Measure.cc(log):178 ELAPSED(ReadConfig) 0 (u 0.01 s 0.00 c 0.00)
2023-10-10 22:10:52  myhostname(27119) [Measure] Measure.cc(log):178 MEASURE(ReadConfig) 0 (u 0.01 s 0.00 c 0.00) [0 (u 0.00 s 0.00 c 0.00)]
2023-10-10 22:10:52  myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1019 Verbosity 1
2023-10-10 22:10:52  myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1020 Output type 1
2023-10-10 22:10:52  myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1280 repos.d dir = /etc/zypp/repos.d
2023-10-10 22:10:52  myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1281 cache dir = /var/cache/zypp
2023-10-10 22:10:52  myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1282 raw cache dir = /var/cache/zypp/raw
2023-10-10 22:10:52  myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1283 solv cache dir = /var/cache/zypp/solv
2023-10-10 22:10:52  myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1284 package cache dir = /var/cache/zypp/packages
2023-10-10 22:10:52  myhostname(27119) [zypper] Zypper.cc(processGlobalOptions):1296 Repositories enabled
2023-10-10 22:10:52  myhostname(27119) [zypper] Zypper.cc(processGlobalOptions):1414 DONE
2023-10-10 22:10:52  myhostname(27119) [zypper] Zypper.cc(processCommandOptions):1606 START
2023-10-10 22:10:52  myhostname(27119) [zypper] Zypper.cc(processCommandOptions):3536 Done parsing options.
2023-10-10 22:10:52  myhostname(27119) [zypper] Zypper.cc(processCommandOptions):3555 Done
2023-10-10 22:10:52  myhostname(27119) [zypp] ZYppFactory.cc(_openLockFile):168 Open lockfile /var/run/zypp.pid
2023-10-10 22:10:52  myhostname(27119) [zypp] ZYppFactory.cc(readLockFile):223 read: Lockfile /var/run/zypp.pid has pid 27117 (our pid: 27119)
2023-10-10 22:10:52  myhostname(27119) [zypp] ZYppFactory.cc(isProcessRunning):195 Checking /proc/27117{d 0555 0/0}
2023-10-10 22:10:52  myhostname(27119) [zypp++] ZYppFactory.cc(isProcessRunning):209 Is running: zypper
2023-10-10 22:10:52  myhostname(27119) [zypp] ZYppFactory.cc(zyppLocked):270 27117 is running and has a ZYpp lock. Sorry.
2023-10-10 22:10:52  myhostname(27119) [zypp] ZYppFactory.cc(_closeLockFile):186 Close lockfile /var/run/zypp.pid
2023-10-10 22:10:52  myhostname(27119) [zypp] Exception.cc(log):166 ZYppFactory.cc(getZYpp):404 THROW:    System management is locked by the application with pid 27117 (zypper).
2023-10-10 22:10:52  myhostname(27119) [zypp] Exception.cc(log):166 Close this application before trying again.
2023-10-10 22:10:52  myhostname(27119) [zypp] Exception.cc(log):166 Zypper.cc(assertZYppPtrGod):267 CAUGHT:   System management is locked by the application with pid 27117 (zypper).
2023-10-10 22:10:52  myhostname(27119) [zypp] Exception.cc(log):166 Close this application before trying again.
2023-10-10 22:10:52  myhostname(27119) [zypper] Zypper.cc(assertZYppPtrGod):303 A ZYpp transaction is already in progress.
2023-10-10 22:10:52  myhostname(27119) [zypper] Zypper.h(setExitCode):250 setExitCode 7
2023-10-10 22:10:52  myhostname(27119) [zypp] Exception.cc(log):166 Zypper.cc(assertZYppPtrGod):307 THROW:    ZYpp locked
2023-10-10 22:10:52  myhostname(27119) [zypp] Exception.cc(log):166 Zypper.cc(safeDoCommand):1582 CAUGHT:   ZYpp locked
2023-10-10 22:10:52  myhostname(27119) [zypper] Zypper.cc(safeDoCommand):1583 Caught exit request: exitCode 7
2023-10-10 22:10:52  myhostname(27119) [zypper] Zypper.cc(cleanup):5575 START
2023-10-10 22:10:52  myhostname(27119) [zypper] main.cc(~Bye):82 ===== Exiting main() =====
2023-10-10 22:10:52  myhostname(27119) [zypper] Zypper.cc(~Zypper):559 Zypper instance destroyed. Bye!
2023-10-10 22:10:52  myhostname(27119) [zypp] PathInfo.cc(recursive_rmdir):435 recursive_rmdir /var/tmp/zypp.hVcxMA
2023-10-10 22:10:52  myhostname(27119) [zypp++] TmpPath.cc(~Impl):78 TmpPath cleaned up /var/tmp/zypp.hVcxMA{d 0700 0/0}
Any idea of what could be going on here? I have solved this in the past by rebooting, but I want to find a better, not so drastic solution. **UPDATE**: I never found the solution, but I found a rude workaround. Since the PID keeps changing that means that after a process closes and before the new one is spawn, there is a time gap where I can run zypper lu. So I just try again and again until I hit that gap and it works just fine.
Asked by gdelfino (113 rep)
Oct 10, 2023, 08:27 PM
Last activity: Jul 8, 2025, 12:00 AM