cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
300
Views
0
Helpful
14
Replies
Beginner

xmpp client error

I get this Error during login using xmpp client

xmpp connectionSASL authentication PLAIN failed: not-authorized

14 REPLIES 14
Cisco Employee

Re: xmpp client error

Hi,

 

In your XMPP client, make sure that you select "Allow plaintext authentication". This is a screenshot for adium:

1.png

 

Thanx,

Denise

Beginner

Re: xmpp client error

I'm using sample notification service downloaded with no change, i follow instructions in PDF document. now it returns  " Error during xmpp connection not-authorized(401) "

utils.png

Beginner

Re: xmpp client error

I'm using sample notification service downloaded with no change, i follow instructions in PDF document. now it returns  " Error during xmpp connection not-authorized(401) "

 

Cisco Employee

Re: xmpp client error

Hi,

 

What credentials are you using? A 401 usually means there is something wrong with the user credentials.

 

Thanx,

Denise

Beginner

Re: xmpp client error

I'm using credentials depicted by PCCE sandbox, below are the steps quoted from Finesse 

 

my reserved sandbox details is 

 

https://devnetsandbox.cisco.com/RM/Diagram/Index/69665078-12ff-4461-8f54-90ed161e5d72

  

Cisco Employee

Re: xmpp client error

Hi,

 

My laptop isn't cooperating with me today and is having DNS issues so I am not able to attempt to reproduce the issue. I also don't have access to your reserved sandbox.

 

Were you able to connect to the Notification Service via a XMPP client such as adium or pidgin? Can you send me your modified code for the sample Java code?

 

Thanx,

Denise

Beginner

Re: xmpp client error

i'm using sample xmppclient, by the way i'm able to connect but the issue in login,

 

 

 

import java.util.List;

import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.ConnectionConfiguration.*;
import org.jivesoftware.smack.SASLAuthentication;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smackx.pubsub.Item;
import org.jivesoftware.smackx.pubsub.ItemPublishEvent;
import org.jivesoftware.smackx.pubsub.Node;
import org.jivesoftware.smackx.pubsub.PubSubManager;
import org.jivesoftware.smackx.pubsub.listener.ItemEventListener;
import javax.security.sasl.Sasl;

import org.jivesoftware.smack.sasl.SASLMechanism;

public class SampleXMPPClient
{

private XMPPConnection connection;
private volatile PubSubManager subscriptionManager;
private String username;
private String passwd;
private String resource;
private String nodeId;
private String hostname;

public SampleXMPPClient()
{
connection = null;
subscriptionManager = null;

username = "agent1";
passwd = "cisco123";
resource = "RESOURCE";
nodeId = "/finesse/api/User/" + username;
hostname = "fin-pub-a-50.berlin.icm";
}

public void login() throws XMPPException
{

//SASLAuthentication.supportSASLMechanism("PLAIN", 1);
ConnectionConfiguration config = new ConnectionConfiguration(hostname, 5222,"proxy.eu.jabber.org");
config.setDebuggerEnabled(true);

config.setSASLAuthenticationEnabled(false);

config.setReconnectionAllowed(false);
connection = new XMPPConnection(config);


subscriptionManager =
new PubSubManager(connection, "pubsub." + hostname);

try
{
connection.connect();
connection.login(username, passwd, resource);
System.out.println("Successfully Connected");
subscribeImpl();
System.out.println("Successfully Obtained the node");
} catch (XMPPException e)
{
System.out.println("Error during xmpp connection" +
e.getMessage());
throw e;
}
}

private void subscribeImpl() throws XMPPException
{
String logPrefix =
"XMPPClient.subscribe on nodeId = " + nodeId + " for user = " +
username;
Node node = subscriptionManager.getNode(nodeId);

// ItemEventListener required by Smack library
ItemEventListener<Item> listener = new ItemEventListener<Item>()
{
@Override
public void handlePublishedItems(ItemPublishEvent<Item> itemsPublished)
{

List<Item> items = itemsPublished.getItems();
for (Item item: items)
{
System.out.println(item.toString());
}

}
};

// Add the event listener for this node
node.addItemEventListener(listener);

}

public void logout()
{

connection.disconnect();
System.out.println("Successfully disconnected");
}

public static void main(String[] args) throws XMPPException
{

SampleXMPPClient client = new SampleXMPPClient();
client.login();
// subscriptionManager = new PubSubManager(connection, pubsubDomain);

// This infinite loop is to make the client wait for events
System.out.println("Waiting for event");
while (true)
{
//waiting for new events
}

}
}

 

Cisco Employee

Re: xmpp client error

Hi,

 

I ask again, have you been able to connect to the notification server via an XMPP client like pidgin or adium? If not, please get that working first.

 

Thanx,

Denise

Beginner

Re: xmpp client error

kindly find responseerror.png

Contributor

Re: xmpp client error

Hi,

 

Have you tried with Pidgin? What was the response in Pidgin?

 

Regards,

Umesh

Everyone's tags (1)
Beginner

Re: xmpp client error

yes i have tries , i need to know correct credentials

error.png

Cisco Employee

Re: xmpp client error

Hi,

 

The domain needs to be the domain of the Finesse server, if you are using the PCCE DevNet sandbox, it should probably be berlin.icm.

 

Also, can you show a screenshot of the advanced tab?

 

Thanx,

Denise

Highlighted
Beginner

Re: xmpp client error

Please find below
error.png

Cisco Employee

Re: xmpp client error

Hi,

 

Did you fix the domain? Per documentation (https://developer.cisco.com/docs/finesse/#!pidgin-for-windows/pidgin-for-windows),

  1. For Domain, enter the fully-qualified domain name of the Cisco Finesse server.

Thanx,

Denise

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards