sebastiangraf / jSCSI

A Java iSCSI Framework
http://jscsi.org
BSD 3-Clause "New" or "Revised" License
60 stars 28 forks source link

Running Target Issue #13

Open digitalsense opened 10 years ago

digitalsense commented 10 years ago

Hi,

I wanting to work with the library to create a virtual iSCSI interface for a project. I cant seem to get it to work. Everything compiles fine, it executes, asks for the IP etc.

As soon as i try to connect to it, it throws 1000's of errors (as below).

17:04:02.449 [main] ERROR o.j.t.c.Connection$TargetConnection - Exception throws java.io.IOException: Connection reset by peer at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[na:1.7.0_55] at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[na:1.7.0_55] at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.7.0_55] at sun.nio.ch.IOUtil.read(IOUtil.java:197) ~[na:1.7.0_55] at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379) ~[na:1.7.0_55] at org.jscsi.parser.ProtocolDataUnit.read(ProtocolDataUnit.java:356) ~[target-2.5.3-SNAPSHOT-jar-with-dependencies.jar:na] at org.jscsi.target.connection.TargetSenderWorker.receiveFromWire(TargetSenderWorker.java:133) ~[target-2.5.3-SNAPSHOT-jar-with-dependencies.jar:na] at org.jscsi.target.connection.Connection$TargetConnection.receivePdu(Connection.java:169) [target-2.5.3-SNAPSHOT-jar-with-dependencies.jar:na] at org.jscsi.target.connection.phase.TargetFullFeaturePhase.execute(TargetFullFeaturePhase.java:82) ~[target-2.5.3-SNAPSHOT-jar-with-dependencies.jar:na] at org.jscsi.target.connection.Connection$TargetConnection.call(Connection.java:225) [target-2.5.3-SNAPSHOT-jar-with-dependencies.jar:na] at org.jscsi.target.connection.Connection$TargetConnection.call(Connection.java:66) [target-2.5.3-SNAPSHOT-jar-with-dependencies.jar:na] at org.jscsi.target.TargetServer.call(TargetServer.java:242) [target-2.5.3-SNAPSHOT-jar-with-dependencies.jar:na] at org.jscsi.target.TargetServer.main(TargetServer.java:192) [target-2.5.3-SNAPSHOT-jar-with-dependencies.jar:na]

has anyone seen this before? Your help is much appreciated.

sebastiangraf commented 10 years ago

Could you give us some information about the operating system used, etc.? You only want to work with the Target?

digitalsense commented 10 years ago

I have tried it on both Windows 8 (using Eclipse and JDK 1.7) and Centos 6.2 using OpenJDK 1.6.

Yes i am only looking to work with the Target. It builds on both platforms just fine. It launches just fine, i can see the iSCSI shares (on discovery). But i get this error on both platforms when i try to connect/use the drives.

digitalsense commented 10 years ago

It seems to be halting somewhere in the: ProtocolDataUnit pdu = connection.receivePdu(); on the TargerServer.java, i havent been able trace it out though.

sebastiangraf commented 10 years ago

Debugging iSCSI is not really fun. For me, it seems that the initiator utilized has some "communication problems' with our jSCSI. We experienced issues with the Windows 8 initiator in the past. What intitiator are you using?

jSCSI should work with the iSCSI initiator shipped with linux and, as far as I remembered, with WIndows 7 as well. Unfortunately, I lack the time of getting jSCSI entirely back to work again since this project is more or less concluded. Anyhow, related to any Pull Requests I am more than willing to review.

Related to debugging, I can recommend wireshark and check if the packets transferred by the initiator (and our target) are in the right order, at least this is what we did in the past.

ActiveVolcano commented 2 years ago

Microsoft Windows 8 and Linux CentOS 6 seem outdated in this year 2022. However, with pull request #43 and #44, jSCSI target is now compatible with Microsoft Windows 10 and Linux CentOS 7.

I have tried it on both Windows 8 (using Eclipse and JDK 1.7) and Centos 6.2 using OpenJDK 1.6.

Yes i am only looking to work with the Target. It builds on both platforms just fine. It launches just fine, i can see the iSCSI shares (on discovery). But i get this error on both platforms when i try to connect/use the drives.