Jargon 3.0.0.2 IRODSAccount problem

72 views
Skip to first unread message

Willem Elbers

unread,
Feb 17, 2012, 8:56:00 AM2/17/12
to iROD-Chat
Hi All,

I am having problems connecting to iRODS with Jargon-core 3.0.0.2.

I am using the following code to my irods instance running at my local
machine:

IRODSFileSystem irodsFileSystem = IRODSFileSystem.instance();

IRODSAccount irodsAccount =
new IRODSAccount(
"localhost",
1247,
"irods", //username
"irods", //password
"/tz/home/irods",
"/tz",
"resc");

IRODSAccessObjectFactory accessObjectFactory =
irodsFileSystem.getIRODSAccessObjectFactory();

EnvironmentalInfoAO environmentalInfoAO =

accessObjectFactory.getEnvironmentalInfoAO(irodsAccount);
IRODSServerProperties props =

environmentalInfoAO.getIRODSServerPropertiesFromIRODSServer();

System.out.println(props.toString());

if (!
props.isTheIrodsServerAtLeastAtTheGivenReleaseVersion("rods3.0")) {
return;
}

This gives me the following stacktrace:

1 [main] INFO
org.irods.jargon.core.connection.IRODSSimpleProtocolManager -
creating simple protocol manager
4 [main] INFO org.irods.jargon.core.connection.IRODSSession -
IRODS Session creation, loading default properties, these may be
overridden...
22 [main] INFO org.irods.jargon.core.pub.IRODSFileSystem -
IRODSfileSystem is initialized
32 [main] DEBUG
org.irods.jargon.core.pub.IRODSAccessObjectFactoryImpl - creating
access object factory
34 [main] DEBUG org.irods.jargon.core.pub.IRODSGenericAO -
establishing connection
34 [main] DEBUG org.irods.jargon.core.connection.IRODSSession - no
connections are cached, so create a new cache map
36 [main] DEBUG
org.irods.jargon.core.connection.IRODSSimpleProtocolManager -
creating an IRODSSimpleConnection for account:irods://irods@localhost:
1247
41 [main] INFO org.irods.jargon.core.connection.IRODSConnection -
pipeline configuration:PipelineConfiguration
irodsSocketTimeout:120
irodsParallelSocketTimeout:120
internalInputStreamBufferSize:0
internalOutputStreamBufferSize:-1
internalCacheBufferSize:65535
localFileOutputStreamBufferSize:0
defaultEncoding:utf-8
inputToOutputCopyBufferByteSize:8192
42 [main] INFO org.irods.jargon.core.connection.IRODSConnection -
using internal cache buffer of size:65535
42 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
initializing connection with account:irods://irods@localhost:1247
42 [main] INFO org.irods.jargon.core.connection.IRODSConnection -
opening irods socket
42 [main] INFO org.irods.jargon.core.connection.IRODSConnection -
connecting socket...
42 [main] INFO org.irods.jargon.core.connection.IRODSConnection -
connecting socket to agent
56 [main] INFO org.irods.jargon.core.connection.IRODSConnection -
setting a connection timeout of:120 seconds
57 [main] INFO org.irods.jargon.core.connection.IRODSConnection -
default buffer on input stream
58 [main] INFO org.irods.jargon.core.connection.IRODSConnection -
no buffer on output stream
58 [main] INFO org.irods.jargon.core.connection.IRODSConnection -
socket opened successfully
62 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
functionID: 0
74 [main] INFO org.irods.jargon.core.connection.IRODSCommands -
reading message from irods
75 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
IRODSConnection.read, byte array size = 4
75 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
offset = 0
75 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
length = 4
261 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
IRODSConnection.read, byte array size = 139
261 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
offset = 0
262 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
length = 139
263 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
message length:178
263 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
error length:0
263 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
bytesLength:0
263 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
info value:0
263 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
message length greater than zero
263 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
IRODSConnection.read, byte array size = 178
263 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
offset = 0
263 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
length = 178
266 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
message from IRODS read back:<Version_PI><status>0</status>
<relVersion>rods3.0</relVersion>
<apiVersion>d</apiVersion>
<reconnPort>0</reconnPort>
<reconnAddr></reconnAddr>
<cookie>0</cookie>
</Version_PI>

