powered by Jive Software

Server to server connection not working as intended

BTW i`m having some troubles with the servers conection, i testing, instaled 2 servers in the same network, the network haves a DHCP server but no DNS server, the clients can see others clients in they server but they can not see the other server clientes ej:

Server1
batman@Server1
rocky@Server1
neo@Server1
-They all can chat with the clients iside the server1

Server2
catwoman@Server2
adrian@Server2
Trinity@Server2
-They all can chat with the clients iside the server2

When i try to client adrian@Server2 send an invitation to batman@Server1, they can`t see each other. They are instaled in the same network simple network:
server1 ip192.168.0.2 ------- server2 ip192.168.0.3
mask 255.255.255.0
dhcp server 192.168.0.1

The servers are instaled by default with internal db. Server to server configuration is the default when openfire is instaled.

Can u help me please??

Can you ping Server2 from Server1 by its name, not the IP? Have you tried disabling firewalls on both servers for testing?

I think it probably won’t work this way without a proper DNS setup. You may try adding each server’s name (xmpp domain value) into every server’s hosts file. But it might not work as maybe every client also has to be able to resolve both names on the client machine.

You are trying to perform XMPP federation on your local area network (LAN). You will need service records in your DNS. You did not specify what clients you are using. It is mostly likely that TLS is being requested. This means you need SSL certificates on both servers.

Can you ping Server2 from Server1 by its name, not the IP?

DONE in the first test, it replyes fine by the name

Have you tried disabling firewalls on both servers for testing?

Both are disabled!!! no antivirus, and and in both pc network configuration(Public-Workplace-Home) is set in home

I think it probably won’t work this way without a proper DNS setup. You may try adding each server’s name (xmpp domain value) into every server’s hosts file.

i haven´t set up a DNS server, i have set the host files (windows/system32/drivers/etc/host) in both computers

But it might not work as maybe every client also has to be able to resolve both names on the client machine.

Server-server secure TLS conections are disabled, client is spark. When i instaled spark and the first server i had a conection issue, bad certificate… something like that, i disabled secure conections.
The clients are instaled in the 2 servers

I have never used server to server connections myself, so i can only guess what can be wrong.

Are you able to login in Spark with users from both servers on one PC? Do you use Server1 and Server2 as Domain in Spark or do you use IP addresses?

I´m not using windows server, i´m using my windows 10 laptop, and a VMware Virtual PC windows 7. I can log with spark on both servers,(client1 instaled in Server1, can log in Server1 and Server2, client2 instaled in server2 can log in Server1 and Server2)

I´m not using a windows server domain, i tryed to conect via PC NAME, and IP.

In this image you can see i have acces from the virtual PC to my laptop shared files.

When i test te conection to daisy-laptop i get this:

XMPP

< iq type=“get” id=“771-2” from=“serverchat-pc” to=“daisy-laptop” >< ping xmlns=“urn:xmpp:ping” / > < / iq >
< iq type=“error” id=“771-2” to=“serverchat-pc” from=“daisy-laptop” > < ping xmlns=“urn:xmpp:ping” / > < error code=“404” type=“cancel”><remote-server-not-found xmlns=“urn:ietf:params:xml:ns:xmpp-stanzas” / >< / error > < / iq >

LOGS
Mon Jun 18 13:53:24 EDT 2018: INFO: Sending server to server ping request to daisy-laptop
Mon Jun 18 13:53:26 EDT 2018: WARN: Unable to create a socket connection to XMPP domain ‘daisy-laptop’ using remote host: daisy-laptop:5269. Cause: Connection refused: connect (a full stacktrace is logged on debug level)
Mon Jun 18 13:53:26 EDT 2018: WARN: Unable to create a socket connection to XMPP domain ‘daisy-laptop’: Unable to connect to any of its remote hosts.
Mon Jun 18 13:53:26 EDT 2018: INFO: Unable to create new session: Cannot create a plain socket connection with any applicable remote host.
Mon Jun 18 13:53:26 EDT 2018: WARN: Unable to authenticate: Fail to create new session.
Mon Jun 18 13:53:26 EDT 2018: INFO: Successful server to server response received.
Mon Jun 18 13:53:26 EDT 2018: ERROR: Primary packet routing failed
org.jivesoftware.openfire.PacketException: Cannot route packet of type IQ or Presence to bare JID:
at org.jivesoftware.openfire.spi.RoutingTableImpl.routeToLocalDomain(RoutingTableImpl.java:309)
at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.java:242)
at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.returnErrorToSender(OutgoingSessionPromise.java:342)
at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.run(OutgoingSessionPromise.java:241)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Mon Jun 18 13:53:26 EDT 2018: INFO: Failed to establish server to server session.

When i test the conection from my laptop to the virtual server i got this

XMPP
< iq type=“get” id=“739-5” from=“daisy-laptop” to=“serverchat-pc” > < ping xmlns=“urn:xmpp:ping” / > < / iq >
< iq type=“error” id=“739-5” to=“daisy-laptop” from=“serverchat-pc” > < ping xmlns=“urn:xmpp:ping” / > < error code=“404” type=“cancel” > < remote-server-not-found xmlns=“urn:ietf:params:xml:ns:xmpp-stanzas” / > < / error > < / iq >

LOGS
Mon Jun 18 13:59:35 GMT-04:00 2018: INFO: Sending server to server ping request to serverchat-pc
Mon Jun 18 13:59:35 GMT-04:00 2018: INFO: Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Remote Server Configurations
Mon Jun 18 13:59:50 GMT-04:00 2018: ERROR: An exception occurred while trying to extract plugin ‘ofmeet’:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(Unknown Source)
at java.util.zip.ZipFile.(Unknown Source)
at java.util.jar.JarFile.(Unknown Source)
at java.util.jar.JarFile.(Unknown Source)
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.unzipPlugin(PluginMonitor.java:347)
at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask.run(PluginMonitor.java:184)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Mon Jun 18 13:59:57 GMT-04:00 2018: WARN: Unable to create a socket connection to XMPP domain ‘serverchat-pc’ using remote host: serverchat-pc:5269. Cause: Connection timed out: connect (a full stacktrace is logged on debug level)
Mon Jun 18 13:59:57 GMT-04:00 2018: WARN: Unable to create a socket connection to XMPP domain ‘serverchat-pc’: Unable to connect to any of its remote hosts.
Mon Jun 18 13:59:57 GMT-04:00 2018: INFO: Unable to create new session: Cannot create a plain socket connection with any applicable remote host.
Mon Jun 18 13:59:57 GMT-04:00 2018: WARN: Unable to authenticate: Fail to create new session.
Mon Jun 18 13:59:57 GMT-04:00 2018: INFO: Successful server to server response received.
Mon Jun 18 13:59:57 GMT-04:00 2018: INFO: Failed to establish server to server session.

You are testing domain names daisy-laptop and serverchat-pc. Do you use these names to login in Spark? Also are these names the same as XMPP domain value on both servers (shown on the first page in Admin Console)?

XMPP log shows server not found error. Although further logs first show successful server to server response and then packet routing failure. From the host to virtual pc it shows time out. These logs are confusing to me. as i’ve said, i haven’t tried server to server setup, so not sure what is happening. Maybe even some routing issue in virtual environment.

You can try enabling Debug on the Logs page and see if it provides more useful information.