powered by Jive Software

Isolating Openfire from other network interfaces

I have read many threads about network.interface binding, and this property is set already. I have two LANs in my PC with Openfire installed on. 1) PCI LAN Card which is connected to Internet and has IP 10.0.0.1; 2) integrated MB LAN chip with IP 192.168.0.1 which is most of the time connected to other PC. network.interface property has value 10.0.0.1.

Now, when i’m pulling out 2) LAN cable my clients (installed on the same machine) lose connection for a sec. So, how can i make Openfire to stick with one interface in any conditions. Or is it that clients get confused when one of the networks goes down?

Openfire log says something about socket being closed:

2008.08.30 12:47:21 [org.jivesoftware.util.log.util.CommonsLogFactory$1.error(CommonsLogFactory.jav a:92)
] error flushing remaining output on socket
java.net.SocketException: Socket is closed
at java.net.Socket.getOutputStream(Unknown Source)
at net.sf.jml.net.Session.close(Session.java:377)
at net.sf.jml.protocol.MsnSession.close(MsnSession.java:176)
at net.sf.jml.impl.BasicMessenger.logout(BasicMessenger.java:108)
at org.jivesoftware.openfire.gateway.protocols.msn.MSNSession.cleanUp(MSNSession.j ava:163)
at org.jivesoftware.openfire.gateway.session.TransportSession.sessionDisconnectedN oReconnect(TransportSession.java:539)
at org.jivesoftware.openfire.gateway.protocols.msn.MSNSession.logOut(MSNSession.ja va:143)
at org.jivesoftware.openfire.gateway.protocols.msn.MSNTransport.registrationLogged Out(MSNTransport.java:99)
at org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.jav a:437)
at org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.jav a:198)
at org.jivesoftware.openfire.component.InternalComponentManager$RoutableComponents .process(InternalComponentManager.java:619)
at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.jav a:260)
at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:164)
at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:70)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.broadcastUnavailableFor DirectedPresences(PresenceUpdateHandler.java:464)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:138)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:112)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:176)
at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:134)
at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:70)
at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:76)
at org.jivesoftware.openfire.SessionManager$ClientSessionListener.onConnectionClos e(SessionManager.java:1133)
at org.jivesoftware.openfire.nio.NIOConnection.notifyCloseListeners(NIOConnection. java:202)
at org.jivesoftware.openfire.nio.NIOConnection.close(NIOConnection.java:185)
at org.jivesoftware.openfire.nio.ConnectionHandler.sessionClosed(ConnectionHandler .java:87)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.sessionClosed(A bstractIoFilterChain.java:550)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionClosed(Abst ractIoFilterChain.java:269)
at org.apache.mina.common.support.AbstractIoFilterChain.access$800(AbstractIoFilte rChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionClosed( AbstractIoFilterChain.java:633)
at org.apache.mina.common.IoFilterAdapter.sessionClosed(IoFilterAdapter.java:65)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionClosed(Abst ractIoFilterChain.java:269)
at org.apache.mina.common.support.AbstractIoFilterChain.access$800(AbstractIoFilte rChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionClosed( AbstractIoFilterChain.java:633)
at org.apache.mina.filter.codec.ProtocolCodecFilter.sessionClosed(ProtocolCodecFil ter.java:259)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionClosed(Abst ractIoFilterChain.java:269)
at org.apache.mina.common.support.AbstractIoFilterChain.access$800(AbstractIoFilte rChain.java:53)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionClosed( AbstractIoFilterChain.java:633)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :249)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
at java.lang.Thread.run(Unknown Source)

And what is this old ticket about? http://www.igniterealtime.org/issues/browse/JM-1064

Well, this is rather uncommon setup (server and client on the same host) and i can’t test if this can affect clients on the 1) LAN.

I was able to solve this by specifying my primary LANs IP in openfire.xml. Uncommenting

Now local clients doesnt disconnect when second LAN is unplugged. Also Admin Console is now showin this IP instead of All addresses in the ports settings.

Hi,

ths issue is about outgoing connections. I suspect that you have/had problems with your default route, at least for your locally connected client.

LG