266 [main] INFO org.irods.jargon.core.connection.IRODSCommands -
sending standard irods password
268 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
functionID: 703
269 [main] INFO org.irods.jargon.core.connection.IRODSCommands -
reading message from irods
269 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
IRODSConnection.read, byte array size = 4
269 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
offset = 0
269 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
length = 4
269 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
IRODSConnection.read, byte array size = 141
269 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
offset = 0
270 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
length = 141
271 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
message length:153
272 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
error length:0
272 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
bytesLength:0
272 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
info value:0
272 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
message length greater than zero
272 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
IRODSConnection.read, byte array size = 153
272 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
offset = 0
273 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
length = 153
276 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
message from IRODS read
back:<authRequestOut_PI><challenge>ueRcRrBpJBdO6M37m
+9RZ4KFfQ6KTtussZUmX7Lke3yHOT+krKAeZw5w8oo1YJIBDqG
+4ektODwVebvqzFB3Aw==</challenge>
</authRequestOut_PI>

276 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
cached challenge response:ueRcRrBpJBdO6M37m
+9RZ4KFfQ6KTtussZUmX7Lke3yHOT+krKAeZw5w8oo1YJIBDqG
+4ektODwVebvqzFB3Aw==
385 [main] INFO org.irods.jargon.core.connection.IRODSCommands -
calling irods function with byte array
386 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
calling irods function
with:<authResponseInp_PI><response>vNxD6EEy8Q15HOzFC7aOkA==</response>
<username>irods</username>
</authResponseInp_PI>

386 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
api number is:704
386 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
functionID: 704
386 [main] INFO org.irods.jargon.core.connection.IRODSCommands -
reading message from irods
386 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
IRODSConnection.read, byte array size = 4
387 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
offset = 0
387 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
length = 4
391 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
IRODSConnection.read, byte array size = 145
391 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
offset = 0
391 [main] DEBUG org.irods.jargon.core.connection.IRODSConnection -
length = 145
395 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
message length:0
396 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
error length:0
396 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
bytesLength:0
396 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
info value:-832000
396 [main] DEBUG org.irods.jargon.core.connection.IRODSCommands -
info is < 0
org.irods.jargon.core.exception.JargonException: error code recieved
from iRODS:-832000
at
org.irods.jargon.core.connection.IRODSErrorScanner.inspectAndThrowIfNeeded(IRODSErrorScanner.java:
95)
at
org.irods.jargon.core.connection.IRODSCommands.processMessageInfoLessThanZero(IRODSCommands.java:
765)
at
org.irods.jargon.core.connection.IRODSCommands.readMessage(IRODSCommands.java:
701)
at
org.irods.jargon.core.connection.IRODSCommands.readMessage(IRODSCommands.java:
667)
at
org.irods.jargon.core.connection.IRODSCommands.irodsFunction(IRODSCommands.java:
269)
at
org.irods.jargon.core.connection.IRODSCommands.irodsFunction(IRODSCommands.java:
192)
at
org.irods.jargon.core.connection.IRODSCommands.sendStandardPassword(IRODSCommands.java:
1128)
at
org.irods.jargon.core.connection.IRODSCommands.startupConnection(IRODSCommands.java:
140)
at
org.irods.jargon.core.connection.IRODSCommands.<init>(IRODSCommands.java:
126)
at
org.irods.jargon.core.connection.IRODSCommands.instance(IRODSCommands.java:
173)
at
org.irods.jargon.core.connection.IRODSSimpleProtocolManager.getIRODSProtocol(IRODSSimpleProtocolManager.java:
54)
at
org.irods.jargon.core.connection.IRODSSession.connectAndAddToProtocolsMap(IRODSSession.java:
306)
at
org.irods.jargon.core.connection.IRODSSession.currentConnection(IRODSSession.java:
265)
at
org.irods.jargon.core.pub.IRODSGenericAO.<init>(IRODSGenericAO.java:
61)
at
org.irods.jargon.core.pub.EnvironmentalInfoAOImpl.<init>(EnvironmentalInfoAOImpl.java:
43)
at
org.irods.jargon.core.pub.IRODSAccessObjectFactoryImpl.getEnvironmentalInfoAO(IRODSAccessObjectFactoryImpl.java:
212)
at nl.we.jargontest.App.main(App.java:31)


