powered by Jive Software

File transfer failure on delayed network


#1

I am using spark on a radio network that a round trip is about 20 second.
We can use spark clients using large “response timeouts” to be able to work on radio network.
Chat facilities are working without any problem bu we live some problem in file transfer.

The following exception occurs after file transfer is accepted and some time is passed;
smackx.filetransfer.IncomingfileTransfer.negotiateStream(.IncomingfileTransfer.java:199)

When I looked at the file IncomingfileTransfer.java line 199 it seems that it is
"throw new SmackException(“Error in execution”, e);" exception.

Firstly I thought that it is a timeout problem because of long round-trip times but there is also a timeout exception available in line 202;
" throw new SmackException(“Request timed out”, e);" and it is not trown.

note that when I kill the sender spark instance during negotiation process the same exception happens.

The source of exception happens in method line 193 ;

"inputStream = streamNegotiatorTask.get(15, TimeUnit.SECONDS);"
It means that after 15 second the neagotiation must finished but this is not the case in our network(may last 10 min.).

Also I decreased the round-trip time in the radio network the problem disappears.

As a result alhough from the exception it does not seem a timeout problem, I think it is a timeout problem because of line 193.
I think its timeout value must be the same as file transsfer timeout defined in File Transfer Preference->Transfer Timeout.

Best Regards…


#2

As i’m not a developer, i can’t tell whether it is a bug or an intended behavior about that exception. Maybe the timeout value in the preferences is only for the other party to accept the download and that’s why you are able to press Accept (when i tried to wait longer than a minute, i wasn’t able to accept the transfer anymore, although it didn’t show an error). And when you accept the transfer, then that 15 seconds timeout value is applied.

You can try 2.9.0 nightly build and enable In-Band Bytestreams Only setting in the same preferences menu. Though it probably uses same timeouts. https://www.igniterealtime.org/downloads/nightly_spark.jsp

Another solution would be to make this transfer initiation timeout configurable. But unless someone provides a patch it won’t be done. There are no active developers working on Spark. I have filed https://issues.igniterealtime.org/browse/SPARK-2057 for this. But it is even more complex as the line you have found is actually in the Smack library. So first it has to be made configurable in the Smack library (if their developers would accept such change), then Spark has to be updated to that version of Smack which can be a huge task in itself and only then it can be made configurable in Spark. You can ask about it in Smack forum.


File transfer negotiation problem
#3

You may also try older Spark version 2.7.7, which used older Smack library, which might have operated differently, though the chance is small https://github.com/igniterealtime/Spark/releases/tag/v2.7.7