Domain cannot be Null error

We setup a cron job to restart the openfire service everynight at 11pm. It was working great until I updated the server to 3.4.4 from 3.4.3. Now after teh 11pm restart we are unable to connect until we do another manual service restart. I should mention that the service restarts fine at 11pm meaning it doesn’t spit out any errors on the console, it just doesn’t allow us to connect.

I noticed these errors in the logs after the 11pm restart that started after the update:

2008.02.06 23:01:37 org.jivesoftware.openfire.spi.PresenceManagerImpl.probePresence(PresenceManagerI mpl.java:427) Internal serv

er error

java.lang.NullPointerException: Domain cannot be null

at org.xmpp.packet.JID.<init>(JID.java:259)

at org.jivesoftware.openfire.SessionManager.getSessions(SessionManager.java:815)

at org.jivesoftware.openfire.spi.PresenceManagerImpl.probePresence(PresenceManager Impl.java:330)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.initSession(PresenceUpd ateHandler.java:228)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:126)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:110)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:174)

at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:133)

at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:69)

at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:75)

at org.jivesoftware.openfire.net.StanzaHandler.processPresence(StanzaHandler.java: 321)

at org.jivesoftware.openfire.net.ClientStanzaHandler.processPresence(ClientStanzaH andler.java:84)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:245)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:167)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:132)

at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:173)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)

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)

I was also wondering if maybe not everything related to openfire is coming down with the restart. I’m going to try stopping the service, sleep, then start it and see if this helps at all. Any other suggestions would be appreciated.

Thanks

Scott

maybe splittiing the cron into 2 different jobs. One to start and one to stop. It could be a timing issue, as you have already speculated. I use a cron to stop the service then do a system restart several minutes later. I personally like to start the day on a clean restarted server.

I agree on the clean server. Plus instead of making each user log out to see any changes, they get booted off over night and come in to see any new changes.

Well that didn’t work. Heres another error that might be related to the problem:

2008.02.07 23:01:50 org.jivesoftware.openfire.spi.ConnectionManagerImpl.createServerListener(Connect ionManagerImpl.java:151) Could not setup a server socket

java.net.BindException: Address already in use

This happens after the service is stopped. The script that runs nightly stops openfire, sleeps for 60sec., then starts openfire. What I don’t get is that if I bounce it again, it comes up correctly.