iSCSI login failure

1,335 views
Skip to first unread message

Jesse Butler

unread,
Sep 15, 2009, 6:30:55 PM9/15/09
to open-...@googlegroups.com, Mike Berg

I am attempting to login to a Solaris iSER target w/ a Linux machine,
and am seeing this error:

# iscsiadm -m node -T iqn.1986-03.com.sun:02:d8e2ebc9-6886-46dd-91f6-
e80b7400948d -p 10.0.0.2:3260,1 -l
Logging in to [iface: default, target: iqn.1986-03.com.sun:
02:d8e2ebc9-6886-46dd-91f6-e80b7400948d, portal: 10.0.0.2,3260]
iscsiadm: Could not login to [iface: default, target: iqn.
1986-03.com.sun:02:d8e2ebc9-6886-46dd-91f6-e80b7400948d, portal:
10.0.0.2,3260]:
iscsiadm: initiator reported error (5 - encountered iSCSI login failure)
#

I think I have everything configured properly (see below), so I'm just
wondering what that "5" means so I can try to troubleshoot this. I
looked at the code, but it's a bit difficult to track all the way into
the specific error codes.

My Linux Kung Fu is weak, so if version/rev info is needed, please let
me know what and how to retrieve it.

Thanks in advance
Jesse

the initiator static config:

# cat /etc/iscsi//static/iqn.1986-03.com.sun\:
02\:d8e2ebc9-6886-46dd-91f6-e80b7400948d\,10.0.0.2\,3260\,1\,default/
default
node.name = iqn.1986-03.com.sun:02:d8e2ebc9-6886-46dd-91f6-e80b7400948d
node.tpgt = 1
node.startup = manual
iface.hwaddress = default
iface.iscsi_ifacename = default
iface.net_ifacename = default
iface.transport_name = iser
node.discovery_port = 0
node.discovery_type = static
node.session.initial_cmdsn = 0
node.session.initial_login_retry_max = 4
node.session.cmds_max = 128
node.session.queue_depth = 32
node.session.auth.authmethod = None
node.session.timeo.replacement_timeout = 30
node.session.err_timeo.abort_timeout = 15
node.session.err_timeo.lu_reset_timeout = 20
node.session.err_timeo.host_reset_timeout = 60
node.session.iscsi.FastAbort = Yes
node.session.iscsi.InitialR2T = No
node.session.iscsi.ImmediateData = No
node.session.iscsi.FirstBurstLength = 262144
node.session.iscsi.MaxBurstLength = 16776192
node.session.iscsi.DefaultTime2Retain = 0
node.session.iscsi.DefaultTime2Wait = 2
node.session.iscsi.MaxConnections = 1
node.session.iscsi.MaxOutstandingR2T = 1
node.session.iscsi.ERL = 0
node.conn[0].address = 10.0.0.2
node.conn[0].port = 3260
node.conn[0].startup = manual
node.conn[0].tcp.window_size = 524288
node.conn[0].tcp.type_of_service = 0
node.conn[0].timeo.logout_timeout = 15
node.conn[0].timeo.login_timeout = 15
node.conn[0].timeo.auth_timeout = 45
node.conn[0].timeo.noop_out_interval = 5
node.conn[0].timeo.noop_out_timeout = 5
node.conn[0].iscsi.MaxRecvDataSegmentLength = 131072
node.conn[0].iscsi.HeaderDigest = None
node.conn[0].iscsi.DataDigest = None
node.conn[0].iscsi.IFMarker = No
node.conn[0].iscsi.OFMarker = No
#


Mike Christie

unread,
Sep 16, 2009, 1:02:12 PM9/16/09
to open-...@googlegroups.com, Mike Berg
Jesse Butler wrote:
>
> I am attempting to login to a Solaris iSER target w/ a Linux machine,
> and am seeing this error:
>
> # iscsiadm -m node -T iqn.1986-03.com.sun:02:d8e2ebc9-6886-46dd-91f6-
> e80b7400948d -p 10.0.0.2:3260,1 -l
> Logging in to [iface: default, target: iqn.1986-03.com.sun:
> 02:d8e2ebc9-6886-46dd-91f6-e80b7400948d, portal: 10.0.0.2,3260]
> iscsiadm: Could not login to [iface: default, target: iqn.
> 1986-03.com.sun:02:d8e2ebc9-6886-46dd-91f6-e80b7400948d, portal:
> 10.0.0.2,3260]:
> iscsiadm: initiator reported error (5 - encountered iSCSI login failure)
> #
>
> I think I have everything configured properly (see below), so I'm just
> wondering what that "5" means so I can try to troubleshoot this. I

5 actually just means the error "encountered iSCSI login failure". It is
just a generic error value to cover all login problems.

There is normally more error info in /var/log/messages like if it was a
chap error or a login pdu error and what the status/class values were or
if it was just a connection problem. Look for something from iscsiadm or
iscsid in there.

Mike Christie

unread,
Sep 16, 2009, 1:51:09 PM9/16/09
to Mike Berg, open-...@googlegroups.com
Mike Berg wrote:
> I see:
>
> iscsid: Login negotiation failed, couldn't recognize text
> MaxOutstandingUnexpectedPDUs=0
>
> in /var/log/messages.
>
> Is the initiator getting MaxOutstandingUnexpectedPDUs=0 from the target?

Yeah, the target is sending the initaitor that string during login
negotiation. We have no idea what it is (is it a iser value?) and do not
know how to handle it so we fail the login process.

Mike Berg

