1 Reply Latest reply on Dec 19, 2016 8:46 PM by wroot

    What causes Openfire to become desynced with Active Directory?

    Chris

      Hello,

       

      I have had Openfire completely crash and become completely desynced with Active Directory 3 times now and each time I have had to reinstall and configure everything.

       

      I am running Openfire on a VM running:

       

      Windows Server 2012

      4 GB of RAM

      40 GB Disk Space

      1 Core Xeon E5-2660 v2 @ 2.20 GHz CPU

       

      The first 2 times this happened I was running version 4.0.4 and using the embedded DB no plugins and after a few days of running after a restart I was unable to sign into the Openfire admin console let alone have people use Pandion to chat.

       

      After spending tons of time reading the forums, windows event logs , and Openfire error logs none of them could tell me what happened . There were not even any entries in the error logs in the past 7 hours after the reboot.

       

      This weekend I integrated Openfire with MySQL and did so much testing to try to break the server and it was running smoothly. I also decided to use version 4.1 beta to see if there was perhaps a fix but today when I was demoing it off a team member asked to see what happens when I enable SSL and TLS. Once I did that and rebooted the VM I could no longer log into the admin console let alone use chat clients.

       

      This is what I get when I launch Openfire, I was testing out plugins over the weekend and they worked just fine even after performing no less than 25 reboots on the server for testing, After changing the encryption settings this after noon I get plugin errors:

      Openfire 4.1.0 Beta [Dec 19, 2016 6:43:35 PM]

      Admin console listening at:

        http://domain.com:9090

        https://domain.com:9091

      Successfully loaded plugin 'admin'.

      Successfully loaded plugin 'emailonaway'.

      An exception occurred while loading plugin 'loadstats':

      An exception occurred while loading plugin 'clustering':

      Successfully loaded plugin 'monitoring'.

      Successfully loaded plugin 'userimportexport'.

      Successfully loaded plugin 'broadcast'.

      Starting Fastpath Server

      An exception occurred while loading plugin 'fastpath':

      Successfully loaded plugin 'search'.

      Finished processing all plugins.

      An exception occurred while loading plugin 'clustering':

      An exception occurred while loading plugin 'clustering':

      An exception occurred while loading plugin 'clustering':

      An exception occurred while loading plugin 'clustering':

      An exception occurred while loading plugin 'clustering':

       

      The plugins don't matter at all I was just testing stuff I am completely fine with a 100% vanilla version but what does bother me is why does Openfire desync with Active Directory and not allow me to log into the admin console or chat anymore?

       

      2016.12.19 18:16:23 INFO  [pool-3-thread-1]: org.jivesoftware.openfire.spi.EncryptionArtifactFactory - Creating new SslContextFactory instance

      2016.12.19 18:16:23 INFO  [pool-3-thread-1]: org.jivesoftware.openfire.http.HttpBindManager - Installed response compression filter

      2016.12.19 18:16:23 INFO  [pool-3-thread-1]: org.jivesoftware.openfire.http.HttpSessionManager - Starting instance

      2016.12.19 18:16:23 INFO  [pool-3-thread-1]: org.jivesoftware.openfire.http.HttpBindManager - HTTP bind service started

      2016.12.19 18:16:39 INFO  [Jetty-QTP-AdminConsole-30]: org.jivesoftware.util.cache.CacheFactory - Created cache [org.jivesoftware.util.cache.DefaultLocalCacheStrategy] for Locked Out Accounts

      2016.12.19 18:16:39 ERROR [Jetty-QTP-AdminConsole-30]: org.jivesoftware.openfire.ldap.LdapAuthProvider - Error connecting to LDAP server

      javax.naming.CommunicationException: PDCVINF013DCSC:389 [Root exception is java.net.SocketException: Software caused connection abort: recv failed]

        at com.sun.jndi.ldap.Connection.<init>(Unknown Source)

        at com.sun.jndi.ldap.LdapClient.<init>(Unknown Source)

        at com.sun.jndi.ldap.LdapClient.getInstance(Unknown Source)

        at com.sun.jndi.ldap.LdapCtx.connect(Unknown Source)

        at com.sun.jndi.ldap.LdapCtx.<init>(Unknown Source)

        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(Unknown Source)

        at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(Unknown Source)

        at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(Unknown Source)

        at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(Unknown Source)

        at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)

        at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)

        at javax.naming.InitialContext.init(Unknown Source)

        at javax.naming.ldap.InitialLdapContext.<init>(Unknown Source)

        at org.jivesoftware.util.JiveInitialLdapContext.<init>(JiveInitialLdapContext.java :43)

        at org.jivesoftware.openfire.ldap.LdapManager.getContext(LdapManager.java:568)

        at org.jivesoftware.openfire.ldap.LdapManager.findUserDN(LdapManager.java:975)

        at org.jivesoftware.openfire.ldap.LdapManager.findUserDN(LdapManager.java:928)

        at org.jivesoftware.openfire.ldap.LdapAuthProvider.authenticate(LdapAuthProvider.j ava:116)

        at org.jivesoftware.openfire.auth.AuthFactory.authenticate(AuthFactory.java:197)

        at org.jivesoftware.openfire.admin.login_jsp._jspService(login_jsp.java:189)

        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1669)

        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

        at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:76)

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

        at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:53)

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

        at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:230)

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

        at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:162)

        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652)

        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)

        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:22 3)

        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:11 27)

        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)

        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185 )

        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:106 1)

        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:215)

        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:110)

        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)

        at org.eclipse.jetty.server.Server.handle(Server.java:499)

        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)

        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)

        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)

        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635 )

        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)

        at java.lang.Thread.run(Unknown Source)

      Caused by: java.net.SocketException: Software caused connection abort: recv failed

        at java.net.SocketInputStream.socketRead0(Native Method)

        at java.net.SocketInputStream.socketRead(Unknown Source)

        at java.net.SocketInputStream.read(Unknown Source)

        at java.net.SocketInputStream.read(Unknown Source)

        at sun.security.ssl.InputRecord.readFully(Unknown Source)

        at sun.security.ssl.InputRecord.read(Unknown Source)

        at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)

        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)

        at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)

        at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)

        at com.sun.jndi.ldap.Connection.createSocket(Unknown Source)

        ... 53 more

      2016.12.19 18:16:39 WARN  [Jetty-QTP-AdminConsole-30]: org.jivesoftware.admin.LoginLimitManager - Failed admin console login attempt by chull from 127.0.0.1

      2016.12.19 18:16:43 WARN  [Jetty-QTP-AdminConsole-31]: org.jivesoftware.admin.LoginLimitManager - Failed admin console login attempt by sa from 127.0.0.1

      2016.12.19 18:16:43 ERROR [pool-23-thread-1]: org.jivesoftware.openfire.container.PluginManager - An exception occurred while loading plugin 'clustering':

      java.lang.ClassNotFoundException: com.jivesoftware.openfire.ClusteringPlugin

        at java.net.URLClassLoader.findClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java :354)

        at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMoni tor.java:276)

        at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMoni tor.java:264)

        at java.util.concurrent.FutureTask.run(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

        at java.lang.Thread.run(Unknown Source)

       

      I see this line in the above log :

       

      2016.12.19 18:16:39 ERROR [Jetty-QTP-AdminConsole-30]: org.jivesoftware.openfire.ldap.LdapAuthProvider - Error connecting to LDAP server

      javax.naming.CommunicationException: PDCVINF013DCSC:389 [Root exception is java.net.SocketException: Software caused connection abort: recv failed]

       

      I don't know what to do anymore I have tried 2 versions and followed guides to set Openfire up with Active Directory but after a few days it becomes desynced and I have to completely redo everything.

       

      I am trying to make a production chat server but there is no way I implement this if I can't find out why this happens and learn how to fix it.

       

      Any input would be greatly appreciated, has anyone had this problem before? Like I said earlier the plugins are a nonfactor I am about to configure this for the 4th time and I will not be using them again like the 1st and 2nd time.

       

      Thank You

        • Re: What causes Openfire to become desynced with Active Directory?
          wroot

          You are showing an output from Openfire's launcher. I suppose you are using it to run Openfire? Try installing it as a service (it's in the documentation). I would also try to use 4.0.4 for now and no plugins for sure. Not sure about the TLS\SSL part. It should work by default in Openfire and you should leave it enabled and configure everything with TLS enabled. Changing settings in Openfire usually does not require its restart. When it does, you just need to reboot Openfire itself instead of a VM. When installed as a service it should survive VM's reboots also.