iscsi authentication error from centos to a synology iscsi target.

7,114 views
Skip to first unread message

Tim Fotherby

unread,
Mar 8, 2012, 10:44:03 AM3/8/12
to open-...@googlegroups.com
I'm having a problem getting an iscsi target connected to a CentOS 5.7 server. This is my second time having this similar issue.
Before I solved the problem by reinstalling ipv6 settings. It's saying that it can't authenticate to the Synology iscsi target that I have setup with CHAP, and a simple username and password.
Please see below the errors


config:
node.session.auth.authmethod = CHAP
node.session.auth.username = target1
node.session.auth.password = abc123abc123

commands ran:
iscsiadm -m discovery -t sendtargets -p 192.168.214.199
iscsiadm -m node --op delete -T iqn.2000-01.com.synology:rackstation.name1
iscsiadm -m node --op delete -T iqn.2000-01.com.synology:rackstation.name2
iscsiadm -m node --op delete -T iqn.2000-01.com.synology:rackstation.name3

[root@fish ~]# service iscsid restart
Stopping iSCSI daemon:
Starting iSCSI daemon:                                     [  OK  ]
                                                           [  OK  ]


[root@fish ~]# service iscsi restart
iscsiadm: No matching sessions found
Stopping iSCSI daemon:
iscsid is stopped                                          [  OK  ]
Starting iSCSI daemon:                                     [  OK  ]
                                                           [  OK  ]
Setting up iSCSI targets: Logging in to [iface: default, target: iqn.2000-01.com.synology:rackstation.name, portal: 192.168.214.199,3260]
iscsiadm: Could not login to [iface: default, target: iqn.2000-01.com.synology:rackstation.name, portal: 192.168.214.199,3260].
iscsiadm: initiator reported error (24 - iSCSI login failed due to authorization failure)
iscsiadm: Could not log into all portals
                                                           [  OK  ]

dmesg output:
Loading iSCSI transport class v2.0-871.
cxgb3i: tag itt 0x1fff, 13 bits, age 0xf, 4 bits.
iscsi: registered transport (cxgb3i)
Broadcom NetXtreme II CNIC Driver cnic v2.0.1 (Oct 01, 2009)
Broadcom NetXtreme II iSCSI Driver bnx2i v2.0.1e (June 22, 2009)
iscsi: registered transport (bnx2i)
iscsi: registered transport (tcp)
iscsi: registered transport (iser)
scsi20 : iSCSI Initiator over TCP/IP
BUG: warning at drivers/scsi/libiscsi2.c:465/iscsi_complete_task() (Tainted: G     )

Call Trace:
 <IRQ>  [<ffffffff88511856>] :libiscsi2:iscsi_complete_task+0xcd/0x135
 [<ffffffff88513de9>] :libiscsi2:__iscsi2_complete_pdu+0x5ef/0x645
 [<ffffffff885116a6>] :libiscsi2:__iscsi_put_task+0x8b/0x105
 [<ffffffff88514154>] :libiscsi2:iscsi2_complete_pdu+0x38/0x52
 [<ffffffff88526c91>] :libiscsi_tcp:iscsi_tcp_hdr_recv_done+0xa05/0xa64
 [<ffffffff88525be5>] :libiscsi_tcp:iscsi_tcp_segment_done+0x191/0x364
 [<ffffffff885260f0>] :libiscsi_tcp:iscsi_tcp_recv_skb+0x338/0x3ac
 [<ffffffff885bebc6>] :iscsi_tcp:iscsi_sw_tcp_recv+0x78/0xe3
 [<ffffffff80035ec2>] tcp_read_sock+0xb4/0x19c
 [<ffffffff885beb4e>] :iscsi_tcp:iscsi_sw_tcp_recv+0x0/0xe3
 [<ffffffff885bedf7>] :iscsi_tcp:iscsi_sw_tcp_data_ready+0x43/0x5c
 [<ffffffff8001bb44>] tcp_rcv_established+0x63a/0x925
 [<ffffffff8003b5b7>] tcp_v4_do_rcv+0x2a/0x2fa
 [<ffffffff8002714e>] tcp_v4_rcv+0x9e0/0xa49
 [<ffffffff8003485a>] ip_local_deliver+0x19d/0x263
 [<ffffffff800359c8>] ip_rcv+0x539/0x57c
 [<ffffffff80020834>] netif_receive_skb+0x3ff/0x42b
 [<ffffffff8826375d>] :e1000:e1000_clean_rx_irq+0x48d/0x584
 [<ffffffff88262562>] :e1000:e1000_clean+0x89/0x26e
 [<ffffffff8002e31f>] __wake_up+0x38/0x4f
 [<ffffffff8000c86f>] net_rx_action+0xac/0x1e0
 [<ffffffff80012348>] __do_softirq+0x89/0x133
 [<ffffffff8005e2fc>] call_softirq+0x1c/0x28
 [<ffffffff8006cb3c>] do_softirq+0x2c/0x85
 [<ffffffff8006c9c4>] do_IRQ+0xec/0xf5
 [<ffffffff8006b2f4>] default_idle+0x0/0x50
 [<ffffffff8005d615>] ret_from_intr+0x0/0xa
 <EOI>  [<ffffffff8006b31d>] default_idle+0x29/0x50
 [<ffffffff800494cc>] cpu_idle+0x95/0xb8
 [<ffffffff803fd7fd>] start_kernel+0x220/0x225
 [<ffffffff803fd22f>] _sinittext+0x22f/0x236