unread,
Sep 16, 2009, 1:14:57 PM9/16/09
to Mike Christie, open-...@googlegroups.com
I see:

iscsid: Login negotiation failed, couldn't recognize text
MaxOutstandingUnexpectedPDUs=0

in /var/log/messages.

Is the initiator getting MaxOutstandingUnexpectedPDUs=0 from the target?

On Sep 16, 2009, at 11:02 AM, Mike Christie wrote:

Jesse Butler

unread,
Sep 16, 2009, 3:10:26 PM9/16/09
to open-...@googlegroups.com, Mike Berg
Thanks, Mike. I'll look into this on our end. Off the bat, it looks
like "0" would be an invalid value for this key.

I'll reply to this thread if anything further comes up. My guess is
it's just a bug on our end.

/jb

Jesse Butler

unread,
Sep 16, 2009, 3:39:33 PM9/16/09
to open-...@googlegroups.com, Mike Berg
No, that was an old copy of the RFC. Current valid values are

MaxOutstandingUnexpectedPDUs=<numerical-value-from-2-to-(2**32-1) | 0

which means we're just fine replying w/ "0".

Is this a bug on the OpeniSCSI side, where you're intercepting an iSER
key-value and failing since you don't recognize it, rather than
passing it down?

Let me know what you think, thanks.


On Sep 16, 2009, at 11:51 AM, Mike Christie wrote:

>

Mike Christie

unread,
Sep 16, 2009, 5:22:54 PM9/16/09
to open-...@googlegroups.com, Mike Berg, Or Gerlitz
Jesse Butler wrote:
> No, that was an old copy of the RFC. Current valid values are
>
> MaxOutstandingUnexpectedPDUs=<numerical-value-from-2-to-(2**32-1) | 0
>
> which means we're just fine replying w/ "0".
>
> Is this a bug on the OpeniSCSI side, where you're intercepting an iSER
> key-value and failing since you don't recognize it, rather than
> passing it down?

This is a bug on the initiator side. Open-iscsi just has no code to
handle this key. I guess the iser guys just never implemented it (ccing Or).

Mike Christie

unread,
Sep 16, 2009, 6:06:32 PM9/16/09
to open-...@googlegroups.com, Mike Berg, Or Gerlitz
Mike Christie wrote:
> Jesse Butler wrote:
>> No, that was an old copy of the RFC. Current valid values are
>>
>> MaxOutstandingUnexpectedPDUs=<numerical-value-from-2-to-(2**32-1) | 0
>>
>> which means we're just fine replying w/ "0".
>>
>> Is this a bug on the OpeniSCSI side, where you're intercepting an iSER
>> key-value and failing since you don't recognize it, rather than
>> passing it down?
>
> This is a bug on the initiator side. Open-iscsi just has no code to
> handle this key. I guess the iser guys just never implemented it (ccing Or).
>

Hey, so MaxOutstandingUnexpectedPDU is for iser only right and 0 means
there is no limit? If so, I think this patch will work for the default case.

dont-fail-on-0-for-MaxOutstandingUnexpectedPDU.patch

Mike Berg

unread,
Sep 16, 2009, 2:05:37 PM9/16/09
to Mike Christie, open-...@googlegroups.com

On Sep 16, 2009, at 11:51 AM, Mike Christie wrote:

> Mike Berg wrote:
>> I see:
>> iscsid: Login negotiation failed, couldn't recognize text
>> MaxOutstandingUnexpectedPDUs=0
>> in /var/log/messages.
>> Is the initiator getting MaxOutstandingUnexpectedPDUs=0 from the
>> target?
>
> Yeah, the target is sending the initaitor that string during login
> negotiation. We have no idea what it is (is it a iser value?) and do
> not know how to handle it so we fail the login process.

We are trying to establish an iser connection. I'll have to
investigate more as I am using newer software releases on everything
and I do not recall this problem before.

thanks.

Jesse Butler

unread,
Sep 16, 2009, 6:35:21 PM9/16/09
to open-...@googlegroups.com, Mike Berg, Or Gerlitz
Yes exactly.

> If so, I think this patch will work for the default case.

Ok, I will pass this off to Or and to Mike Berg, I think. Let me know
if I can do anything to assist further!

Thanks for your rapid response, Mike (Christie).

/jb


>
> >
> diff --git a/usr/login.c b/usr/login.c
> index 0235870..74813a9 100644
> --- a/usr/login.c
> +++ b/usr/login.c
> @@ -544,6 +544,21 @@ get_op_params_text_keys(iscsi_session_t
> *session, int cid,
> return LOGIN_NEGOTIATION_FAILED;
> }
> text = value_end;
> + } else if (iscsi_find_key_value("MaxOutstandingUnexpectedPDU", text,
> + end, &value, &value_end)) {
> + if (!session->t->template->rdma) {
> + log_error("Login negotiation failed. Can't accept "
> + "MaxOutstandingUnexpectedPDU for non "
> + "RDMA connections.");
> + return LOGIN_NEGOTIATION_FAILED;
> + }
> +
> + if (strcmp(value, "0")) {
> + log_error("Login negotiation failed. iSER initiator "
> + "only supports MaxOutstandingUnexpectedPDU "
> + "of 0.\n");
> + return LOGIN_NEGOTIATION_FAILED;
> + }
> } else if (iscsi_find_key_value("RDMAExtensions", text, end,
> &value, &value_end)) {
> if (session->t->template->rdma &&

Reply all
Reply to author
Forward
0 new messages