Issue adding new contacts

We are running Openfire 4.7.5 on CentOS and Spark 3.0.2 on Windows 10/11. Users can log in and chat with existing contacts without issue. However, if they try to add a new contact, the new person never gets a prompt to authorize it. Also, if they try to chat with the pending contact, the chat window shows the error “remote-server-not-found”. I don’t know when this issue started since Spark is only used by 1 department and there is very little staff turnover.
Here is what I see in openfire.log when trying to chat with the pending contact:

2023.06.07 10:03:50 WARN  [Server SR - 938196981]: org.jivesoftware.openfire.net.SocketReader - Closing session due to incorrect hostname in stream header. Host: 8thjd.com. Connection: org.jivesoftware.openfire.net.SocketConnection@47146276 socket: Socket[addr=/192.168.1.4,port=57004,localport=5269] session: null
2023.06.07 10:03:50 WARN  [S2SOutgoingPromise-8]: org.jivesoftware.openfire.server.ServerDialback[Acting as Originating Server: Create Outgoing Session from: intranet.8thjd.com to a RS in the domain of: 8thjd.com (port: 5269)] - Unable to create a new outgoing session
2023.06.07 10:03:50 WARN  [S2SOutgoingPromise-8]: org.jivesoftware.openfire.session.LocalOutgoingServerSession[Create outgoing session for: {intranet.8thjd.com -> 8thjd.com}] - Unable to create a new session: Dialback (as a fallback) failed.
2023.06.07 10:03:50 WARN  [S2SOutgoingPromise-8]: org.jivesoftware.openfire.session.LocalOutgoingServerSession[Authenticate local domain: 'intranet.8thjd.com' to remote domain: '8thjd.com'] - Unable to authenticate: Fail to create new session.
2023.06.07 10:03:50 WARN  [S2SOutgoingPromise-8]: org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor - An exception occurred while trying to establish a connection for {intranet.8thjd.com -> 8thjd.com}
java.lang.Exception: Failed to create connection to remote server
        at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.establishConnection(OutgoingSessionPromise.java:311) ~[xmppserver-4.7.5.jar:4.7.5]
        at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.run(OutgoingSessionPromise.java:254) [xmppserver-4.7.5.jar:4.7.5]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_372]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_372]
        at java.lang.Thread.run(Thread.java:750) [?:1.8.0_372]

Openfire is connected to our AD domain so all users authenticate using their Windows account. 8thjd.com is our AD domain, intranet.8thjd.com is the server running Openfire.

The XMPP protoocol, which is the chat protocol that Openfire is implementing, uses its own ‘domain names’.

Your Openfire server uses the XMPP domain name “intranet.8thjd.com”. This means that all of the Openfire users are identified as users of that domain. A typical user identifier would look something like this: johndoe@intranet.8thjd.com.

It appears that when your users are trying to add someone to their contact list, they’re using the shorter domain name, and try to add a user using an identifier like this: johndoe@8thjd.com.

Openfire will identify 8thjd.com as an XMPP domain that’s not it’s own XMPP domain (because that is intranet.8thjd.com), and will try to establish a server-to-server connection to what it believes to be a remote domain (much like how email would work). This attempt is failing, which is what you see being logged.

I think that either one of these approaches will resolve your issue:

  1. You could re-install your Openfire server and configure it to use the XMPP domain name that your users appear to naturally gravitate towards (8thjd.com), or,
  2. alternatively, you can instruct your users to add people to their contact list using the full addresses using the (johndoe@intranet.8thjd.com) format.

Thanks, using user@intranet.8thjd.com worked.

1 Like