cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
808
Views
0
Helpful
6
Replies

XMPP Connection to port 5222 on Finesse in Sandbox Lab Failing

AMTEC
Level 1
Level 1

Hey Guys,

I'm trying to establish connectivity to XMPP on Cisco Sandbox Lab for the UCCX 12.5 version but it is refusing to connect. I have used "hq-uccx.abc.inc" as the host in the ConnectionConfiguration (see below) and "5222" as the port. Somehow the program keeps failing with an error

" hq-uccx.abc.inc:5222 Exception: XMPPError connecting to hq-uccx.abc.inc:5222.; : remote-server-error(502)
-- caused by: XMPPError connecting to hq-uccx.abc.inc:5222.: remote-server-error(502) XMPPError connecting to hq-uccx.abc.inc:5222.
-- caused by: java.net.ConnectException: Connection timed out: connect"

This is the snippet of the code:

public void login() throws XMPPException {
System.out.println("XMPP connection started....");

ConnectionConfiguration config = new ConnectionConfiguration(hostname, 5222, "");
config.setSASLAuthenticationEnabled(false);
config.setReconnectionAllowed(true);
connection = new XMPPConnection(config);
//subscriptionManager = new PubSubManager(connection, "pubsub."+hostname);

try {
System.out.println("XMPP connection started 2....");

connection.connect();
connection.login(username, passwd);
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;
}
}


 I also faced the same connection problem while trying to connect using pidgin 3rd party client, I used the Test agent "Agent002" provided in the sandbox and every time I try to initiate a connection, I would get a disconnection error on pidgin and also the text "Logout" on Pidgin Message Console. Please refer to the picture below. 

AMTEC_0-1687198218510.png

 


I would appreciate some guidance on how to fix this,.

6 Replies 6

Are you sure that it’s the CCX server that you should use to connect on port 5222? That port is usually used by the CUPS server. Do you have an outline of the topology in the lab that you can share?



Response Signature


I looked up the topology for the sandbox lab for this and there is an IM&P, aka CUPS, system in the system landscape.

Snag_7b34f4.png

I think this is where you should connect on port 5222.



Response Signature


AMTEC
Level 1
Level 1

Yes, this is the port that I'm trying to connect to inorder to receive XMPP Events for the agent "Agent002" from Finesse. 



@AMTEC wrote:

Yes, this is the port that I'm trying to connect to inorder to receive XMPP Events for the agent "Agent002" from Finesse. 



My question was if you are sure that you should connect to the CCX server for the XMPP part. Usually XMPP (port 5222) is handled by the IM&P system, not CCX.



Response Signature


I want to connect to XMPP for Finesse and I think this is available on the host "hq-uccx.abc.inc" in Ports 5222 and 5223 as per Cisco documentation. 

I changed to using port 5223 instead of 5222 which I was using earlier because i found some information here https://community.cisco.com/t5/contact-center/xmpp-client-not-authorized-error/td-p/4577671 that port 5222 is disabled by default on Cisco Sandbox

AMTEC
Level 1
Level 1

I have changed the port to 5223 (secure) and import the tomcat.pem certificate into my cacert truststore in (C:\Program Files\Java\jdk-17.0.5\lib\security) and I could verify that the certificate is now present in the cacert trust store. 
But even with this changes still I unable to establish connection to XMPP Server in Finesse, every time I try I get an XMPPError "XMPP Exception = Connection failed. No response from server." 

Here is my java code:

ConnectionConfiguration config = new ConnectionConfiguration("hq-uccx.abc.inc", 5223, "");
config.setSecurityMode(ConnectionConfiguration.SecurityMode.enabled);
config.setSASLAuthenticationEnabled(true);
xmppConnection = new XMPPConnection(config);
//subscriptionManager = new PubSubManager(xmppConnection, "pubsub."+finesseServer);
SASLAuthentication.supportSASLMechanism("PLAIN", 0);
xmppConnection.connect();
Thread.sleep(2000);

 Please can somebody tell me what I'm doing wrong? I would appreciate some guidance on what I need to change in the above code to make it work