sebastiangraf / jscsi Goto Github PK
View Code? Open in Web Editor NEWA Java iSCSI Framework
Home Page: http://jscsi.org
License: BSD 3-Clause "New" or "Revised" License
A Java iSCSI Framework
Home Page: http://jscsi.org
License: BSD 3-Clause "New" or "Revised" License
Hello There,
First of all I want to thank you guys for doing this freaking awesome work!
In my project I needed to use just the Target component of your package. Hence I was able to download your source and run it as server.
It worked !!!!great!!!! to expose my data files as disks using Microsoft iSCSI initiator and Linux open-iscsi initiators (which I verified on Ubuntu 12.04).
However I had trouble making it work right out of the box using MacOS Third Party initiators. One of them is called globalSAN and other is called ATTO XTend.
While I am debugging this problem and collecting some debug logs on the server side I was wondering if you guys got chance to test it on the MAC side. Also just wondering is jSCSI suppose to work with other 3rd party initiators.
Cheers!
hi, gays
Is this still updated?
thinks
What about the compatibility of the jSCSI Target?
I tried with VirtualBox 4.2.18 and wasn't able to connect. The error is: "The D field is reserved in this ISID Format."
I tried to change the code so that this error is ignored, but then I get "Recieved unsupported opcode for LOGIN_REQUEST" and later a java.io.IOException that the host disconnected. I didn't setup any login in virtualbox.
Virtualbox writes:
Does anyone successfully use jSCSI with VirtualBox?
Btw: There is a spelling mistake in the word "Recieved"
The main website link listed for this project fails to load because www
subdomain doesn't seem to be configured.
I've been getting reads past the end of my device from the Linux iSCSI initiator and the size reported in the log when login to the device occurs is the number of blocks + 1. The ReadCapacityStage uses the AbstractStorageModule.getSizeInBlocks() as the
returned LBA and I think it should be using getSizeInBlocks() - 1, the address of the last addressable block.
This man page explains the behavior, http://manpages.ubuntu.com/manpages/dapper/man8/sg_readcap.8.html.
If you agree, I'll submit a fix for this. It may require some changes on the initiator side as well but I'm not using that at the moment so I haven't dug too deeply into it.
Releasing to maven central should be automated.
I think I found a issue at JCloudsStorageModule (http://grepcode.com/file/repo1.maven.org/maven2/org.jscsi/target/2.5.2/org/jscsi/target/storage/JCloudsStorageModule.java?av=f), it is not closing the "data = ByteStreams.toByteArray(blob.getPayload().getInput());"
if you guys agree it could be change to :
data = ByteStreams2.toByteArrayAndClose(blob.getPayload().getInput());
or
InputStream inputStream = null;
try {
inputStream = blob.getPayload().getInput();
data = ByteStreams.toByteArray(inputStream);
} finally {
if (inputStream != null) {
inputStream.close();
}
}
I got this error "too many files open" when I was testing a 400Gb copy.
jscsi的Initiator怎么连接linux上安装的target啊!求解决
Since the last pull request, the target fires errors on a second connection when only one is used visible in the log.
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.
Hello,
I wonder to know about the commentary at https://github.com/sebastiangraf/jSCSI/blob/master/bundles/target/src/main/java/org/jscsi/target/TargetServer.java#L232
It says about TSIH that should be implemented at the future. I would like to help to implement it based at http://www.ietf.org/rfc/rfc3720.txt:
+------------------------------------------------------------------+
|ISID | TSIH | CID | Target action |
+------------------------------------------------------------------+
|new | non-zero | any | fail the login |
+------------------------------------------------------------------+
|new | zero | any | instantiate a new session |
+------------------------------------------------------------------+
|existing | zero | any | do session reinstatement |
+------------------------------------------------------------------+
|existing | non-zero | new | add a new connection to |
+------------------------------------------------------------------+
|existing | non-zero |existing| do connection reinstatement|
+------------------------------------------------------------------+
|existing | non-zero | any | fail the login |
+------------------------------------------------------------------+
Looks like the TargetSession has the ISID and TSIH but CID (ConnectionID) where is?
Am I correct? Could you give me any advice? Like if I have to create new classes? Which methods?
Thanks in advanced. Felipe
The creation of the concise storage module at the moment is fix coded but should be pushed to the configuration level.
The code is a little bit messed up and should be cleaned.
Hi,
I was executing Virtual Machines at jscsi and I got some bug at the JCloudStorageModule. The method storeBucket has to verify if the bucketId has different byte array.
I change the IF for this:
if ((lastIndexWritten != pBucketId && lastBlobWritten != null) || (lastIndexWritten == pBucketId && !Arrays.equals(lastBlobWritten, pData) && lastBlobWritten != null)) {
I don't know if you agree. Maybe I could commit this on your code if you agree.
Thanks,
Felipe
The target should be switched from a Process to a Callable reading all their own configurations
Unfortunately, I wasn't able to build this project:
me$ cd bundles/target
me$ mvn assembly:single
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Target
[INFO] task-segment: [assembly:single]
[INFO] ------------------------------------------------------------------------
[INFO] [assembly:single {execution: default-cli}]
[INFO] Reading assembly descriptor: src/main/assembly/jarAssembly.xml
[WARNING] Cannot include project artifact: org.jscsi:target:jar:2.5.1-SNAPSHOT; it doesn't have an associated file or directory.
[INFO] Building jar: /daten/Projects/extPrj/jSCSI/jSCSI/bundles/target/target/target-2.5.1-SNAPSHOT-jar-with-dependencies.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Thu Oct 31 11:48:23 CET 2013
[INFO] Final Memory: 30M/73M
[INFO] ------------------------------------------------------------------------
me$ find -name *.jar
./target/target-2.5.1-SNAPSHOT-jar-with-dependencies.jar
me$ java -jar target/target-2.5.1-SNAPSHOT-jar-with-dependencies.jar
Error: Could not find or load main class org.jscsi.target.TargetServer
me$ jar -tf target/target-2.5.1-SNAPSHOT-jar-with-dependencies.jar | grep TargetServer
src/main/java/org/jscsi/target/TargetServer.java
me$
It seems the source files are included into the target jar without compiling. Do I have to invoke another command (didn't find any recent doc about compiling) or is there a bug in the pom.xml (same happened with tag pom-2.5). I only need target.
怎样下载
The initiator at the moment fails when working with the ISCSI Enterprise Target. The problem is the response from the ReadCapacityState which is a SCSIResponse.
I was just testing the target(on Linux, dd if=/dev/zero of=volumeOfTargte ) when the target encounter the exception blow.
I think It may be caused by initiator error. But I am not sure and do not know why
Has anyone ever meet this?
104543 [pool-1-thread-1] ERROR org.jscsi.target.connection.phase.TargetFullFeaturePhase - Recieved unsupported opcode for LOGIN_REQUEST
104544 [pool-1-thread-1] ERROR org.jscsi.target.connection.phase.TargetFullFeaturePhase - Recieved unsupported opcode for LOGIN_REQUEST
104544 [pool-1-thread-1] ERROR org.jscsi.target.connection.Connection$TargetConnection - Exception throws
java.io.IOException: Broken pipe
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:487)
at org.jscsi.parser.ProtocolDataUnit.write(ProtocolDataUnit.java:332)
at org.jscsi.target.connection.TargetSenderWorker.sendOverWire(TargetSenderWorker.java:220)
at org.jscsi.target.connection.Connection$TargetConnection.sendPdu(Connection.java:200)
at org.jscsi.target.connection.stage.fullfeature.UnsupportedOpCodeStage.execute(UnsupportedOpCodeStage.java:60)
at org.jscsi.target.connection.phase.TargetFullFeaturePhase.execute(TargetFullFeaturePhase.java:173)
at org.jscsi.target.connection.Connection$TargetConnection.call(Connection.java:225)
at org.jscsi.target.connection.Connection$TargetConnection.call(Connection.java:66)
at org.jscsi.target.TargetServer.call(TargetServer.java:242)
at org.jscsi.target.TargetServer.call(TargetServer.java:44)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
107799 [pool-1-thread-1] ERROR org.jscsi.target.connection.stage.fullfeature.InquiryStage - illegal INQUIRY request
Presently TargetServer emits:
This system provides more than one IP Address to advertise.
[0] 172.17.42.1
[1] fe80:0:0:0:6676:baff:fe92:27c6%wlan0
[2] 192.168.1.73
[3] 0:0:0:0:0:0:0:1%lo
[4] 127.0.0.1
and requires user input to proceed. Instead it should read this value from the config file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.