Problem connecting between 2 servers.

567 views
Skip to first unread message

Daniel Carrasco Marín

unread,
Dec 5, 2013, 10:29:02 AM12/5/13
to prosod...@googlegroups.com
Hi friends, first of all i'm sorry for my english.

I'm trying to create two chat servers, but i've problems with s2s. One of that servers is in Openfire, and the other is in prosody.
When i try to add an user from the other server i get an error, and the prosody log says:

Dec 05 15:51:00 stanzarouter    debug    Routing to remote...
Dec 05 15:51:00 mod_s2s    debug    opening a new outgoing connection for this stanza
Dec 05 15:51:00 mod_s2s    debug    stanza [presence] queued until connection complete
Dec 05 15:51:00 mod_s2s    debug    First attempt to connect to 192.168.2.253, starting with SRV lookup...
Dec 05 15:51:00 adns    debug    Records for _xmpp-server._tcp.192.168.2.253. not in cache, sending query (thread: 0x230ea50)...
Dec 05 15:51:00 adns    debug    Sending DNS query to 192.168.2.254
Dec 05 15:51:00 c2s222c3f0    debug    Received[c2s]: <iq id='lx3' type='result'>
Dec 05 15:51:00 stanzarouter    debug    Discarding iq from c2s of type: result
Dec 05 15:51:00 socket    debug    server.lua: closed client handler and removed socket from list
Dec 05 15:51:00 adns    debug    Reply for _xmpp-server._tcp.192.168.2.253. (thread: 0x230ea50)
Dec 05 15:51:00 mod_s2s    debug    192.168.2.253 has no SRV records, falling back to A/AAAA
Dec 05 15:51:00 adns    debug    Records for 192.168.2.253 not in cache, sending query (thread: 0x2313dd0)...
Dec 05 15:51:00 adns    debug    Sending DNS query to 192.168.2.254
Dec 05 15:51:00 adns    debug    Records for 192.168.2.253 not in cache, sending query (thread: 0x23175b0)...
Dec 05 15:51:00 adns    debug    Sending DNS query to 192.168.2.254
Dec 05 15:51:00 adns    debug    Reply for 192.168.2.253 (thread: 0x2313dd0)
Dec 05 15:51:00 socket    debug    server.lua: closed client handler and removed socket from list
Dec 05 15:51:00 adns    debug    Reply for 192.168.2.253 (thread: 0x23175b0)
Dec 05 15:51:00 mod_s2s    debug    DNS lookup failed to get a response for 192.168.2.253
Dec 05 15:51:00 s2sout230d910    info    Out of connection options, can't connect to 192.168.2.253
Dec 05 15:51:00 mod_s2s    debug    No other records to try for 192.168.2.253 - destroying
Dec 05 15:51:00 s2sout230d910    debug    Destroying outgoing session 192.168.2.237->192.168.2.253: DNS resolution failed
Dec 05 15:51:00 s2sout230d910    info    sending error replies for 1 queued stanzas because of failed outgoing connection to 192.168.2.253
Dec 05 15:51:00 stanzarouter    debug    Received[s2sin]: <presence type='error' to='xxxx...@192.168.2.237' from='xxxx...@192.168.2.253'>
Dec 05 15:51:00 c2s222c3f0    debug    Received[c2s]: <iq id='lx4' type='result'>
Dec 05 15:51:00 stanzarouter    debug    Discarding iq from c2s of type: result
Dec 05 15:51:14 s2sin22e72e0    debug    Destroying incomplete session 192.168.2.253->192.168.2.237 due to inactivity
Dec 05 15:51:14 s2sin22e72e0    debug    Disconnecting (unknown host)[s2sin_unauthed], <stream:error> is: connection-timeout
Dec 05 15:51:14 mod_s2s    debug    sending: <stream:error>
Dec 05 15:51:14 mod_s2s    debug    sending: </stream:stream>
Dec 05 15:51:14 s2sin22e72e0    info    incoming s2s stream 192.168.2.253->192.168.2.237 closed: connection-timeout
Dec 05 15:51:14 s2sin22e72e0    debug    Destroying incoming session 192.168.2.253->192.168.2.237: connection-timeout
Dec 05 15:51:14 s2sin22e72e0    debug    s2s disconnected: nil->nil (connection closed)
Dec 05 15:51:14 socket    debug    server.lua: closed client handler and removed socket from list