Loading iSCSI transport class v2.0-871.
cxgb3i: tag itt 0x1fff, 13 bits, age 0xf, 4 bits.
iscsi: registered transport (cxgb3i)
Broadcom NetXtreme II CNIC Driver cnic v2.0.1 (Oct 01, 2009)
Broadcom NetXtreme II iSCSI Driver bnx2i v2.0.1e (June 22, 2009)
iscsi: registered transport (bnx2i)
iscsi: registered transport (tcp)
iscsi: registered transport (iser)

Mike Christie

unread,
Mar 8, 2012, 3:12:27 PM3/8/12
to open-...@googlegroups.com, Tim Fotherby
On 03/08/2012 09:44 AM, Tim Fotherby wrote:
> I'm having a problem getting an iscsi target connected to a CentOS 5.7
> server. This is my second time having this similar issue.
> Before I solved the problem by reinstalling ipv6 settings. It's saying that
> it can't authenticate to the Synology iscsi target that I have setup with
> CHAP, and a simple username and password.
> Please see below the errors
>
>
> config:
> node.session.auth.authmethod = CHAP
> node.session.auth.username = target1
> node.session.auth.password = abc123abc123
>
> commands ran:
> iscsiadm -m discovery -t sendtargets -p 192.168.214.199
> iscsiadm -m node --op delete -T iqn.2000-01.com.synology:rackstation.name1
> iscsiadm -m node --op delete -T iqn.2000-01.com.synology:rackstation.name2
> iscsiadm -m node --op delete -T iqn.2000-01.com.synology:rackstation.name3
>
> [root@fish ~]# service iscsid restart
> Stopping iSCSI daemon:
> Starting iSCSI daemon: [ OK ]
> [ OK ]

You do not need to do this. The command below will do it for you.

>
>
> [root@fish ~]# service iscsi restart
> iscsiadm: No matching sessions found
> Stopping iSCSI daemon:
> iscsid is stopped [ OK ]
> Starting iSCSI daemon: [ OK ]
> [ OK ]
> Setting up iSCSI targets: Logging in to [iface: default, target:
> iqn.2000-01.com.synology:rackstation.name, portal: 192.168.214.199,3260]
> iscsiadm: Could not login to [iface: default, target:
> iqn.2000-01.com.synology:rackstation.name, portal: 192.168.214.199,3260].
> iscsiadm: initiator reported error (24 - iSCSI login failed due to
> authorization failure)

Is there some more info in /var/log/messages? Something from "iscsid"
indicating a login error value?

For that target is the chap info what you wrote above? Do

iscsiadm -m node -T iqn.2000-01.com.synology:rackstation.name -p
192.168.214.199

to see.


> iscsiadm: Could not log into all portals
> [ OK ]
>
> dmesg output:
> Loading iSCSI transport class v2.0-871.
> cxgb3i: tag itt 0x1fff, 13 bits, age 0xf, 4 bits.
> iscsi: registered transport (cxgb3i)
> Broadcom NetXtreme II CNIC Driver cnic v2.0.1 (Oct 01, 2009)
> Broadcom NetXtreme II iSCSI Driver bnx2i v2.0.1e (June 22, 2009)
> iscsi: registered transport (bnx2i)
> iscsi: registered transport (tcp)
> iscsi: registered transport (iser)
> scsi20 : iSCSI Initiator over TCP/IP
> BUG: warning at drivers/scsi/libiscsi2.c:465/iscsi_complete_task()
> (Tainted: G )


When you did the restart, were there sessions already running? Were you
also running IO to those sessions? This trace is bad because it
indicates a double free. I am not sure if it is related to the login
error above though. Could you do:

echo 1 > /sys/module/libiscsi2/paramters/debug_libiscsi
echo 1 > /sys/module/libiscsi_tcp/paramters/debug_libiscsi_tcp
echo 1 > /sys/module/iscsi_tcp/paramters/debug_iscsi_tcp


Then rerun your test?

Tim Fotherby

unread,
Apr 9, 2012, 8:26:40 AM4/9/12
to open-...@googlegroups.com
Mike Christie <michaelc@...> writes:


