XMPP connection error in android
<p>I am trying to do xmpp using smack 4.1.4 with open fire server in which  I am able to connect to server for sometime. Then after sometime  I am getting Error. Here is my java class.</p>

<pre><code>    public void init(String userId,String pwd ) {
        Log.i("XMPP", "Initializing!");
        this.userName = userId;
        this.passWord = pwd;
        XMPPTCPConnectionConfiguration.Builder configBuilder = XMPPTCPConnectionConfiguration.builder();
        configBuilder.setUsernameAndPassword(userName, passWord);
        configBuilder.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);

        configBuilder.setServiceName(DOMAIN);
        configBuilder.setHost(HOST);
        configBuilder.setPort(PORT);
        //configBuilder.setDebuggerEnabled(true);
        connection = new XMPPTCPConnection(configBuilder.build());
        connection.addConnectionListener(connectionListener);

    }

    // Disconnect Function
    public void disconnectConnection(){

        new Thread(new Runnable() {
            @Override
            public void run() {
                connection.disconnect();
            }
        }).start();
    }

    public void connectConnection()
    {
        AsyncTask&lt;Void, Void, Boolean&gt; connectionThread = new AsyncTask&lt;Void, Void, Boolean&gt;() {

            @Override
            protected Boolean doInBackground(Void... arg0) {

                // Create a connection
                try {
                    connection.connect();
//                    login();
                    connected = true;

                } catch (IOException e) {
                } catch (SmackException e) {

                } catch (XMPPException e) {
                                    }

                return null;
            }
        };
        connectionThread.execute();
    }
public void login() {

        try {
            connection.login(userName, passWord);
            //Log.i("LOGIN", "Yey! We're connected to the Xmpp server!");

        } catch (XMPPException | SmackException | IOException e) {
            e.printStackTrace();
        } catch (Exception e) {
        }

    }
</code></pre>

<p>Following is error i am getting</p>

<pre><code>05-30 17:07:13.675 892-1180/com.demoapp.messenger W/AbstractXMPPConnection: 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
05-30 17:07:13.675 892-1180/com.demoapp.messenger W/AbstractXMPPConnection: &lt;stream:error&gt;&lt;internal-server-error xmlns='urn:ietf:params:xml:ns:xmpp-streams'/&gt;&lt;/stream:error&gt;
05-30 17:07:13.675 892-1180/com.demoapp.messenger W/AbstractXMPPConnection:     at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1003)
05-30 17:07:13.675 892-1180/com.demoapp.messenger W/AbstractXMPPConnection:     at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:944)
05-30 17:07:13.675 892-1180/com.demoapp.messenger W/AbstractXMPPConnection:     at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:959)
05-30 17:07:13.675 892-1180/com.demoapp.messenger W/AbstractXMPPConnection:     at java.lang.Thread.run(Thread.java:856)
05-30 17:07:13.675 892-1180/com.demoapp.messenger D/xmpp: ConnectionClosedOn Error!
</code></pre>

<p>Any help regarding this will be appreciated</p>