open-iscsi / open-iscsi

iSCSI tools for Linux
GNU General Public License v2.0
540 stars 249 forks source link

iscsid.service failed to start #406

Closed BillyChen1 closed 1 year ago

BillyChen1 commented 1 year ago

Environment OS: Ubuntu 20.04 architecture: arm64 open-iscsi version: 2.0.874-7.1ubuntu6.2

firefly@node31:~$ uname -a
Linux node31 5.10.110 #4 SMP Fri Mar 10 19:20:02 CST 2023 aarch64 aarch64 aarch64 GNU/Linux

After I installed open-iscsi by apt-get, iscsid.service failed to start. Here I have some information that may be helpful.

firefly@node31:~$ sudo cat /etc/iscsi/initiatorname.iscsi
## DO NOT EDIT OR REMOVE THIS FILE!
## If you remove this file, the iSCSI daemon will not start.
## If you change the InitiatorName, existing access control lists
## may reject this initiator.  The InitiatorName must be unique
## for each iSCSI initiator.  Do NOT duplicate iSCSI InitiatorNames.
InitiatorName=iqn.1993-08.org.debian:01:faabd15c62aa
firefly@node31:~$ systemctl status iscsid
● iscsid.service - iSCSI initiator daemon (iscsid)
     Loaded: loaded (/lib/systemd/system/iscsid.service; enabled; vendor preset: enabled)
     Active: failed (Result: timeout) since Mon 2023-03-20 16:08:12 CST; 14min ago
TriggeredBy: ● iscsid.socket
       Docs: man:iscsid(8)
    Process: 215587 ExecStartPre=/lib/open-iscsi/startup-checks.sh (code=exited, status=0/SUCCESS)
    Process: 215590 ExecStart=/sbin/iscsid (code=exited, status=0/SUCCESS)

Mar 20 16:06:42 node31 systemd[1]: Starting iSCSI initiator daemon (iscsid)...
Mar 20 16:06:42 node31 iscsid[215590]: iSCSI logger with pid=215591 started!
Mar 20 16:06:42 node31 systemd[1]: iscsid.service: Failed to parse PID from file /run/iscsid.pid: Invalid argument
Mar 20 16:06:42 node31 iscsid[215591]: iSCSI daemon with pid=215592 started!
Mar 20 16:06:42 node31 iscsid[215591]: can not create NETLINK_ISCSI socket
Mar 20 16:08:12 node31 systemd[1]: iscsid.service: start operation timed out. Terminating.
Mar 20 16:08:12 node31 systemd[1]: iscsid.service: Failed with result 'timeout'.
Mar 20 16:08:12 node31 systemd[1]: Failed to start iSCSI initiator daemon (iscsid).

When I listed kernel modules related to scsi, I got nothing.

firefly@node31:~$ lsmod | grep iscsi
firefly@node31:~$ 
gonzoleeman commented 1 year ago

It looks like iscsid is failing to start because there is another daemon running? The NELINK error can occur when another daemon is running. Also, the error message about /run/iscsid.pid is worrying.

BillyChen1 commented 1 year ago

After I recompile the kernel with iscsi_tcp and scsi_transport_iscsi modules, iscsid service starts successfully. I find that NELINK error disappears but the error message about /run/iscsid.pid still exists. What are the consequences of this error?

firefly@node31:~$ systemctl status iscsid
● iscsid.service - iSCSI initiator daemon (iscsid)
     Loaded: loaded (/lib/systemd/system/iscsid.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-03-21 13:06:48 CST; 1min 51s ago
TriggeredBy: ● iscsid.socket
       Docs: man:iscsid(8)
    Process: 11785 ExecStartPre=/lib/open-iscsi/startup-checks.sh (code=exited, status=0/SUCCESS)
    Process: 11788 ExecStart=/sbin/iscsid (code=exited, status=0/SUCCESS)
   Main PID: 11790 (iscsid)
      Tasks: 2 (limit: 19106)
     Memory: 1.8M
     CGroup: /system.slice/iscsid.service
             ├─11789 /sbin/iscsid
             └─11790 /sbin/iscsid

Mar 21 13:06:48 node31 systemd[1]: Starting iSCSI initiator daemon (iscsid)...
Mar 21 13:06:48 node31 iscsid[11788]: iSCSI logger with pid=11789 started!
Mar 21 13:06:48 node31 systemd[1]: iscsid.service: Failed to parse PID from file /run/iscsid.pid: Invalid argument
Mar 21 13:06:48 node31 systemd[1]: Started iSCSI initiator daemon (iscsid).
Mar 21 13:06:49 node31 iscsid[11789]: iSCSI daemon with pid=11790 started!
firefly@node31:~$ sudo cat /run/iscsid.pid 
11790