> When you did the restart, were there sessions already running? Were you
> also running IO to those sessions? This trace is bad because it
> indicates a double free. I am not sure if it is related to the login
> error above though. Could you do:
>
> echo 1 > /sys/module/libiscsi2/paramters/debug_libiscsi
> echo 1 > /sys/module/libiscsi_tcp/paramters/debug_libiscsi_tcp
> echo 1 > /sys/module/iscsi_tcp/paramters/debug_iscsi_tcp
>
> Then rerun your test?
>


I ended up fixing this by removing all the scanned targets and readding them.
Apparently if you change the config to chap from default config after you've
added targets then you have to delete them, re-add them, then restart the iscsi
service.

Mike Christie

unread,
Apr 9, 2012, 1:36:55 PM4/9/12
to open-...@googlegroups.com, Tim Fotherby

By config you must meant the iscsid.conf settings. iscsid.conf settings
are the ones used for the initial discovery session and used to create
the per portal iscsi node db. If you have already discovered
targets/portals then to update specific portals settings you need to run

iscsiadm -m node -T target -p ip -o update -n name-of-setting -v value

Or you can set them in iscsid.conf then rerun the discovery command.
That will overwrite the current node db with settings based on
iscsid.conf values.


But even if you did not do this, you should not hit that OOPS/BUG you
were hitting in the kernel.

Guillaume

unread,
Apr 24, 2012, 5:50:13 AM4/24/12
to open-...@googlegroups.com
I have the same problem with Redhat EL5 and CentOS 5 initiators, but not with Ubuntu or Win7.
The problem arise when I activate data CRC on the Syno. I have no problem with header CRC.
It seems that the data digest parameter is not supported by RH & CentOS.

Guillaume

unread,
Apr 24, 2012, 5:43:30 AM4/24/12
to open-iscsi
Hello,

I did have the same problem from Redhat EL5 & CentOS. The same target
is not problematic with Ubuntu and Win7 initiators.
I discovered that my problem come from the DATA CRC32C. When I
deactivate the data digest on the Syno, the Redhat can login to the
target.
I have no problem with header CRC.
Could you verify if your target use Data CRC ?

Mike Christie

unread,
Apr 25, 2012, 12:15:55 AM4/25/12
to open-...@googlegroups.com, Guillaume
On 04/24/2012 04:43 AM, Guillaume wrote:
> Hello,
>
> I did have the same problem from Redhat EL5 & CentOS. The same target
> is not problematic with Ubuntu and Win7 initiators.
> I discovered that my problem come from the DATA CRC32C. When I
> deactivate the data digest on the Syno, the Redhat can login to the
> target.
> I have no problem with header CRC.
> Could you verify if your target use Data CRC ?

Data digests are not supported in centos/rhel 5. You should get a
different error though. You should not get that stack trace below. If
you guys are getting a stack trace like below I will try to do some more
debugging. I did not see that below when I tested here.

Guillaume

unread,
Apr 25, 2012, 5:24:34 PM4/25/12
to open-...@googlegroups.com, Guillaume


Le mercredi 25 avril 2012 06:15:55 UTC+2, Mike Christie a écrit :


Data digests are not supported in centos/rhel 5. You should get a
different error though. You should not get that stack trace below. If
you guys are getting a stack trace like below I will try to do some more
debugging. I did not see that below when I tested here.



Ok.

I don't have the stack trace but whe I activate data digest on the target I have the error :

iscsiadm: initiator reported error (24 - iSCSI login failed due to authorization failure)

Is data digest supported in RedHat EL6 or CentOS 6 ? I will have to reinstall the server this summer on new hardware soo if it's ok I will install one of these.

(sorry for the double post yesterday, I did not see my post in the thread so I posted another one)


Mike Christie

unread,
Apr 26, 2012, 2:42:33 AM4/26/12
to open-...@googlegroups.com, Guillaume
On 04/25/2012 04:24 PM, Guillaume wrote:
>
>
> Le mercredi 25 avril 2012 06:15:55 UTC+2, Mike Christie a �crit :
>>
>>
>>
>> Data digests are not supported in centos/rhel 5. You should get a
>> different error though. You should not get that stack trace below. If
>> you guys are getting a stack trace like below I will try to do some more
>> debugging. I did not see that below when I tested here.
>>
>>
>>
> Ok.
>
> I don't have the stack trace but whe I activate data digest on the target I
> have the error :
> iscsiadm: initiator reported error (24 - iSCSI login failed due to
> authorization failure)
>
> Is data digest supported in RedHat EL6 or CentOS 6 ? I will have to
> reinstall the server this summer on new hardware soo if it's ok I will
> install one of these.

Yes, but it is slow.

>
> (sorry for the double post yesterday, I did not see my post in the thread
> so I posted another one)

No problem. It was my fault. I was late approving the message.

Reply all
Reply to author
Forward
0 new messages