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

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

Thank you for your answer.

But I must do a lot of connection on same pc (pc1 and pc2) using different port because I must send different tipology of traffic on each port from pc1 to pc2.

ex.

port 5269 -> messenger traffic

port 5285 -> voice traffic

do you understand my problem?

thanks!

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

Ok, I wrong example, I’m sorry.

I remake the question: what I want is to send different type of XMPP packets on different port. Is it possible?

ex.

type 1 of XMPP packets -> on 5962

type 2 of XMPP packets -> on 5285

Forget voice traffic…

Thank you.

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.

My objective is this:

suppose this situation:

<alert xmlns='http://example.com/protocol/foobar'>
<MsgType> Alert </MsgType>

        ....data here...
</alert>

and this:

<alert xmlns='http://example.com/protocol/foobar'>
<MsgType> Alarm </MsgType>

        ....data here...
</alert>

what I want is this:

if XMPP packet is “Alert”, message must be sent on first S2S (on 5269 port for example).

if XMPP packet is “Alarm”, message must be sent on second S2S (on 5285 port for example).

Do you understand what I would like to do?

thanks!

Do you understand what I would like to do?
No. Why you can’t send that on the same port?

Because I must create indipendent channels. I must do different channels for different messages type (alarm or alert).

Alarm message has major priority of Alert message.

What is your idea for do this?

thanks

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.

highpriority.jpg

Are you saying that I must write my plugin JAVA?

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

I think that another idea is launch a lot of server Openfire on same machine. Each server manage a type of message…

Is possible launch many server Openfire (and so, many control panel) on same machine? For now I have active 1 server openfire on my machine.

Thank you very much…

Crystal

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.

I think that idea of write plugin is to abort

I know Java and C++ but my level of knowledge is very very low.

For second solution (lauch many server Openfire on same machine), I try to install the second one server but it say me:

“package openfire-3.6.0a-1 is already installed”

How can I to remedy this?

Thanks…

How can I to remedy this?
Use the *.tar.gz version of Openfire

Hi, I have removed rpm version.

I downloaded .tar.gz version of Openfire.

I have do gunzip and tar of this file but now I don’t know how I can install Openfire. Now I have an Openfire directory with more directory and files inside.

Can you help me?

thanks.

EDIT 1:

I’m in directory /opt/openifre/bin, on terminal I write:

./openfire start

and I have configured it on http://localhost/9090

server is running now.

Now I try to install more server Openfire on this same machine…

I have done 2 directory:

openfire

opefire2

inside directory opt. I want to start 2 server, one from directory openfire and one from directory openfire2.

I have started first openfire server and I changed this ports on control panel:

S2S -> 5269 to 5290

Client -> 5222 to 5292

Admin console port -> 9090 to 90900

Secure admin console port -> 9091 to 90910

then I have stopped first openfire server.

then I have started second openfire server and I haven’t change ports.

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.

Now, I have launch the control panel of first server: http://localhost:90900 but it don’t show me neither (page cannot be found).

What is my error?

Thank you very much…

Crystal

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?

I launch both server, but the report of process is:

6215 pts/1 bash

7144 pts/1 java

7262 pts/1 ps.

I’m using embedded database for server1.

For the server2 I can’t open the control panel so I can’t configure it.

After change the ports for server1, I re-launch server1 on browser (http://localhost:90900) but it’s say me: page cannot found.

Do you know what are the steps for launch 2 openfire server (on same machine)?

thank you,

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…