Linux Troubleshooting

dbus daemon fails with undefined

2021-10-26  本文已影响0人  yangqing

报错

Jan 1 01:00:00 hostname NetworkManager[1534]: <warn>  [546.45] ifcfg-eth: dbus: couldn't initialize system bus: Could not connect: Connection refused
Traceback (most recent call last):
File "/usr/bin/firewall-cmd", line 31, in <module>
from firewall.client import FirewallClient, FirewallClientIPSetSettings, \
File "/usr/lib/python3.6/site-packages/firewall/client.py", line 28, in <module>
import dbus.mainloop.glib
File "/usr/lib64/python3.6/site-packages/dbus/__init__.py", line 101, in <module>
from dbus._dbus import Bus, SystemBus, SessionBus, StarterBus
File "/usr/lib64/python3.6/site-packages/dbus/_dbus.py", line 39, in <module>
from dbus.bus import BusConnection
File "/usr/lib64/python3.6/site-packages/dbus/bus.py", line 39, in <module>
from dbus.connection import Connection
File "/usr/lib64/python3.6/site-packages/dbus/connection.py", line 37, in <module>
from dbus.proxies import ProxyObject
File "/usr/lib64/python3.6/site-packages/dbus/proxies.py", line 34, in <module>
from dbus._expat_introspect_parser import process_introspection_data
File "/usr/lib64/python3.6/site-packages/dbus/_expat_introspect_parser.py", line 26, in <module>
from xml.parsers.expat import ParserCreate
File "/usr/lib64/python3.6/xml/parsers/expat.py", line 4, in <module>
from pyexpat import *
ImportError: /usr/lib64/python3.6/lib-dynload/pyexpat.cpython-36m-x86_64-linux-gnu.so: undefined symbol: XML_SetHashSalt

Jan 1 01:00:00 hostname dbus-daemon: /usr/bin/dbus-daemon: symbol lookup error: /usr/bin/dbus-daemon: undefined symbol: XML_SetHashSalt

解决办法1

# 救援模式
chroot /mnt/sysimage

# 删除第三方库
cat /etc/ld.so.conf
cat /etc/ld.so.conf.d/oracle.conf

# 重建ld缓存
ldconfig

# 查看
ldd /usr/bin/dbus-daemon | grep libexpat
reboot

# 如果需要,请更新第三方软件脚本以设置LD_LIBRARY_PATH
export LD_LIBRARY_PATH="/app01/oracle/product/client/12.1/lib"

解决办法2

# 救援模式
chroot /mnt/sysimage

# 告诉始终以优先开始服务systemd/usr/lib64
# 创建一个插入的覆盖变量:DefaultEnvironment
mkdir -p /etc/systemd/system.conf.d
cat > /etc/systemd/system.conf.d/env-oracle.conf << EOF
[Manager]
# Make sure /usr/lib64 takes precedence over paths specified in /etc/ld.so.conf.d
DefaultEnvironment="LD_LIBRARY_PATH=/usr/lib64"
EOF

# 如果您的第三方应用程序使用SYSTEM D服务单元,请创建以下插件
systemctl edit <your service>.service

[Unit]
Environment=/soft/oracle/product/client/12.1/lib

上一篇下一篇

猜你喜欢

热点阅读