powered by Jive Software

No file transfer with Spark 2.8.0?

Server: Ubuntu Linux 14.03, Openfire 4.0.3

Clients: Win8 Pro, Spark 2.8.0

Both clients are in different locations and behind a firewall. Chat works without problems, but I can´t transfer any files (or screenshots) after update to 2.8.0.

When I try to send from client A to client B, I click on “accept” and I can see the progress bar and the “Negotiating connection streams, please wait…” message.

After a few seconds, I get a “There was an error during file transfer” message

This is the log from client B (receiver), no log on client A. When I try to send from client B to client A, it´s vice versa.

Aug 31, 2016 12:45:14 PM org.jivesoftware.spark.util.log.Log error

SEVERE: There was an error during file transfer.

org.jivesoftware.smack.SmackException: Error in execution

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

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

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

at java.lang.Thread.run(Unknown Source)

Caused by: java.util.concurrent.ExecutionException: org.jivesoftware.smack.XMPPException$XMPPErrorException: Could not establish socket with any provided host

at java.util.concurrent.FutureTask.report(Unknown Source)

at java.util.concurrent.FutureTask.get(Unknown Source)

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

… 3 more

Caused by: org.jivesoftware.smack.XMPPException$XMPPErrorException: Could not establish socket with any provided host

at org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamRequest.cancelReques t(Socks5BytestreamRequest.java:286)

at org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamRequest.accept(Socks 5BytestreamRequest.java:255)

at org.jivesoftware.smackx.filetransfer.Socks5TransferNegotiator.negotiateIncoming Stream(Socks5TransferNegotiator.java:104)

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

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

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

at java.util.concurrent.FutureTask.run(Unknown Source)

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

… 3 more

Any ideas? Do I do something wrong or is it a bug?

I just downgraded one client to Spark 2.7.7.810.

Now I can send files from the Spark 2.8.0 client to the 2.7.7 client. But the other way arround -> still the same problem as described above.

So this looks much more like bug to me…

I have done a little bit of testing between Win7 64-bit (on VirtualBox host), WinXP (VM), Ubuntu 16.04 (VM), Xubuntu 16.04 (VM), Win7 32-bit (VM) with Spark 2.8.0 (tar.gz version on Linux boxes). File transfer and screenshot sending worked both ways in all cases. Except for Ubuntu to Xubuntu (again it worked Xubuntu to Ubuntu for some reason). When it was failing it was logging the same error on Xubuntu side. I have filed this as https://issues.igniterealtime.org/browse/SPARK-1793

As for interoperability between 2.7 and 2.8, it was already reported in another thread. As i’ve said there, this case probably won’t get much attention. Unless fixing the mentioned ticket will somehow fix that as swell (as the error is similar). Not sure who an when will look into this. Spark only gets a sporadic attention from a few volunteers.

Thanks for your feedback!

As for interoperability between 2.7 and 2.8, it was already reported in another thread.

You are right, https://community.igniterealtime.org/message/259701#comment-259701

But the last sentence in this thread was “EDIT - File transfer works between two 2.8 clients. (Ubuntu Linux)”

In my case, file transfer between 2.8.0 clients doesn´t work (at least on Windows).

And you wrote in a reply: “My users are all on 2.7 now, and i plan to move them all to 2.8 in a few days span.”

Do you only have Linux clients? Or don´t you use the file transfers feature? I sometimes find it very handy…

EDIT:

I was curious and put the two windows machines in the same IP subnet. And guess what - it worked without any problem.

I was able to send from 2.7.7 client to 2.8.0 client and vice versa. Then I updated the 2.7.7 client to 2.8.0 and it still works!

As I understand from here: https://www.igniterealtime.org/support/articles/filetransfer.jsp

There are 3 methods for file transfer. In the same subnet I asume the first method is used.

In my initial test, the clients haven´t been in the same subnet, but seperated by firewall(s). So maybe a problem with method 2 or 3?

I was only testing in one subnet (it is created virtually by VortualBox host) and it wasn’t sending from Xubuntu to Ubuntu. I have also tried at work (again, same subnet) and it works between 2.8 and and also from 2.8 to 2.7. And it also worked fine from 2.7 to 2.8 (though it was 2x slower). We use Win7 at work.

So, it seems that the problem occurs when Spark for some reason falls back to SOCKS5 transfer (being in different subnets probably causes that, or firewall issues).

I had a few spare minutes and did some more tests…

Test setup:

A. Laptop with Windows 8.1 and Spark 2.8.0 in subnet 192.168.1.0/24

B. PC with Windows 8.1 and Spark 2.8.0 in subnet 192.168.2.0/24

“A” can send files to “B” - when there are no port/IP restrictions between the subnets. (and vice versa)

Both clients have an established TCP connection to the openfire server on port 5222.

When the transfer starts, the sending client opens a TCP connection to port 7777 on the receiving client and the data is transfered in this connection. When the transfer is finished, this connection is closed immediately.

Conclusion: As Peer-2-Peer file transfer works, it´s file transfer through proxy / In-Band file transfer which doesn´t work…

Do you have File Transfer Proxy enabled at Server Settings > File Transfer Settings in Admin Console? I think i have it disabled both at home and at work. It uses 7777 port.

Yes, of course I have it enabled. That was the first point to check before I did anything else.

I can also try to connect to the server “telnet 7777” and I get a connection from both clients. So that seems to work fine…