Openfire

route.all-resources does not work

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 3.6.4
  • Fix Version/s: 3.7.0 beta
  • Component/s: Core
  • Labels:
    None
  • Acceptance Test - Add?:
    No

Description

http://www.igniterealtime.org/community/message/193376

Appears that route.all-resources is not working as expected.

Activity

Hide
Adam Twardowski added a comment -

I am using Ubuntu-server 9.04, with the openfire_3.6.4_all.deb package from your website. I added route.all-resources=true in System->Server Manager->system properties. I have pidgin logged in from my linux desktop, and windows desktop machines to the same JID, both with priority 1, then I have a colleague send me a message it only appears on one client.

Show
Adam Twardowski added a comment - I am using Ubuntu-server 9.04, with the openfire_3.6.4_all.deb package from your website. I added route.all-resources=true in System->Server Manager->system properties. I have pidgin logged in from my linux desktop, and windows desktop machines to the same JID, both with priority 1, then I have a colleague send me a message it only appears on one client.
Hide
Ken added a comment -

Not working on winserver2003 as well with openfire 3.6.4.

Show
Ken added a comment - Not working on winserver2003 as well with openfire 3.6.4.
Hide
rhuk added a comment -

Have this issue with multiple machines running ichat. Big pain

Show
rhuk added a comment - Have this issue with multiple machines running ichat. Big pain
Hide
Guus der Kinderen added a comment -

I've used a simple Smack based application to test for this issue. Openfire works exactly as expected, as far as I can see. If I enable route.all-resources, the following is logged to system out:

Con A: Message received: <message id="GTK7R-12" to="test02@guusdk.mine.nu" from="test01@guusdk.mine.nu/Smack"><body>This is a test.</body></message>
Con B: Message received: <message id="GTK7R-12" to="test02@guusdk.mine.nu" from="test01@guusdk.mine.nu/Smack"><body>This is a test.</body></message>

I'm not sure why people perceive the described problem. Perhaps the people that experience the issue use a client that sends a directed message (addressed to a full JID)? Doing a packet dump at all three ends might shed some light on the problem.

import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.filter.PacketTypeFilter;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;

public class AllResourcesClient {

	public static void main(String[] args) throws Exception {
		final ConnectionConfiguration conf = new ConnectionConfiguration(
				"localhost", 5222, "guusdk.mine.nu");

		final String send = "test01";
		final String recv = "test02";

		final XMPPConnection con1 = new XMPPConnection(conf);
		final XMPPConnection con2a = new XMPPConnection(conf);
		final XMPPConnection con2b = new XMPPConnection(conf);

		con1.connect();
		con2a.connect();
		con2b.connect();

		con1.login(send, "test");
		con2a.login(recv, "test", "a");
		con2b.login(recv, "test", "b");

		con2a.addPacketListener(new PacketListener() {

			@Override
			public void processPacket(Packet packet) {
				System.out
						.println("Con A: Message received: " + packet.toXML());

			}
		}, new PacketTypeFilter(Message.class));

		con2b.addPacketListener(new PacketListener() {

			@Override
			public void processPacket(Packet packet) {
				System.out
						.println("Con B: Message received: " + packet.toXML());

			}
		}, new PacketTypeFilter(Message.class));

		final Message message = new Message(recv + "@" + conf.getServiceName());
		message.setBody("This is a test.");
		con1.sendPacket(message);

		Thread.sleep(1000);

		con1.disconnect();
		con2b.disconnect();
		con2a.disconnect();
	}
}
Show
Guus der Kinderen added a comment - I've used a simple Smack based application to test for this issue. Openfire works exactly as expected, as far as I can see. If I enable route.all-resources, the following is logged to system out:
Con A: Message received: <message id="GTK7R-12" to="test02@guusdk.mine.nu" from="test01@guusdk.mine.nu/Smack"><body>This is a test.</body></message>
Con B: Message received: <message id="GTK7R-12" to="test02@guusdk.mine.nu" from="test01@guusdk.mine.nu/Smack"><body>This is a test.</body></message>
I'm not sure why people perceive the described problem. Perhaps the people that experience the issue use a client that sends a directed message (addressed to a full JID)? Doing a packet dump at all three ends might shed some light on the problem.
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.filter.PacketTypeFilter;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;

public class AllResourcesClient {

	public static void main(String[] args) throws Exception {
		final ConnectionConfiguration conf = new ConnectionConfiguration(
				"localhost", 5222, "guusdk.mine.nu");

		final String send = "test01";
		final String recv = "test02";

		final XMPPConnection con1 = new XMPPConnection(conf);
		final XMPPConnection con2a = new XMPPConnection(conf);
		final XMPPConnection con2b = new XMPPConnection(conf);

		con1.connect();
		con2a.connect();
		con2b.connect();

		con1.login(send, "test");
		con2a.login(recv, "test", "a");
		con2b.login(recv, "test", "b");

		con2a.addPacketListener(new PacketListener() {

			@Override
			public void processPacket(Packet packet) {
				System.out
						.println("Con A: Message received: " + packet.toXML());

			}
		}, new PacketTypeFilter(Message.class));

		con2b.addPacketListener(new PacketListener() {

			@Override
			public void processPacket(Packet packet) {
				System.out
						.println("Con B: Message received: " + packet.toXML());

			}
		}, new PacketTypeFilter(Message.class));

		final Message message = new Message(recv + "@" + conf.getServiceName());
		message.setBody("This is a test.");
		con1.sendPacket(message);

		Thread.sleep(1000);

		con1.disconnect();
		con2b.disconnect();
		con2a.disconnect();
	}
}
Hide
Guus der Kinderen added a comment -

