Problems/Exceptions with FileTransfer

Hi,

we are having problems with the Smack File Transfer.

If the sender sends a file, he gets this exception:

No response from server.:

at org.jivesoftware.smackx.packet.SyncPacketSend.getReply(SyncPacketSend.java:50)

at org.jivesoftware.smackx.packet.SyncPacketSend.getReply(SyncPacketSend.java:61)

at org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager.establishSessio n(InBandBytestreamManager.java:416)

at org.jivesoftware.smackx.filetransfer.IBBTransferNegotiator.createOutgoingStream (IBBTransferNegotiator.java:67)

at org.jivesoftware.smackx.filetransfer.FaultTolerantNegotiator.createOutgoingStre am(FaultTolerantNegotiator.java:146)

at org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer.negotiateStream(Outgo ingFileTransfer.java:373)

at org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer.access$100(OutgoingFi leTransfer.java:35)

at org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer$3.run(OutgoingFileTra nsfer.java:281)

And the recipient gets this exception:

Error in execution:

– caused by: java.util.concurrent.ExecutionException:

– caused by: Could not establish socket with any provided host: item-not-found(404) Could not establish socket with any provided host

at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer.negotiateStream(Incom ingFileTransfer.java:199)

at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer.access$100(IncomingFi leTransfer.java:47)

at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer$1.run(IncomingFileTra nsfer.java:124)

at java.lang.Thread.run(Thread.java:722)

Nested Exception:

java.util.concurrent.ExecutionException:

– caused by: Could not establish socket with any provided host: item-not-found(404) Could not establish socket with any provided host

at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:262)

at java.util.concurrent.FutureTask.get(FutureTask.java:119)

at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer.negotiateStream(Incom ingFileTransfer.java:193)

at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer.access$100(IncomingFi leTransfer.java:47)

at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer$1.run(IncomingFileTra nsfer.java:124)

at java.lang.Thread.run(Thread.java:722)

Caused by:

– caused by: Could not establish socket with any provided host: item-not-found(404) Could not establish socket with any provided host

at org.jivesoftware.smackx.filetransfer.FaultTolerantNegotiator.createIncomingStre am(FaultTolerantNegotiator.java:113)

at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer$2.call(IncomingFileTr ansfer.java:186)

at org.jivesoftware.smackx.filetransfer.IncomingFileTransfer$2.call(IncomingFileTr ansfer.java:183)

Both are connected by using a host file entry (C:\Windows\System32\drivers\etc\hosts) to resolve the server name to an IP address.

Is this the problem?

Hard to tell. I can only point you to https://github.com/Flowdalic/asmack/wiki/aSmack-XMPP-File-Transfer which is for aSmack but still applies to Smack.

I’ve analyzed this a bit, but haven’t come too far.

Please can anybody help me here?

I’ve tested with 2 clients both using Spark 2.6.3 (should use Smack 3.2.1) and it works (I guess over IBB).

Then I test my client and send a file to the other Spark client and it works, except I don’t get any progress updates.

Then the other Spark client sends a file to my client and it doesn’t work. (I get the receiver error above).

I studied the Spark code and it just uses the Smack API, so I really wonder, where’s the difference.

Is there some connection configuration maybe?

Does anybody know, what have been fixed in between Spark Version 2.5.8 and Spark 2.6.3 concerning this error?

Because I am still struggling with it and according to this http://community.igniterealtime.org/thread/44600

it could been fixed in Spark.

I debugged Spark and it just uses the same Smack file transfer. So I don’t know what should be different with my implementation.

Is there anything in the SmackConfiguration to be done?