AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1334619
Accepted
Jun
Jun
Asked: 2021-04-29 06:06:04 +0800 CST2021-04-29 06:06:04 +0800 CST 2021-04-29 06:06:04 +0800 CST

无法启动 rtslib-fb-targetctl.service

  • 772

我在 ubuntu 18.04 上通过 devstack 安装 openstack。我坚持“无法启动 rtslib-fb-targetctl.service”,有人知道如何解决吗?

+functions-common:apt_get:1109             sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=--force-confold --assume-yes install targetcli-fb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
targetcli-fb is already the newest version (2.1.43-1).
The following package was automatically installed and is no longer required:
  python3-wheel
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3-rtslib-fb (2.1.71-0ubuntu1~cloud0) ...
Failed to start rtslib-fb-targetctl.service: Unit rtslib-fb-targetctl.service is not loaded properly: Exec format error.
See system logs and 'systemctl status rtslib-fb-targetctl.service' for details.
invoke-rc.d: initscript rtslib-fb-targetctl, action "start" failed.
● rtslib-fb-targetctl.service - Restore LIO kernel target configuration
   Loaded: error (Reason: Exec format error)
   Active: inactive (dead)

Apr 28 21:41:20 jun-VirtualBox systemd[1]: /lib/systemd/system/rtslib-fb-targetctl.service:9: Executable path is not absolute: mkdir -p /etc/rtslib-fb-target
Apr 28 21:41:20 jun-VirtualBox systemd[1]: /lib/systemd/system/rtslib-fb-targetctl.service:9: Executable path is not absolute: mkdir -p /etc/rtslib-fb-target
Apr 28 21:41:20 jun-VirtualBox systemd[1]: /lib/systemd/system/rtslib-fb-targetctl.service:9: Executable path is not absolute: mkdir -p /etc/rtslib-fb-target
Apr 28 21:41:59 jun-VirtualBox systemd[1]: /lib/systemd/system/rtslib-fb-targetctl.service:9: Executable path is not absolute: mkdir -p /etc/rtslib-fb-target
Apr 28 21:41:59 jun-VirtualBox systemd[1]: /lib/systemd/system/rtslib-fb-targetctl.service:9: Executable path is not absolute: mkdir -p /etc/rtslib-fb-target
Apr 28 21:41:59 jun-VirtualBox systemd[1]: /lib/systemd/system/rtslib-fb-targetctl.service:9: Executable path is not absolute: mkdir -p /etc/rtslib-fb-target
dpkg: error processing package python3-rtslib-fb (--configure):
 installed python3-rtslib-fb package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of targetcli-fb:
 targetcli-fb depends on python3-rtslib-fb; however:
  Package python3-rtslib-fb is not configured yet.

dpkg: error processing package targetcli-fb (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
 python3-rtslib-fb
 targetcli-fb
E: Sub-process /usr/bin/dpkg returned an error code (1)
+functions-common:apt_get:1                exit_trap
+./stack.sh:exit_trap:503                  local r=100
++./stack.sh:exit_trap:504                  jobs -p
+./stack.sh:exit_trap:504                  jobs=
+./stack.sh:exit_trap:507                  [[ -n '' ]]
+./stack.sh:exit_trap:513                  '[' -f '' ']'
+./stack.sh:exit_trap:518                  kill_spinner
+./stack.sh:kill_spinner:413               '[' '!' -z '' ']'
+./stack.sh:exit_trap:520                  [[ 100 -ne 0 ]]
+./stack.sh:exit_trap:521                  echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:523                  type -p generate-subunit
+./stack.sh:exit_trap:524                  generate-subunit 1619615804 1523 fail
+./stack.sh:exit_trap:526                  [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:529                  /usr/bin/python3.6 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2021-04-28-134208.txt for details
+./stack.sh:exit_trap:538                  exit 100

这是 rtslib-fb-targetctl.service 的内容

root@jun-VirtualBox:/lib/systemd/system# cat rtslib-fb-targetctl.service
[Unit]
Description=Restore LIO kernel target configuration
Requires=sys-kernel-config.mount
After=sys-kernel-config.mount network.target local-fs.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=mkdir -p /etc/rtslib-fb-target
ExecStart=/usr/bin/targetctl restore
ExecStop=/usr/bin/targetctl clear
SyslogIdentifier=target

[Install]
WantedBy=multi-user.target
openstack
  • 1 1 个回答
  • 365 Views

1 个回答

  • Voted
  1. Best Answer
    Rinzwind
    2021-05-01T07:57:55+08:002021-05-01T07:57:55+08:00

    我只看到一件事有问题:您需要在服务中使用绝对路径,因此选择一个编辑器并更改mkdir为/bin/mkdir

    可以通过以下方式进行编辑:

    sudo nano /lib/systemd/system/rtslib-fb-targetctl.service
    

    (或 vi、vim 或 gedit)

    然后检查服务

    systemctl status rtslib-fb-targetctl.service
    

    如果它工作重新加载或停止/启动它

    • 0

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve