How to bind an IP address for Spark?

When I use spark 2.6.0 to transmit a file to another spark 2.6.0, the transmision does not work!

I find the cause of this error using spark debug mode, that is the IP address spark binding is not correct.

My computer has two IP address, static for LAN and dynamic VPN IP address (i.e. for Internet access.

The openfire and spark should work within the LAN network, in other words, when transmitting a file to another spark client, the IP address for my spark should be, not But my spark tell the other side my IP is, so the file transferring does not work.

Can anyone tell me how to solve this problem?

Thanks very much!

Looks like an issue, where we will have to do some code changes. It works in our LAN set-up (dows not help you). Have you switched on the proxy mode for file transfer on your Openfire?

No, I turned off the proxy mode for file transferring to lower the load of openfire server.

When I turned on the proxy mode, the openfire didn’t bind an LAN network IP. The problem was still there.

I think the client should be able to set the binding IP for LAN network.

Thanks very much!

of course in your situation spark should use the LAN ip, but we had some problems with external users connecting to openfire server using VPN access. in this case the vpn client address is the right one to choose for file transport.

whatever, thanks for your assertion. the problems seems to be identified and the patch is mostly done…(in my head)

could be also be a smack problem, we’ll have a look

created ticket

So, we should give options for users to choose which IP to use for file transprt, yes?

If spark lists all the IPs (or MAC addresses) in a computer in the setting panel, users could choose a correct one.

I think this is a simple solution.

In addition, I think this could be helpful:

i tried to reproduce the problem with following configuration:

PC 1 (outside local network):

ethernet interface: static:

vpn interface: dynamic:

PC 2 (inside local network)

ethernet interface static:

now i tried to send a file from PC1 -> PC2

PC1 got package with the right ip:

  • *

but PC2 could not connect either, maybe it is blocked by our firewall because it is a socket5bytestream?!

  • *

  • *

  • Could not establish socket with any provided host*

  • *

Hmm, I think maybe you are right. The firewall blocked the connection.

Just ping PC1’s IP from PC2, you can tell if the connection from PC2 is blocked by the firewall or not.

yep, they could ping each other, because icmp packages are not blocked, i guess. but a package need about 120ms to, so it indicates that pc2 is a vpn client. ping pc’s inside the local network need about 10ms or less…

If two PCs are not in the same local network, using the file transmission proxy, I think, will be a better choice.

So, I turn on the proxy in my openfire. The transmission speed is not so slow either.