进一步阅读

进一步阅读

我在 systemd 中加载 vpp.service 时遇到问题。我写了以下服务。

[Unit]
Description=Vector Packet Processing Process
After=syslog.target network.target auditd.service

[Service]
#ExecStartPre=-/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api
#ExecStartPre=-/sbin/modprobe uio_pci_generic
ExecStart=/usr/IMS/current/bin/vpp/vpp -c /usr/IMS/current/bin/vpp/startup_new.conf
Type=forking
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

我得到以下输出:

vpp.service - Vector Packet Processing Process
   Loaded: loaded (/etc/systemd/system/vpp.service; disabled; vendor preset: disabled)
   Active: deactivating (stop-sigterm) since Tue 2020-01-21 11:34:26 IST; 58s ago
  Process: 2019 ExecStart=/usr/IMS/current/bin/vpp/vpp -c /usr/IMS/current/bin/vpp/startup_new.conf (code=exited, status=0/SUCCESS)
 Main PID: 2019 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/vpp.service
           └─2026 /usr/IMS/current/bin/vpp/vpp -c /usr/IMS/current/bin/vpp/startup_new.conf

Jan 21 11:34:26 2-9.mavenir1.com vpp[2019]: load_one_plugin:189: Loaded plugin: pppoe_plugin.so (PPPoE)
Jan 21 11:34:26 2-9.mavenir1.com vpp[2019]: load_one_plugin:189: Loaded plugin: router_plugin.so (router)
Jan 21 11:34:26 2-9.mavenir1.com vpp[2019]: load_one_plugin:189: Loaded plugin: srv6ad_plugin.so (Dynamic SRv6 proxy)
Jan 21 11:34:26 2-9.mavenir1.com vpp[2019]: load_one_plugin:189: Loaded plugin: srv6am_plugin.so (Masquerading SRv6 proxy)
Jan 21 11:34:26 2-9.mavenir1.com vpp[2019]: load_one_plugin:189: Loaded plugin: srv6as_plugin.so (Static SRv6 proxy)
Jan 21 11:34:26 2-9.mavenir1.com vpp[2019]: load_one_plugin:189: Loaded plugin: stn_plugin.so (VPP Steals the NIC for Container integration)
Jan 21 11:34:26 2-9.mavenir1.com vpp[2019]: load_one_plugin:189: Loaded plugin: svs_plugin.so (Source VRF Select)
Jan 21 11:34:26 2-9.mavenir1.com vpp[2019]: load_one_plugin:189: Loaded plugin: tlsopenssl_plugin.so (openssl based TLS Engine)
Jan 21 11:34:26 2-9.mavenir1.com vpp[2019]: load_one_plugin:117: Plugin disabled (default): unittest_plugin.so
Jan 21 11:34:26 2-9.mavenir1.com vpp[2019]: load_one_plugin:189: Loaded plugin: vmxnet3_plugin.so (VMWare Vmxnet3 Device Plugin)

一段时间后,我想我会像这样崩溃:

[root@2-9 system]# systemctl status vpp
● vpp.service - Vector Packet Processing Process
   Loaded: loaded (/etc/systemd/system/vpp.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

    Jan 21 11:32:20 2-9.mavenir1.com /usr/IMS/current/bin/vpp/vpp[1712]: #2  0x00007f41467cb5aa 0x7f41467cb5aa
    Jan 21 11:32:20 2-9.mavenir1.com /usr/IMS/current/bin/vpp/vpp[1712]: #3  0x00007f414611c5d0 0x7f414611c5d0
    Jan 21 11:32:20 2-9.mavenir1.com /usr/IMS/current/bin/vpp/vpp[1712]: #4  0x00007f4145e8b8d0 0x7f4145e8b8d0
    Jan 21 11:32:20 2-9.mavenir1.com /usr/IMS/current/bin/vpp/vpp[1712]: #5  0x00007f4145e90994 0x7f4145e90994
    Jan 21 11:32:20 2-9.mavenir1.com /usr/IMS/current/bin/vpp/vpp[1712]: #6  0x00007f4145eea984 0x7f4145eea984
    Jan 21 11:32:20 2-9.mavenir1.com /usr/IMS/current/bin/vpp/vpp[1712]: #7  0x00007f414520e5ac 0x7f414520e5ac
    Jan 21 11:32:20 2-9.mavenir1.com /usr/IMS/current/bin/vpp/vpp[1712]: #8  0x00007f41467cb9a7 0x7f41467cb9a7
    Jan 21 11:32:20 2-9.mavenir1.com /usr/IMS/current/bin/vpp/vpp[1712]: #9  0x0000000000406e1a 0x406e1a
    Jan 21 11:32:20 2-9.mavenir1.com /usr/IMS/current/bin/vpp/vpp[1712]: #10 0x00007f41450f4495 0x7f41450f4495
    Jan 21 11:32:20 2-9.mavenir1.com /usr/IMS/current/bin/vpp/vpp[1712]: #11 0x00000000004079ff 0x4079ff

谁能帮我吗 ?

答案1

systemd 没有停止任何事情。 你的守护进程正在退出,并且 systemd 正在清理您所说的辅助剩余进程。

在某种程度上,这是因为您没有按照 VPP doco 规定的方式运行它,即nodaemon在配置文件中有使用Type=simple

而且您只给人们提供了部分堆栈跟踪,没有符号,可以使用早些时候(不是“一段时间后”;读取时间戳)您的守护进程彻底崩溃。世界上没有洞察力的人不可能调试它。

谁能帮我吗 ?

因此,严格来说,这个是非问题的答案是“否”。

进一步阅读

相关内容