title: Xmpp openfire connection close after login
body: <p>I am using below code to create connection between android and <strong>xmpp openfire server</strong>.</p>
  
  <pre><code>SmackConfiguration.DEBUG = true;
          XMPPTCPConnectionConfiguration configuration = XMPPTCPConnectionConfiguration.builder()
                  .setDebuggerEnabled(true)
                  .setSendPresence(true)
                  .setResource("SmackAndroidTestClient")
                  .setConnectTimeout(10000)
                  .setPort(Constants.PORT_NUMBER)
                  .setServiceName(Constants.SERVER_NAME)
                  .setHost(Constants.HOST)
                  .setSecurityMode(ConnectionConfiguration.SecurityMode.ifpossible)
                  .build();
        AbstractXMPPConnection  mConnection = new XMPPTCPConnection(configuration);
          mConnection.setPacketReplyTimeout(10000);
          mConnection.addConnectionListener(this);
                  try {
                          mConnection.connect();
  
                      } catch (SmackException | IOException | XMPPException e) {
  
                          e.printStackTrace();
                      }
  
                try {
                      mConnection.login(mUsername, mPassword);
                  } catch (XMPPException | SmackException | IOException e) {
                      e.printStackTrace();
                  }
  </code></pre>
  
  <p>after successfully connecting to server i am trying to login but i am getting <strong>error</strong>.</p>
  
  <pre><code>&lt;stream:error xmlns:stream="http://etherx.jabber.org/streams"&gt;&lt;internal-server-error xmlns="urn:ietf:params:xml:ns:xmpp-streams"/&gt;&lt;/stream:error&gt;
  
  AbstractXMPPConnection: Connection closed with error
  org.jivesoftware.smack.XMPPException$StreamErrorException: internal-server-error You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions
  &lt;stream:error&gt;&lt;internal-server-error xmlns='urn:ietf:params:xml:ns:xmpp-streams'/&gt;&lt;/stream:error&gt;
  at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1011)
  at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:952)
  at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:967)
  at java.lang.Thread.run(Thread.java:818)
  </code></pre>