I'm resolving this issue as "Cannot Reproduce." If new information becomes available, we can reopen it.

Show
Guus der Kinderen added a comment - I'm resolving this issue as "Cannot Reproduce." If new information becomes available, we can reopen it.
Hide
Guus der Kinderen added a comment -

To clarify:

The route.all-resources option will cause the message to be delivered to all resources that share the same priority, if that priority is the highest priority of the all the current connections for that user.

For example, if a message is send to a user that has three connections with these resource names and priorities (provided that route.all-resources is set to true:

resource priority
A 2
B 2
C 1

then, the message will arrive at both resource A and B.

If, however, these are the priorities of all connections, only resource C will receive the message:

resource priority
A 1
B 1
C 2
Show
Guus der Kinderen added a comment - To clarify: The route.all-resources option will cause the message to be delivered to all resources that share the same priority, if that priority is the highest priority of the all the current connections for that user. For example, if a message is send to a user that has three connections with these resource names and priorities (provided that route.all-resources is set to true:
resource priority
A 2
B 2
C 1
then, the message will arrive at both resource A and B. If, however, these are the priorities of all connections, only resource C will receive the message:
resource priority
A 1
B 1
C 2
Hide
Markus Flaig added a comment -

I do not understand why this issue can not be reproduced, I am experiencing this behaviour on both Openfire installations I am running. Installed version is 3.6.4, the option "route.all-resources" is set to "true", server has been restarted after applying this setting.

I have two clients connected with different resources but same priority (1), I can see them in the sessions page, both active, both with the same priority.
The messaging client in use is pidgin (on both machines). The messages are definetly not routed to both machines!

What information do you need in order to fix this issue?

Show
Markus Flaig added a comment - I do not understand why this issue can not be reproduced, I am experiencing this behaviour on both Openfire installations I am running. Installed version is 3.6.4, the option "route.all-resources" is set to "true", server has been restarted after applying this setting. I have two clients connected with different resources but same priority (1), I can see them in the sessions page, both active, both with the same priority. The messaging client in use is pidgin (on both machines). The messages are definetly not routed to both machines! What information do you need in order to fix this issue?
Hide
Markus Flaig added a comment -

Just to clarify, I have tried that with the PSI client to make sure it isn't a Pidgin thing. Same situation with PSI. Can it really be an implementation issue on two clients?

Show
Markus Flaig added a comment - Just to clarify, I have tried that with the PSI client to make sure it isn't a Pidgin thing. Same situation with PSI. Can it really be an implementation issue on two clients?
Hide
wroot added a comment -

I have just tried with Spark and Exodus using the same JID and priority. Then i have joined with Pidgin (different user) and sent a message to first user. Both Spark and Exodus got it. But it doesn't work when i use Pidgin and Exodus for one user. Only Exodus gets the message. I don't know what could be the cause. Maybe something different in the implementation of priorities in Pidgin (and Psi). Though Openfire shows 1 priority for all clients on the Sessions page.

Show
wroot added a comment - I have just tried with Spark and Exodus using the same JID and priority. Then i have joined with Pidgin (different user) and sent a message to first user. Both Spark and Exodus got it. But it doesn't work when i use Pidgin and Exodus for one user. Only Exodus gets the message. I don't know what could be the cause. Maybe something different in the implementation of priorities in Pidgin (and Psi). Though Openfire shows 1 priority for all clients on the Sessions page.
Hide
wroot added a comment -

Actually, it works for me with Pidgin too (Pidgin and Exodus with same JID and priority), it's just Pidgin by default doesnt popup new messages (i really dislike this client..). So, in your case only one Pidgin gets the message? Maybe this happens when both resources are on Pidgin. What if you mix the clients?

Show
wroot added a comment - Actually, it works for me with Pidgin too (Pidgin and Exodus with same JID and priority), it's just Pidgin by default doesnt popup new messages (i really dislike this client..). So, in your case only one Pidgin gets the message? Maybe this happens when both resources are on Pidgin. What if you mix the clients?
Hide
Nabil Sayegh added a comment -

@Markus Flaig I'm pretty sure, that your problem is, that the clients are sending to a full JID and not a bare JID.
The intensions of route.all-resources seems to be to route only bare JIDs to all resources with the same (highest) priority resources.

However, I also need the possibility to override this behavior. Isn't there a way to configure openfire to route even full JID messages to all resources with the same highest priority?

Show
Nabil Sayegh added a comment - @Markus Flaig I'm pretty sure, that your problem is, that the clients are sending to a full JID and not a bare JID. The intensions of route.all-resources seems to be to route only bare JIDs to all resources with the same (highest) priority resources. However, I also need the possibility to override this behavior. Isn't there a way to configure openfire to route even full JID messages to all resources with the same highest priority?

People

Vote (6)
Watch (10)

Dates

  • Created:
    Updated:
    Resolved: