OpenSolaris

Discussions Communities Projects Download Source Browser

Home » OpenSolaris Forums » storage » discuss

Thread: iscsi with "localhost" connections not working, timeout ?

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 4 - Last Post: Dec 3, 2006 6:06 PM by: mcneal
jkeil

Posts: 2,322
From: DE

Registered: 6/16/05
iscsi with "localhost" connections not working, timeout ?
Posted: Nov 16, 2006 3:48 AM
To: Communities » storage » discuss
  Click to reply to this thread Reply

Is it a bug or a feature that the solaris iscsi initiator isn't able
to connect to an iscsi target on the same machine, using either
the 127.0.0.1 localhost address or the machine's own ip address?

(I was trying to debug a problem with format and disk labels, and
needed a blank disk; I thought I could use an iscsi disk so that I
don't have to install additional hardware)

I'm trying the following:

On the "target node", a box with ip address 172.20.0.11:

[b]

iscsitadm modify admin -d /data/iscsi
iscsitadm create target -z 2G disk

iscsitadm list target -v

Target: disk
iSCSI Name: iqn.1986-03.com.sun:02:fd97496c-f4e6-c33c-aaca-a6b9e197c531.disk Connections: 0
ACL list:
TPGT list:
LUN information:
LUN: 0
GUID: 01000008c7aa83b800002a00455c48ef
VID: SUN
PID: SOLARIS
Type: disk
Size: 2.0G
Status: online

[/b]

Now, on the same box, the following fails:

[b]

iscsiadm modify discovery -s enable
iscsiadm add static-config iqn.1986-03.com.sun:02:fd97496c-f4e6-c33c-aaca-a6b9e197c531.disk,172.20.0.11

[/b]

127.0.0.1 instead of the machine's own ip address doesn't work either.
The "iscsiadm add static-config" hangs for ~ a minute before it returns,
without reporting an error on stdout/stderr. No new (i)scsi disk is available.

/var/adm/messages contains this error message:

Nov 16 12:26:08 tiger2 iscsi: [ID 409607 kern.warning] WARNING: iscsi connection(5) login failed - failed to receive login response - timeout



When I use the same "iscsiadm add static-config " command on
a remote machine, it works just fine.

Why does this work when the initiator is on a remote machine,
but doen't when target and initiator are on the same machine?

AFAICT, the iscsi target daemon iscsitgtd is accepting the
connection from the kernel iscsi module, processes the login
request sent from the kernel iscsi module and sends back a
login reply, but the reply isn't seen by the kernel iscsi module.

mcneal

Posts: 195
From: Boulder, CO

Registered: 3/9/05
Re: iscsi with "localhost" connections not working, timeout ?
Posted: Nov 16, 2006 7:00 AM   in response to: jkeil

  Click to reply to this thread Reply

It's a bug in the initiator that's being fixed.

On Nov 16, 2006, at 4:48 AM, Jürgen Keil wrote:

> Is it a bug or a feature that the solaris iscsi initiator isn't able
> to connect to an iscsi target****the same machine, using either
> the 127.0.0.1 localhost address or the machine's own ip address?
>
> (I was trying to debug a problem with format and disk labels, and
> needed a blank disk; I thought I could use an iscsi disk so that I
> don't have to install additional hardware)
>
> I'm trying the following:
>
> On the "target node", a box with ip address 172.20.0.11:
>
> [b]
>
> iscsitadm modify admin -d /data/iscsi
> iscsitadm create target -z 2G disk
>
> iscsitadm list target -v
>
> Target: disk
> iSCSI Name: iqn.1986-03.com.sun:02:fd97496c-f4e6-c33c-aaca-
> a6b9e197c531.disk Connections: 0
> ACL list:
> TPGT list:
> LUN information:
> LUN: 0
> GUID: 01000008c7aa83b800002a00455c48ef
> VID: SUN
> PID: SOLARIS
> Type: disk
> Size: 2.0G
> Status: online
>
> [/b]
>
> Now, on the same box, the following fails:
>
> [b]
>
> iscsiadm modify discovery -s enable
> iscsiadm add static-config iqn.1986-03.com.sun:02:fd97496c-f4e6-
> c33c-aaca-a6b9e197c531.disk,172.20.0.11
>
> [/b]
>
> 127.0.0.1 instead of the machine's own ip address doesn't work either.
> The "iscsiadm add static-config" hangs for ~ a minute before it
> returns,
> without reporting an error on stdout/stderr. No new (i)scsi disk is
> available.
>
> /var/adm/messages contains this error message:
>
> Nov 16 12:26:08 tiger2 iscsi: [ID 409607 kern.warning] WARNING:
> iscsi connection(5) login failed - failed to receive login response
> - timeout
>
>
>
> When I use the same "iscsiadm add static-config " command on
> a remote machine, it works just fine.
>
> Why does this work when the initiator is on a remote machine,
> but doen't when target and initiator are on the same machine?
>
> AFAICT, the iscsi target daemon iscsitgtd is accepting the
> connection from the kernel iscsi module, processes the login
> request sent from the kernel iscsi module and sends back a
> login reply, but the reply isn't seen by the kernel iscsi module.
>
>
> This message posted from opensolaris.org
> _______________________________________________
> storage-discuss mailing list
> storage-discuss at opensolaris dot org
> http://mail.opensolaris.org/mailman/listinfo/storage-discuss

----
Rick dot McNeal at Sun dot COM

A good friend will come and bail you out of jail...but, a true friend
will be sitting next to you saying, "****...that was fun!"



_______________________________________________
storage-discuss mailing list
storage-discuss at opensolaris dot org
http://mail.opensolaris.org/mailman/listinfo/storage-discuss



jkeil

Posts: 2,322
From: DE

Registered: 6/16/05
Re: iscsi with "localhost" connections not working, timeout ?
Posted: Nov 17, 2006 7:46 AM   in response to: mcneal
To: Communities » storage » discuss
  Click to reply to this thread Reply

> > Is it a bug or a feature that the solaris iscsi initiator isn't able
> > to connect to an iscsi target on the same machine, using either
> > the 127.0.0.1 localhost address or the machine's own ip address?
>
> It's a bug in the initiator that's being fixed.

Is it a problem with the iscsi initiator?

Or is it a "TCP Fusion loopback connection" problem, similar to this one:
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6440123

Btw. I'm now able to work around the problem by disabling
"tcp fusion" in the kernel - after setting do_tcp_fusion = 0,
I can use the iscsi initiator to a local target:

[b]
# iscsitadm list target
Target: disk
iSCSI Name: iqn.1986-03.com.sun:02:fd97496c-f4e6-c33c-aaca-a6b9e197c531.disk Connections: 0

# echo 'do_tcp_fusion/W0' | mdb -wk
do_tcp_fusion: 0x1 = 0x0

# iscsiadm add static-config iqn.1986-03.com.sun:02:fd97496c-f4e6-c33c-aaca-a6b9e197c531.disk,127.0.0.1

# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c0d0 <DEFAULT cyl 36477 alt 2 hd 255 sec 63>
/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0
1. c1d0 <DEFAULT cyl 21886 alt 2 hd 255 sec 63>
/pci@0,0/pci-ide@7,1/ide@1/cmdk@0,0
2. c5t01000008C7AA83B800002A00455C48EFd0 <SUN-SOLARIS-1-2.00GB>
/scsi_vhci/disk@g01000008c7aa83b800002a00455c48ef
[/b]

rutger

Posts: 10
From:

Registered: 10/23/06
Re: iscsi with "localhost" connections not working, timeout ?
Posted: Dec 3, 2006 11:57 AM   in response to: jkeil
To: Communities » storage » discuss
  Click to reply to this thread Reply

To all who contributed to this thread, thank you! I've been wrestling with this same issue for quite some time and was browsing through the posts right before starting my own thread. This solved (temporarily) my problems with iscsitadm!

To clear things up,
The TCP fix performed miracles. I suspected it was something in the TCP stack as sessions to the iSCSI port are stuck at "SYN_RCVD"...

mcneal

Posts: 195
From: Boulder, CO

Registered: 3/9/05
Re: Re: iscsi with "localhost" connections not working, timeout ?
Posted: Dec 3, 2006 6:06 PM   in response to: rutger

  Click to reply to this thread Reply


On Dec 3, 2006, at 12:57 PM, Rutger Bevaart wrote:

> To all who contributed to this thread, thank you! I've been
> wrestling with this same issue for quite some time and was browsing
> through the posts right before starting my own thread. This solved
> (temporarily) my problems with iscsitadm!
>

I would like to get a clarification here if possible. You mention "my
problems with iscsitadm". Yet the TCP workaround, for the loopback
problem, dealt with the initiator, not the target. Was this just a
simple typo? If not, what problems are you having with the target?

> To clear things up,
> The TCP fix performed miracles. I suspected it was something in the
> TCP stack as sessions to the iSCSI port are stuck at "SYN_RCVD"...
>
>
> This message posted from opensolaris.org
> _______________________________________________
> storage-discuss mailing list
> storage-discuss at opensolaris dot org
> http://mail.opensolaris.org/mailman/listinfo/storage-discuss

----
Rick McNeal

"If ignorance is bliss, this lesson would appear to be a deliberate
attempt on your part to deprive me of happiness, the pursuit of which
is my unalienable right according to the Declaration of
Independence. I therefore assert my patriotic prerogative not to
know this material. I'll be out on the playground." -- Calvin


_______________________________________________
storage-discuss mailing list
storage-discuss at opensolaris dot org
http://mail.opensolaris.org/mailman/listinfo/storage-discuss






Terms of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
Copyright © 1995-2005 Sun Microsystems, Inc.