AnsweredAssumed Answered

Getting a "No response received" after upgrading to Smack 4.1

Question asked by Muse Mekuria on Apr 17, 2015
Latest reply on Apr 22, 2015 by dharani

Hi Folks,

 

I've been unable to receive xmpp messages since I made an upgrade from version 3.3.  I suspect there is something wrong with my XMPPTCPConfiguration but I haven't been able to figure it out. Any help would be appreciated. Thanks!

 

Connection Created: Host-[myhost.com], Port-[5223], Service-[myhost.com]

2015-04-17 13:59:13,577 [pool-3-thread-1] ERROR IngestService - No response received within reply timeout. Timeout was 10000ms (~10s). Used filter: No filter used or filter was 'null'.

 

This was my working setup with Smack 3.3

 

  ConnectionConfiguration config = new ConnectionConfiguration(url,port);

config.setSecurityMode(ConnectionConfiguration.SecurityMode.enabled);

  config.setSocketFactory(new DummySSLSocketFactory());

config.setCompressionEnabled(true);

  config.setReconnectionAllowed(true);

  connection = new XMPPConnection(config);

  filter = new FromContainsFilter(pfilter);

  myCollector = connection.createPacketCollector(filter);

  ...

connection.connect();

connection.login();

 

 

And this is what I'm doing now

 

Builder builder = XMPPTCPConnectionConfiguration.builder();

  try {

      SSLContext context=SSLContext.getInstance("TLS");

       context.init(null,new TrustManager[]{new DummyTrustManager()},null);

       builder.setCustomSSLContext(context);

       } catch (KeyManagementException | NoSuchAlgorithmException e) {

       e.printStackTrace();

       }

  XMPPTCPConnectionConfiguration conf =

  builder.setServiceName(url).setUsernameAndPassword(username, password)

      .setPort(port)

      .setSecurityMode(ConnectionConfiguration.SecurityMode.required)

      //.setSocketFactory(new DummySSLSocketFactory())

      .setDebuggerEnabled(true)

      .setHost(url)

      .setCompressionEnabled(false).build();

 

Outcomes