I have had an error occur when closing a file using jargon. The only
message I have got is below. The client (portal) that was saving a file
is running on the same server and the irods service has not been
affected and shows no errors in its log file that I can find. My server
is irods 2.1 and jargon version is 2.3. I would appreciate any help
that can be given in suggesting what caused it and what I can do to
avoid any repeats.
Thanks
Guy Warner
java.net.SocketException: Socket closed
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at edu.sdsc.grid.io.irods.IRODSConnection.flush(Unknown Source)
at edu.sdsc.grid.io.irods.IRODSCommands.close(Unknown Source)
at edu.sdsc.grid.io.irods.IRODSFileSystem.close(Unknown Source)
at edu.sdsc.grid.io.irods.IRODSFileSystem.finalize(Unknown Source)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
14:34:01,286 ERROR [IRODSCommands:?] IOException closing connection
java.net.SocketException: Socket closed
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at edu.sdsc.grid.io.irods.IRODSConnection.flush(Unknown Source)
at edu.sdsc.grid.io.irods.IRODSCommands.close(Unknown Source)
at edu.sdsc.grid.io.irods.IRODSFileSystem.close(Unknown Source)
at edu.sdsc.grid.io.irods.IRODSFileSystem.finalize(Unknown Source)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
14:34:01,286 ERROR [IRODSFileSystem:?] error on close
org.irods.jargon.core.exception.JargonException: error sending
disconnect on a close operation
at edu.sdsc.grid.io.irods.IRODSCommands.close(Unknown Source)
at edu.sdsc.grid.io.irods.IRODSFileSystem.close(Unknown Source)
at edu.sdsc.grid.io.irods.IRODSFileSystem.finalize(Unknown Source)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
org.irods.jargon.core.exception.JargonException: error sending
disconnect on a close operation
at edu.sdsc.grid.io.irods.IRODSCommands.close(Unknown Source)
at edu.sdsc.grid.io.irods.IRODSFileSystem.close(Unknown Source)
at edu.sdsc.grid.io.irods.IRODSFileSystem.finalize(Unknown Source)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
--
Dr Guy Warner
E-mail: g...@cs.stir.ac.uk
Address: Room 4B58 Cottrell Building,
Department of Computing Science & Mathematics,
University of Stirling, Scotland, FK9 4LA
Phone: 01786 467433
--
The Sunday Times Scottish University of the Year 2009/2010
The University of Stirling is a charity registered in Scotland,
number SC 011159.
If you are creating an IRODSFileSystem, then the best thing to do is close
that IRODSFileSystem, and avoid calling close() on the IRODSFile. The
close() method in IRODSFile is really only important in special
situations, where the caller does not have a reference to an
IRODSFileSystem. If you could send me the surrounding code, I could take a
look and perhaps give some tips on avoiding these messages. I would look
at where the IRODSFileSystem was created, and where close() was called
either on IRODSFileSystem or IRODSFile, or where an object instance was
left to finalizers.
Cheers,
Mike C
Mike Conway
DICE UNC Chapel Hill
http://www.irods.org
skype: michael.c.conway
google: michael....@gmail.com
>--
>"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
Thanks for help so far. I have attached the class I use for writing
irods files. This class essentially just wraps IRODSFileOutputStream so
as to avoid problems I encountered with not over-writing a file
correctly (I needed complete replacement not bitwise replacement). The
calling code typically uses a single IRODSFileSystem (cached as part of
the portal session) for several IRODSFile objects so I doubt I can call
close on it safely. I normally invoke this class with code along the
lines of:
FileWriteOutputStream fout = new FileWriteOutputStream(ddiFile);
ddiBuilder.marshal(fout);
fout.close();
I am reluctant to switch to a newer version of jargon since everything
else is working fine, but can look into that if necessary - provided it
is fully backwards compatible.
Thanks again.
Guy Warner
>> Department of Computing Science& Mathematics,