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]: - Closing session due to incorrect hostname in stream header. Host: Connection: socket: Socket[addr=/,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: to a RS in the domain of: (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: { ->}] - 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: '' to remote domain: ''] - 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 { ->}
java.lang.Exception: Failed to create connection to remote server
        at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.establishConnection( ~[xmppserver-4.7.5.jar:4.7.5]
        at org.jivesoftware.openfire.server.OutgoingSessionPromise$ [xmppserver-4.7.5.jar:4.7.5]
        at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:1.8.0_372]
        at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_372]
        at [?:1.8.0_372]

Openfire is connected to our AD domain so all users authenticate using their Windows account. is our AD domain, 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 “”. This means that all of the Openfire users are identified as users of that domain. A typical user identifier would look something like this:

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:

Openfire will identify as an XMPP domain that’s not it’s own XMPP domain (because that is, 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 (, or,
  2. alternatively, you can instruct your users to add people to their contact list using the full addresses using the ( format.

Thanks, using worked.

1 Like