AnsweredAssumed Answered

Connect error: SASL Authentication failed. No known authentication mechanisims

Question asked by Marco Pas on Feb 2, 2015
Latest reply on Jun 22, 2015 by Sukesh

When trying to write my first XMPP client using Smack (4.1.0-beta1) (running against OpenFire 3.9.3) i keep getting the following error:

 

org.jivesoftware.smack.SmackException: SASL Authentication failed. No known authentication mechanisims

 

I tried all kinds of username/password settings but no luck so far. When connecting with Pidgin the connection seems ok.

 

Any clue what i am missing? 

 

I also tried all possible scenario's for the servicename and host..

 

XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()

                .setUsernameAndPassword("admin", "admin")

                .setServiceName("localhost")

                .setHost("localhost")

                .setSecurityMode(ConnectionConfiguration.SecurityMode.disabled)

                .setPort(5222)

                .build();

 

        XMPPTCPConnection connection = new XMPPTCPConnection(config);

 

        try {

            connection.connect();

 

            connection.login(); // fails!!!

 

            connection.disconnect();

 

        } catch (SmackException e) {

            e.printStackTrace();

        } catch (IOException e) {

            e.printStackTrace();        } catch (XMPPException e) {

            e.printStackTrace();

        }

Outcomes