Hide Forgot
Description of problem: cannot find iscsi targets with ipv6, got "connection refused" error Version-Release number of selected component (if applicable): targetcli-2.1.fb41-3.el7.noarch iscsi-initiator-utils-6.2.0.873-32.el7.x86_64 kernel-3.10.0-327.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. prepared iscsi targets with targetcli on localhost 2.use IPv6 to find targets, got "Connection refused" error # iscsiadm --mode discovery --type sendtargets --portal ::1 iscsiadm: cannot make connection to ::1: Connection refused iscsiadm: cannot make connection to ::1: Connection refused iscsiadm: cannot make connection to ::1: Connection refused # ping6 ::1 PING ::1(::1) 56 data bytes 64 bytes from ::1: icmp_seq=1 ttl=64 time=0.020 ms 64 bytes from ::1: icmp_seq=2 ttl=64 time=0.025 ms ... 3.use IPv4, everything goes well # iscsiadm --mode discovery --type sendtargets --portal 127.0.0.1 127.0.0.1:3260,1 iqn.2016-03.com.virttest:emulated-image.target Actual results: As above, ipv6 doesn't work Expected results: IPv6 should work well. Additional info: I searched some related bugs: 1239046 1239114 888191 <=== this one seems exactly the same issue, but it's been fixed.
Confirmed with dev, this is a default setting issue. So close this as Not A Bug <bgoncalv> okay, I see the problem <bgoncalv> targetcli by default enables only IPv4 portals <bgoncalv> you need to delete portal "0.0.0.0" and add "::0" <bgoncalv> this will enable connection from IPv4 and IPv6 addresses <yisun> so delete 0.0.0.0 won't effect ipv4, correct? <bgoncalv> it wont <yisun> where to delete the portal setting? or command line? <bgoncalv> targetcli /iscsi/iqn.2016-03.com.virttest:emulated-image.target/tpg1/portals delete 0.0.0.0 3260 <bgoncalv> should do it <bgoncalv> then: targetcli /iscsi/iqn.2016-03.com.virttest:emulated-image.target/tpg1/portals create ::0 <yisun> yes, it works! <bgoncalv> cool <yisun> thx for the guide <bgoncalv> np, can you update the BZ or should I do it? <yisun> I'll update and close it, thx <bgoncalv> yw