Skip navigation
7423 Views 41 Replies Latest reply: Nov 14, 2008 12:51 AM by crystal13282 RSS
crystal13282 Bronze 37 posts since
Oct 13, 2008
Currently Being Moderated

Oct 29, 2008 7:33 AM

Openfire can support many Server to Server?

Hi to all.

I want ask if Openfire can support many Server to Server connection between pc1 and pc2.

 

I have 2 pc, each one has 1 link ethernet:

pc1 -> eth0: 10.11.9.1

pc2 -> eth0: 10.11.7.1

 

and I already have established 1 connection S2S between pc1 and pc2 using port 5269.

I would like to know if is it possible esablish other S2S connection between pc1 and pc2 using different ports.

 

Thank you in advance.

Crystal

  • Coolcat KeyContributor 797 posts since
    Mar 19, 2007
    Currently Being Moderated
    Oct 29, 2008 7:43 AM (in response to crystal13282)
    Re: Openfire can support many Server to Server?

    You can connect to arbitrary many other servers using the same port. If one of your users adds an remote JabberID to his contact list, the server opens automatically a new connection to that server.

     

    serversessions.jpg

      • Coolcat KeyContributor 797 posts since
        Mar 19, 2007
        Currently Being Moderated
        Oct 29, 2008 8:22 AM (in response to crystal13282)
        Re: Openfire can support many Server to Server?
        do you understand my problem?

        probably not.

         

        Everything that is XMPP can be done over port 5269. You may wrap arbitrary data in an XMPP packet. Things that are not XMPP have nothing to do with Openfire. Of course you could open another port between the servers using other software running on the same machines. But that would be independent from Openfire. However, that 'other software' could also be an plugin for Openfire.

         

        P.S.: "voice traffic" and other large amounts of data are normally transferred using an peer-to-peer connection directly between the clients.

         

        Message was edited by: Coolcat

          • Coolcat KeyContributor 797 posts since
            Mar 19, 2007
            Currently Being Moderated
            Oct 29, 2008 9:23 AM (in response to crystal13282)
            Re: Openfire can support many Server to Server?
            what I want is to send different type of XMPP packets on different port.

            What a different type of XMPP packets would be? For different types of data you normally use different XML namespaces.

             

            Example:

            <iq from='romeo@montague.net/home' to='joogle@botster.shakespeare.lit' type='get' id='25asd82d'>
                <data xmlns='http://example.com/protocol/foobar'>
                    ....your data here...
                </data>
            </iq>

             

            Is it possible?

            I don't think so.

              • Coolcat KeyContributor 797 posts since
                Mar 19, 2007
                Currently Being Moderated
                Oct 29, 2008 10:54 AM (in response to crystal13282)
                Re: Openfire can support many Server to Server?
                Do you understand what I would like to do?

                No. Why you can't send that on the same port?

                  • Coolcat KeyContributor 797 posts since
                    Mar 19, 2007
                    Currently Being Moderated
                    Oct 30, 2008 10:49 AM (in response to crystal13282)
                    Re: Openfire can support many Server to Server?
                    Alarm message has major priority of Alert message.

                    Ah, okay....now I understood your problem

                     

                    I would try the following:

                     

                    • Write your own plugin that establishes an new connection to an equal plugin on the other side. You can use everything of JavaAPI in plugins, maybe you will need additional libraries, but it should be possible.
                    • Your plugin needs to implement the PacketInterceptor interface. Also you need an (empty) implementation of the Component interface.
                    • Use the interceptor to scan processed packets for outgoing high priority messages. Send a copy of these packets through your high priority connection. You will need to drop the high priority packets, so they are not send through the normal connection. Therefor you will need to distinguish between IQ and other packets:
                      • IQ packets cannot be dropped without returning an error, so you will need to reroute them to your own component, so they run into trash. Just set Packet#setTo(componentJID);
                      • For other packets throw an PacketRejectedException

                    • When your plugin recieves packets over the high priority connection, you can simply inject them into Openfire by using PacketRouter#route(packet); Make sure your plugin does not intercept such packets again and sends them back...
                    • You could also switch the roles of high an low priority, simply what makes more sense for you.
                    • Coolcat KeyContributor 797 posts since
                      Mar 19, 2007
                      Currently Being Moderated
                      Oct 30, 2008 11:16 AM (in response to Coolcat)
                      Re: Openfire can support many Server to Server?

                      highpriority.jpg

                      • Coolcat KeyContributor 797 posts since
                        Mar 19, 2007
                        Currently Being Moderated
                        Oct 31, 2008 6:43 AM (in response to crystal13282)
                        Re: Openfire can support many Server to Server?
                        Are you saying that I must write my plugin JAVA?

                        yes.

                        mmm....I don't know java language....I think that I will lose very long time for do this...

                        If you know C++, it's not that hard to learn. Basically the same syntax. If you know some other object orientated languages, I would say it's a thing of a few hours.

                        I think that another idea is launch a lot of server Openfire on same machine.

                        In that case you will need two Jabber accounts on each end (one for each server => 4 accounts) and you will need to modiy the client, so it does choose the right account for each message. I cannot say if this makes sense, it does deppend on what exactly you want to do. However, you could choose a client which is written in an language you already know.

                        Is possible launch many server Openfire (and so, many control panel) on same machine?

                        I think that should be possible, but it can be that you will have to modify the start scripts. Install the first server, change all ports, then install the second one.

                          • Coolcat KeyContributor 797 posts since
                            Mar 19, 2007
                            Currently Being Moderated
                            Oct 31, 2008 11:18 AM (in response to crystal13282)
                            Re: Openfire can support many Server to Server?
                            How can I to remedy this?

                            Use the *.tar.gz version of Openfire

                                • Coolcat KeyContributor 797 posts since
                                  Mar 19, 2007
                                  Currently Being Moderated
                                  Nov 3, 2008 6:49 AM (in response to crystal13282)
                                  Re: Openfire can support many Server to Server?

                                  Now, I start first openfire server and it say me: the Daemon is running.

                                  then I start second openfire server and it say me: the Daemon is running.

                                  Are you sure both servers are running? You should your process list.

                                   

                                  Are you using the same database for both servers? Thats not a good idea because e.g. the ports are stored in database.

                                   

                                  Any error messages in the logs?

                                    • Coolcat KeyContributor 797 posts since
                                      Mar 19, 2007
                                      Currently Being Moderated
                                      Nov 4, 2008 8:44 AM (in response to crystal13282)
                                      Re: Openfire can support many Server to Server?
                                      Do you know what are the steps for launch 2 openfire server (on same machine)?

                                      No, sorry.

                                       

                                      Maybe you need to modify the start script somehow...

                                        • sixthring KeyContributor 3,798 posts since
                                          Apr 2, 2007
                                          Currently Being Moderated
                                          Nov 5, 2008 8:09 AM (in response to crystal13282)
                                          Re: Openfire can support many Server to Server?

                                          This used to be controled in part by the openfire.xml file, but now this is all done int eh web admin site.

                                            • sixthring KeyContributor 3,798 posts since
                                              Apr 2, 2007
                                              Currently Being Moderated
                                              Nov 5, 2008 8:44 AM (in response to crystal13282)
                                              Re: Openfire can support many Server to Server?

                                              I do not believe that is a valid port.  Try 10090.

                                                • Coolcat KeyContributor 797 posts since
                                                  Mar 19, 2007
                                                  Currently Being Moderated
                                                  Nov 5, 2008 9:13 AM (in response to crystal13282)
                                                  Re: Openfire can support many Server to Server?

                                                  Vaild range is 1 - 65535  (== 2^16 -1 )

                                                   

                                                  Sorry, didn't notice that.

                                                   

                                                  Message was edited by: Coolcat

                                                    • Coolcat KeyContributor 797 posts since
                                                      Mar 19, 2007
                                                      Currently Being Moderated
                                                      Nov 5, 2008 11:21 AM (in response to crystal13282)
                                                      Re: Openfire can support many Server to Server?
                                                      Do you know if is possible change sender port of openfire?


                                                      Never tried it, but found this:

                                                      http://www.igniterealtime.org/community/docs/DOC-1061 => dnsutil.dnsOverride

                                                       

                                                      see also http://www.igniterealtime.org/issues/browse/JM-711

                                                       

                                                       

                                                      If this does not work, maybe its possible to use some external tool (firewall, router) which does reroute the packets from outgoing port XXXXX.

                                                      • Coolcat KeyContributor 797 posts since
                                                        Mar 19, 2007
                                                        Currently Being Moderated
                                                        Nov 5, 2008 11:24 AM (in response to Coolcat)
                                                        Re: Openfire can support many Server to Server?

                                                        You could also try xmpp.server.socket.port and xmpp.server.socket.remotePort

                                                          • Coolcat KeyContributor 797 posts since
                                                            Mar 19, 2007
                                                            Currently Being Moderated
                                                            Nov 6, 2008 1:27 AM (in response to crystal13282)
                                                            Re: Openfire can support many Server to Server?

                                                            Only set s2s-port of the remote server there. Because of JM-711 use no spaces in the string.

                                                              • sixthring KeyContributor 3,798 posts since
                                                                Apr 2, 2007
                                                                Currently Being Moderated
                                                                Nov 6, 2008 10:15 AM (in response to crystal13282)
                                                                Re: Openfire can support many Server to Server?

                                                                I just don't think what you are doing is even possible.  I really think you should spend $10 on a second ethernet card and be done with it.  each install of openfire can have their own DNS entry and IP with no port conflicts.  If you want to go to an extreme setup a virtual machine to take care of it.

                                                                    • bf2007 Silver 58 posts since
                                                                      Sep 27, 2007
                                                                      Currently Being Moderated
                                                                      Nov 7, 2008 9:51 AM (in response to crystal13282)
                                                                      Re: Openfire can support many Server to Server?

                                                                      Ok to set each instance to a particular interface edit thier openfire.xml files

                                                                       

                                                                      <!-- Network settings. By default, Openfire will bind to all network interfaces.
                                                                            Alternatively, you can specify a specific network interfaces that the server
                                                                            will listen on. For example, 127.0.0.1. This setting is generally only useful
                                                                             on multi-homed servers. -->
                                                                        <!--
                                                                          <network>
                                                                              <interface></interface>
                                                                          </network>
                                                                          -->

                                                                       

                                                                      I would not mess around with the server listening ports unless you are going to setup SRV records in DNS to resolve to the changed ports as it will be a client support nightmare.

                                                                        • sixthring KeyContributor 3,798 posts since
                                                                          Apr 2, 2007
                                                                          Currently Being Moderated
                                                                          Nov 11, 2008 9:00 AM (in response to crystal13282)
                                                                          Re: Openfire can support many Server to Server?

                                                                          that should be fine depending on your OS environment.  The nics must be unlinked and have priority set in windows so the DNS treats them as independent cards with distiquished entries in DNS.  You also can manually set card priority so they always are the right NIC order for the system.  The default settings do not guarantee this.

                                                                            • sixthring KeyContributor 3,798 posts since
                                                                              Apr 2, 2007
                                                                              Currently Being Moderated
                                                                              Nov 11, 2008 10:39 AM (in response to crystal13282)
                                                                              Re: Openfire can support many Server to Server?

                                                                              I doubt it.  Windows is down right stupid compared to all other OS.

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points