title: Openfire Smack Connection issue
body: <p>This is my first time using Openfire &amp; smack. These are the details :</p>
  
  <ul>
  <li>Version:  Openfire 3.10.0 </li>
  <li>Server Directory: /opt/openfire Server</li>
  <li>Name: ubuntu</li>
  </ul>
  
  <p>Environment</p>
  
  <ul>
  <li><p>Java Version: 1.7.0_79 Oracle Corporation -- OpenJDK 64-Bit Server VM</p></li>
  <li><p>Appserver:    jetty/9.2.z-SNAPSHOT</p></li>
  <li>Host Name:    ubuntu </li>
  </ul>
  
  <p>I am using the latest version of Smack 4.1</p>
  
  <p>And this is the code :</p>
  
  <pre><code>    public XMPPManager() 
  {   
      XMPPTCPConnectionConfiguration config = XMPPTCPConnectionConfiguration.builder()
              .setServiceName("ubuntu")
              //.setHost("127.0.0.1")
              .setPort(5222)
              .setSecurityMode(SecurityMode.disabled)
              .setDebuggerEnabled(true).build();
  
      AbstractXMPPConnection mConnection = new XMPPTCPConnection(config);
  
      try 
      {
          System.out.println("connecting");
          mConnection.setPacketReplyTimeout(10000);
          mConnection.connect();
          System.out.println("connected");
          mConnection.login("tuser1", "test1");
  
      } 
      catch (SmackException | IOException | XMPPException e) 
      {
          e.printStackTrace();
      }
  
  }
  </code></pre>
  
  <p>Now when I am running this code I am getting following error :</p>
  
  <pre><code>    Java project working, Hello World !!
  connecting
  Jun 08, 2015 8:16:49 AM org.jivesoftware.smack.util.DNSUtil resolveDomain
  WARNING: Exception while resovling SRV records for ubuntu. Consider adding '_xmpp-(server|client)._tcp' DNS SRV Records
  javax.naming.NameNotFoundException: DNS name not found [response code 3]; remaining name '_xmpp-client._tcp.ubuntu'
      at com.sun.jndi.dns.DnsClient.checkResponseCode(DnsClient.java:654)
      at com.sun.jndi.dns.DnsClient.isMatchResponse(DnsClient.java:572)
      at com.sun.jndi.dns.DnsClient.doUdpQuery(DnsClient.java:421)
      at com.sun.jndi.dns.DnsClient.query(DnsClient.java:210)
      at com.sun.jndi.dns.Resolver.query(Resolver.java:81)
      at com.sun.jndi.dns.DnsContext.c_getAttributes(DnsContext.java:430)
      at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:231)
      at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:139)
      at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:127)
      at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:142)
      at org.jivesoftware.smack.util.dns.javax.JavaxResolver.lookupSRVRecords(JavaxResolver.java:78)
      at org.jivesoftware.smack.util.DNSUtil.resolveDomain(DNSUtil.java:171)
      at org.jivesoftware.smack.util.DNSUtil.resolveXMPPDomain(DNSUtil.java:120)
      at org.jivesoftware.smack.AbstractXMPPConnection.populateHostAddresses(AbstractXMPPConnection.java:569)
      at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:552)
      at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:830)
      at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:360)
      at XMPPManager.&lt;init&gt;(XMPPManager.java:29)
      at Main.main(Main.java:12)
  
  08:16:49 AM SENT (0): &lt;stream:stream xmlns='jabber:client' to='ubuntu' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'&gt;
  08:16:49 AM RECV (0): &lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="ubuntu" id="3197fe6e" xml:lang="en" version="1.0"&gt;&lt;stream:features&gt;&lt;starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"&gt;&lt;/starttls&gt;&lt;mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;&lt;mechanism&gt;DIGEST-MD5&lt;/mechanism&gt;&lt;mechanism&gt;PLAIN&lt;/mechanism&gt;&lt;mechanism&gt;ANONYMOUS&lt;/mechanism&gt;&lt;mechanism&gt;CRAM-MD5&lt;/mechanism&gt;&lt;/mechanisms&gt;&lt;compression xmlns="http://jabber.org/features/compress"&gt;&lt;method&gt;zlib&lt;/method&gt;&lt;/compression&gt;&lt;auth xmlns="http://jabber.org/features/iq-auth"/&gt;&lt;register xmlns="http://jabber.org/features/iq-register"/&gt;&lt;/stream:features&gt;
  connected
  08:16:50 AM SENT (0): &lt;auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'&gt;=&lt;/auth&gt;
  08:16:50 AM RECV (0): &lt;challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;cmVhbG09InVidW50dSIsbm9uY2U9InFva3NTWFkveDZSQTh1bmJpb3FSQjZKY2NhSnhsd3JsNXBWZEVzakUiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=&lt;/challenge&gt;
  08:16:50 AM SENT (0): &lt;response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'&gt;Y2hhcnNldD11dGYtOCx1c2VybmFtZT0idHVzZXIxIixyZWFsbT0idWJ1bnR1Iixub25jZT0icW9rc1NYWS94NlJBOHVuYmlvcVJCNkpjY2FKeGx3cmw1cFZkRXNqRSIsbmM9MDAwMDAwMDEsY25vbmNlPSJoanlFaTl4N1BZTCtZb1VCQmZXRDJWNjF6M2doSzlBOW43Tlh6RDgyIixkaWdlc3QtdXJpPSJ4bXBwL3VidW50dSIsbWF4YnVmPTY1NTM2LHJlc3BvbnNlPTliMGM5YzBiOGNmYjVlOTYzNmI1ZDUyOWFlOTgwNThkLHFvcD1hdXRo&lt;/response&gt;
  08:16:50 AM RECV (0): &lt;success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;cnNwYXV0aD02OGY5MTNhNDNmOWYyNzIxMTViM2I5YTc4ZDBhM2JlOA==&lt;/success&gt;
  08:16:50 AM SENT (0): &lt;stream:stream xmlns='jabber:client' to='ubuntu' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' id='3197fe6e' xml:lang='en'&gt;
  08:16:50 AM RECV (0): &lt;?xml version='1.0' encoding='UTF-8'?&gt;&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="ubuntu" id="3197fe6e" xml:lang="en" version="1.0"&gt;&lt;stream:features&gt;&lt;compression xmlns="http://jabber.org/features/compress"&gt;&lt;method&gt;zlib&lt;/method&gt;&lt;/compression&gt;&lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/&gt;&lt;session xmlns="urn:ietf:params:xml:ns:xmpp-session"&gt;&lt;optional/&gt;&lt;/session&gt;&lt;/stream:features&gt;
  08:16:50 AM SENT (0): &lt;iq id='hqopf-3' type='set'&gt;&lt;bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'&gt;&lt;resource&gt;Smack&lt;/resource&gt;&lt;/bind&gt;&lt;/iq&gt;
  08:16:50 AM RECV (0): &lt;iq type="result" id="hqopf-3" to="ubuntu/3197fe6e"&gt;&lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"&gt;&lt;jid&gt;tuser1@ubuntu/Smack&lt;/jid&gt;&lt;/bind&gt;&lt;/iq&gt;
  08:16:50 AM User logged (0): tuser1@ubuntu:5222/Smack
  08:16:50 AM SENT (0): &lt;iq id='hqopf-5' type='get'&gt;&lt;query xmlns='jabber:iq:roster'&gt;&lt;/query&gt;&lt;/iq&gt;
  08:16:50 AM RECV (0): &lt;iq type="result" id="hqopf-5" to="tuser1@ubuntu/Smack"&gt;&lt;query xmlns="jabber:iq:roster"/&gt;&lt;/iq&gt;
  08:16:50 AM XMPPConnection authenticated (0)
  08:16:50 AM SENT (0): &lt;presence id='hqopf-7'&gt;&lt;c xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='http://www.igniterealtime.org/projects/smack' ver='NfJ3flI83zSdUDzCEICtbypursw='/&gt;&lt;/presence&gt;
  08:16:50 AM RECV (0): &lt;iq type="get" id="360-5" to="tuser1@ubuntu/Smack" from="ubuntu"&gt;&lt;query xmlns="http://jabber.org/protocol/disco#info"/&gt;&lt;/iq&gt;
  08:16:50 AM SENT (0): &lt;iq to='ubuntu' id='360-5' type='result'&gt;&lt;query xmlns='http://jabber.org/protocol/disco#info'&gt;&lt;identity category='client' name='Smack' type='pc'/&gt;&lt;feature var='http://jabber.org/protocol/commands'/&gt;&lt;feature var='http://jabber.org/protocol/xhtml-im'/&gt;&lt;feature var='jabber:iq:privacy'/&gt;&lt;feature var='http://jabber.org/protocol/disco#items'/&gt;&lt;feature var='vcard-temp'/&gt;&lt;feature var='urn:xmpp:time'/&gt;&lt;feature var='jabber:iq:last'/&gt;&lt;feature var='urn:xmpp:ping'/&gt;&lt;feature var='jabber:x:data'/&gt;&lt;feature var='http://jabber.org/protocol/bytestreams'/&gt;&lt;feature var='http://jabber.org/protocol/muc'/&gt;&lt;feature var='http://jabber.org/protocol/xdata-validate'/&gt;&lt;feature var='jabber:iq:version'/&gt;&lt;feature var='http://jabber.org/protocol/xdata-layout'/&gt;&lt;feature var='urn:xmpp:receipts'/&gt;&lt;feature var='http://jabber.org/protocol/caps'/&gt;&lt;feature var='http://jabber.org/protocol/disco#info'/&gt;&lt;/query&gt;&lt;/iq&gt;
  08:16:50 AM RECV (0): &lt;presence id="hqopf-7" from="tuser1@ubuntu/Smack" to="tuser1@ubuntu/Smack"&gt;&lt;c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.igniterealtime.org/projects/smack" ver="NfJ3flI83zSdUDzCEICtbypursw="/&gt;&lt;/presence&gt;&lt;presence from="testuser2@ubuntu" to="tuser1@ubuntu" type="subscribe"/&gt;
  </code></pre>
  
  <p>What is going wrong. I cannot see any sessions on the openfire admin console. The server is setup on Ubuntu 12.04.3 (localhost)</p>