Zypper:系统管理已锁定

Zypper:系统管理已锁定

我在更新 SLES 12.5 服务器时遇到问题。由于另一个 zypper 进程已经在运行,Zypper 可能无法工作:

# zypper lu
System management is locked by the application with pid 25074 (zypper).
Close this application before trying again.

如果我再试一次,PID 就会改变:

# zypper lu
System management is locked by the application with pid 27117(zypper).
Close this application before trying again.

如果我尝试杀死 27117,它不起作用,因为它不再存在:

# kill 27117
bash: kill: (27117) - No such process

PID 存储在

# cat /var/run/zypp.pid
31776

同样,如果我重复该命令,我会得到不同的 PID:

# cat /var/run/zypp.pid
525

这是我发出命令时 zypper.log 的样子zypper lu

2023-10-10 22:10:52 <1> myhostname(27119) [zypper] main.cc(main):97 ===== Hi, me zypper 1.13.64
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] main.cc(main):98 ===== 'zypper' 'lu' =====
2023-10-10 22:10:52 <1> myhostname(27119) [zconfig] ZConfig.cc(_autodetectSystemArchitecture):73 Uname architecture is 'x86_64'
2023-10-10 22:10:52 <1> myhostname(27119) [zconfig] ZConfig.cc(_autodetectTextLocale):209 Default text locale is 'en'
2023-10-10 22:10:52 <1> myhostname(27119) [zconfig] ZConfig.cc(Impl):343 libzypp: 16.22.8
2023-10-10 22:10:52 <1> myhostname(27119) [zypp] IniParser.cc(parse):84 Start parsing /etc/zypp/zypp.conf[g___]
2023-10-10 22:10:52 <1> myhostname(27119) [zypp] IniParser.cc(parse):138 Done parsing /etc/zypp/zypp.conf[_eF_]
2023-10-10 22:10:52 <1> myhostname(27119) [Progress++] ProgressData.cc(report):88 {#1|/etc/zypp/zypp.conf}END
2023-10-10 22:10:52 <1> myhostname(27119) [zconfig] ZConfig.cc(Impl):621 ZConfig singleton created.
2023-10-10 22:10:52 <1> myhostname(27119) [zconfig] ZConfig.cc(ZConfig):821 libzypp: 16.22.8
2023-10-10 22:10:52 <1> myhostname(27119) [zconfig] ZConfig.cc(ZConfig):821 libsolv: 0.6.39
2023-10-10 22:10:52 <1> myhostname(27119) [zconfig] ZConfig.cc(ZConfig):821 zypp.conf: '/etc/zypp/zypp.conf'
2023-10-10 22:10:52 <1> myhostname(27119) [zconfig] ZConfig.cc(ZConfig):821 TextLocale: 'en' (en)
2023-10-10 22:10:52 <1> myhostname(27119) [zconfig] ZConfig.cc(ZConfig):821 SystemArchitecture: 'x86_64' (x86_64)
2023-10-10 22:10:52 <1> myhostname(27119) [zypp] PathInfo.cc(assert_dir):354 mkdir /var/tmp/zypp.hVcxMA/zypper 00755
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Zypper.cc(Zypper):552 Zypper instance created.
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] media.h(MediaCallbacks):182 Set media callbacks..
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Zypper.cc(processGlobalOptions):891 START
2023-10-10 22:10:52 <5> myhostname(27119) [Measure] Measure.cc(log):178 START MEASURE(ReadConfig)
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Augeas.cc(Augeas):21 Going to read zypper config using Augeas...
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Augeas.cc(Augeas):103 Done reading conf files:
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Augeas.cc(Augeas):108 user conf read: no
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Augeas.cc(Augeas):109 global conf read: yes
2023-10-10 22:10:52 <5> 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 <5> 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 <1> myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1019 Verbosity 1
2023-10-10 22:10:52 <1> myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1020 Output type 1
2023-10-10 22:10:52 <1> myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1280 repos.d dir = /etc/zypp/repos.d
2023-10-10 22:10:52 <1> myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1281 cache dir = /var/cache/zypp
2023-10-10 22:10:52 <1> myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1282 raw cache dir = /var/cache/zypp/raw
2023-10-10 22:10:52 <1> myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1283 solv cache dir = /var/cache/zypp/solv
2023-10-10 22:10:52 <1> myhostname(27119) [zypper++] Zypper.cc(processGlobalOptions):1284 package cache dir = /var/cache/zypp/packages
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Zypper.cc(processGlobalOptions):1296 Repositories enabled
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Zypper.cc(processGlobalOptions):1414 DONE
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Zypper.cc(processCommandOptions):1606 START
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Zypper.cc(processCommandOptions):3536 Done parsing options.
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Zypper.cc(processCommandOptions):3555 Done
2023-10-10 22:10:52 <1> myhostname(27119) [zypp] ZYppFactory.cc(_openLockFile):168 Open lockfile /var/run/zypp.pid
2023-10-10 22:10:52 <1> 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 <1> myhostname(27119) [zypp] ZYppFactory.cc(isProcessRunning):195 Checking /proc/27117{d 0555 0/0}
2023-10-10 22:10:52 <1> myhostname(27119) [zypp++] ZYppFactory.cc(isProcessRunning):209 Is running: zypper
2023-10-10 22:10:52 <2> myhostname(27119) [zypp] ZYppFactory.cc(zyppLocked):270 27117 is running and has a ZYpp lock. Sorry.
2023-10-10 22:10:52 <1> myhostname(27119) [zypp] ZYppFactory.cc(_closeLockFile):186 Close lockfile /var/run/zypp.pid
2023-10-10 22:10:52 <5> 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 <5> myhostname(27119) [zypp] Exception.cc(log):166 Close this application before trying again.
2023-10-10 22:10:52 <5> 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 <5> myhostname(27119) [zypp] Exception.cc(log):166 Close this application before trying again.
2023-10-10 22:10:52 <3> myhostname(27119) [zypper] Zypper.cc(assertZYppPtrGod):303 A ZYpp transaction is already in progress.
2023-10-10 22:10:52 <2> myhostname(27119) [zypper] Zypper.h(setExitCode):250 setExitCode 7
2023-10-10 22:10:52 <5> myhostname(27119) [zypp] Exception.cc(log):166 Zypper.cc(assertZYppPtrGod):307 THROW:    ZYpp locked
2023-10-10 22:10:52 <5> myhostname(27119) [zypp] Exception.cc(log):166 Zypper.cc(safeDoCommand):1582 CAUGHT:   ZYpp locked
2023-10-10 22:10:52 <2> myhostname(27119) [zypper] Zypper.cc(safeDoCommand):1583 Caught exit request: exitCode 7
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Zypper.cc(cleanup):5575 START
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] main.cc(~Bye):82 ===== Exiting main() =====
2023-10-10 22:10:52 <1> myhostname(27119) [zypper] Zypper.cc(~Zypper):559 Zypper instance destroyed. Bye!
2023-10-10 22:10:52 <1> myhostname(27119) [zypp] PathInfo.cc(recursive_rmdir):435 recursive_rmdir /var/tmp/zypp.hVcxMA
2023-10-10 22:10:52 <1> myhostname(27119) [zypp++] TmpPath.cc(~Impl):78 TmpPath cleaned up /var/tmp/zypp.hVcxMA{d 0700 0/0}

知道这里会发生什么吗?我过去通过重新启动解决了这个问题,但我想找到一个更好的、不那么激烈的解决方案。

相关内容