I've tested the connection between both servers with ping, nslookup, telnet server port... and all works fine but i don't know why i get dns error...
I've created two virtual machines with two prosody servers:
-If i try to add an openfire user from virtual machines servers then only works with IP, if i use dns name fails (dns name works and resolve).
-if i try to add an user from prosody server don't works even with ip and from all other servers.
-if i try to add an user between virtual machines works fine.

I've tried with IP and DNS (with virtualhost in config and user created) and don't know what happen...
Connection with users are fine using IP and DNS in all servers. I've seen that the other server was connected to a random port for a while, but fails too.

Someone know what i've to do?

Kim Alvefur

unread,
Dec 5, 2013, 10:42:26 AM12/5/13
to prosod...@googlegroups.com
Hi Daniel,

On 2013-12-05 16:29, Daniel Carrasco Marín wrote:
> Dec 05 15:51:00 mod_s2s debug First attempt to connect to
> 192.168.2.253, starting with SRV lookup...
> Dec 05 15:51:00 adns debug Records for
> _xmpp-server._tcp.192.168.2.253. not in cache, sending query (thread:
> 0x230ea50)...

Prosody does not support s2s to bare IP addresses, so this isn't going
to work.

> Someone know what i've to do?

You can use a plugin like mod_srvinjection[1] or mod_s2soutinjection[2],
but the best way is to set up DNS records.

[1]: https://code.google.com/p/prosody-modules/wiki/mod_srvinjection
[2]:
http://code.google.com/p/prosody-modules/source/browse/mod_s2soutinjection/mod_s2soutinjection.lua
(no docs, sorry)

> --
> You received this message because you are subscribed to the Google
> Groups "Prosody IM Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to prosody-user...@googlegroups.com.
> To post to this group, send an email to prosod...@googlegroups.com.
> Visit this group at http://groups.google.com/group/prosody-users.
> For more options, visit https://groups.google.com/groups/opt_out.


signature.asc

Daniel Carrasco Marín

unread,
Dec 5, 2013, 10:45:47 AM12/5/13
to prosod...@googlegroups.com
Edit: I've added an user created in prosody server to an user in virtual machine server and pidgin says that remote server is not found, but if i use netstat in prosody server (the remote server) then i get this:
tcp        0      0 chat:xmpp-server        XXX:49011          ESTABLISHED

The servers are connected but don't works...

Daniel Carrasco Marín

unread,
Dec 5, 2013, 10:58:17 AM12/5/13
to prosod...@googlegroups.com, za...@zash.se
Thanks for reply.

I've both servers added in DNS servers, and connection between both server works (ping, telnet...) if i use DNS name, but prosody still fails...
192.168.2.237 = work.ttu.red (prosody)
192.168.2.253 = maruja.red (openfire)

I've tried to add an user to 253 server using us...@192.168.2.237 and us...@work.ttu.red and both fails. I've tried the same in 237 but with us...@192.168.2.253 and us...@maruja.red and fails too.
I've two test prosody servers in virtual machines using 192.168.2.145 and 151 IP's, and if i try to add an user works in both using us...@192.168.2.145 and us...@192.168.2.151... but if i try to add an user from the other servers to a virtual machine server then:
-adding us...@maruja.red fails.
-adding us...@192.168.2.253 works
-adding us...@192.168.2.237 or us...@work.ttu.red fails.

Thanks, maybe i'll try to use that mods.
Reply all
Reply to author
Forward
0 new messages