Any help in setting up a connection to iRODS would be appreciated!

Willem Elbers

Conway, Mike

unread,
Feb 17, 2012, 9:12:14 AM2/17/12
to irod...@googlegroups.com
Hi Willem,

Is your user name correct (rods vs. irods)?

I've been adding to the Jargon exception hierarchy, and I can make this
clearer by adding some exceptions for this particular case


Your code looks correct otherwise!
MC

https://www.irods.org/index.php/iRODS_Error_Codes#Catalog_Library_Errors_80
0000_-_880000


CAT_INVALID_CLIENT_USER -832000

Cheers,
MC
---------------------
Mike Conway
Java Architect ­ DICE
www.irods.org

skype:michael.c.conway
LinkedIn: http://www.linkedin.com/pub/mike-conway/5/78a/231

>--
>"iRODS: the Integrated Rule-Oriented Data-management System; A community
>driven, open source, data grid software solution" https://www.irods.org
>
> iROD-Chat: http://groups.google.com/group/iROD-Chat

Willem Elbers

unread,
Feb 17, 2012, 9:36:47 AM2/17/12
to iROD-Chat
Hi Mike,

yes, the username is correct. I am using irods:irods see the following
snipper from irods.config from the config directory:

$IRODS_HOME = '/lat/irods/irods3.0';
$IRODS_PORT = '1247';
$SVR_PORT_RANGE_START = '20000';
$SVR_PORT_RANGE_END = '20199';
$IRODS_ADMIN_NAME = 'irods';
$IRODS_ADMIN_PASSWORD = 'irods';
$IRODS_ICAT_HOST = '';

When using the icommands on the command line everything is working
fine.

The following is what I see in the rodsLog file for each attempt:
Feb 17 14:53:31 pid:87449 NOTICE: rsAuthCheck user irods
Feb 17 14:53:31 pid:87449 NOTICE: rsAuthCheck: chlCheckAuth status =
-832000
Feb 17 14:53:31 pid:87449 NOTICE: rsAuthResponse: rxAuthCheck failed,
status = -832000
Feb 17 14:53:31 pid:87449 ERROR: readMsgHeader:header read- read 0
bytes, expect 4, status = -4002
Feb 17 14:53:31 pid:87449 NOTICE: Agent exiting with status = -4002

Best,
Willem Elbers

On Feb 17, 3:12 pm, "Conway, Mike" <michael_con...@unc.edu> wrote:
> Hi Willem,
>
> Is your user name correct (rods vs. irods)?
>
> I've been adding to the Jargon exception hierarchy, and I can make this
> clearer by adding some exceptions for this particular case
>
> Your code looks correct otherwise!
> MC
>
> https://www.irods.org/index.php/iRODS_Error_Codes#Catalog_Library_Err...
> 0000_-_880000
>
> CAT_INVALID_CLIENT_USER          -832000
>
> Cheers,
> MC
> ---------------------
> Mike Conway
> Java Architect ­ DICEwww.irods.org
>
> skype:michael.c.conway
> LinkedIn:http://www.linkedin.com/pub/mike-conway/5/78a/231
>
> ...
>
> read more »

Willem Elbers

unread,
Feb 17, 2012, 9:53:01 AM2/17/12
to iROD-Chat
Hi Mike,

I have added a new test user (test:test) and that seems to work.

Is there anything special about the username password combination
irods:irods?

Best,
Willem Elbers
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages