[15:07] <SebastianGrabows> Hi! I'm having some problems to set up an iscsi target on Ubuntu Server 20.04. I've set up the target using targetcli and saved the config. The configuration gets restored after reboot, so everything looks fine there. But although the target is configured to listen on 0.0.0.0:3260 it seems that the server is not listening on port 3260 (at least according to `lsof -i`). Is there something special (like e.g. some service) that has
[15:07] <SebastianGrabows> to be enabled here?
[15:16] <TJ-> SebastianGrabows: is this something you've read? https://ubuntu.com/server/docs/service-iscsi
[15:17] <SebastianGrabows> <TJ- "Sebastian Grabowski: is this som"> Yes, it unfortunately describes only the initiator setup. I'm stuck at configuring the target.
[15:18] <TJ-> oh!
[15:20] <TJ-> SebastianGrabows: can the debian wiki links help? https://wiki.debian.org/SAN/iSCSI
[15:28] <SebastianGrabows> <TJ- "Sebastian Grabowski: can the deb"> Not really. My steps were actually similar to the workflow described there: https://wiki.debian.org/SAN/iSCSI/LIO . The targetcli config looks like this right now: https://paste.ubuntu.com/p/NjjM2dsjxK/ The problem is that the portal isn't listening: https://paste.ubuntu.com/p/73nNy9fFMH/
[15:39] <TJ-> SebastianGrabows: is the service actually running?
[15:40] <TJ-> SebastianGrabows: something like "systemctl status iscsitarget"
[15:48] <SebastianGrabows> <TJ- "Sebastian Grabowski: something l"> These are all services with scsi or target in their names and all are enabled: https://paste.ubuntu.com/p/tG7nHVpvXQ/
[15:51] <TJ-> SebastianGrabows: are they running now, though?
[16:03] <SebastianGrabows> They all run, except of open-iscsi but that shouldn't be a problem because as far as I understand it is used only by initiators.
[16:06] <TJ-> I'm stumped then; network tooling seems to show the process isn't listening so I'd assume it isn't running, so that would be where I'd focus - what is the process name, which service file starts it, what is its status
[16:11] <SebastianGrabows> I think that maybe there shouldn't be a systemd service since LIO is handled by the kernel: https://wiki.archlinux.org/title/ISCSI/LIO
[16:11] <SebastianGrabows> The necessary modules are currently loaded.
[16:14] <TJ-> can you use another system to probe the expected port?
[16:22] <SebastianGrabows> Oh! Probing with nmap shows that the port is actually open! Funny thing that `lsof -i` says otherwise. Sorry for wasting your time on this. Thanks!
[16:24] <TJ-> SebastianGrabows: grrr @ kernel !
[16:24] <TJ-> SebastianGrabows: does 'ss' report the port if lsof doesn't? "sudo ss -tnlp sport = 3260"
[16:27] <SebastianGrabows> <TJ- "Sebastian Grabowski: does 'ss' r"> Yup: https://paste.ubuntu.com/p/Sbg3MvkPG8/
[16:40] <SebastianGrabows> I think I found out why lsof didn't show the port. It seems that lsof looks in /proc/*/fd for sockets. Thus ports opened by the kernel may not show up there. Good to know!
[16:46] <TJ-> SebastianGrabows: yeah, horrible when you get caught out by things like that