Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-25505

jabber-plugin 1.28 cannot resolve host with javax.naming.NameNotFoundException: DNS name not found

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: jabber-plugin
    • Labels:
      None
    • Environment:
      os: debian 7
      jenkins: 1.587
    • Similar Issues:

      Description

      i upgrade jenkins from 1.535 to 1.587 but cannot send jabber message
      System log is:

      Nov 08, 2014 10:21:57 AM WARNING hudson.plugins.jabber.im.transport.JabberIMConnection createConnection
      org.jivesoftware.smack.SmackException: javax.naming.NameNotFoundException: DNS name not found [response code 3]; remaining name '_xmpp-client._tcp.jabber.peykasa.ir'
      at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:405)
      at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:811)
      at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:396)
      at hudson.plugins.jabber.im.transport.JabberIMConnection.createConnection(JabberIMConnection.java:409)
      at hudson.plugins.jabber.im.transport.JabberIMConnection.connect(JabberIMConnection.java:189)
      at hudson.plugins.jabber.im.transport.JabberIMConnectionProvider.createConnection(JabberIMConnectionProvider.java:42)
      at hudson.plugins.im.IMConnectionProvider.create(IMConnectionProvider.java:65)
      at hudson.plugins.im.IMConnectionProvider.access$600(IMConnectionProvider.java:22)
      at hudson.plugins.im.IMConnectionProvider$ConnectorRunnable.run(IMConnectionProvider.java:183)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: javax.naming.NameNotFoundException: DNS name not found [response code 3]; remaining name '_xmpp-client._tcp.jabber.peykasa.ir'
      at com.sun.jndi.dns.DnsClient.checkResponseCode(DnsClient.java:651)
      at com.sun.jndi.dns.DnsClient.isMatchResponse(DnsClient.java:569)
      at com.sun.jndi.dns.DnsClient.doUdpQuery(DnsClient.java:418)
      at com.sun.jndi.dns.DnsClient.query(DnsClient.java:207)
      at com.sun.jndi.dns.Resolver.query(Resolver.java:81)
      at com.sun.jndi.dns.DnsContext.c_getAttributes(DnsContext.java:434)
      at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:235)
      at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:141)
      at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:129)
      at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:142)
      at org.jivesoftware.smack.util.dns.javax.JavaxResolver.lookupSRVRecords(JavaxResolver.java:83)
      at org.jivesoftware.smack.util.DNSUtil.resolveDomain(DNSUtil.java:153)
      at org.jivesoftware.smack.util.DNSUtil.resolveXMPPDomain(DNSUtil.java:111)
      at org.jivesoftware.smack.ConnectionConfiguration.maybeResolveDns(ConnectionConfiguration.java:600)
      at org.jivesoftware.smack.XMPPConnection.maybeResolveDns(XMPPConnection.java:573)
      at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:402)
      ... 9 more

        Attachments

          Issue Links

            Activity

            Hide
            kutzi kutzi added a comment -

            This build of the plugin uses a version of the Smack library which could fix the issue:
            https://dl.dropboxusercontent.com/u/25863594/jabber.hpi

            Would be great if you could test it

            Show
            kutzi kutzi added a comment - This build of the plugin uses a version of the Smack library which could fix the issue: https://dl.dropboxusercontent.com/u/25863594/jabber.hpi Would be great if you could test it
            Hide
            kutzi kutzi added a comment -

            Mohammad, any update on this?
            If you don't have the time/resources to test it, please let me at least know.

            Show
            kutzi kutzi added a comment - Mohammad, any update on this? If you don't have the time/resources to test it, please let me at least know.
            Hide
            pivetta Rafael Pivetta Balbuena added a comment - - edited

            Kutzi,
            I am using smack 4.0.5 in my project, and tested jars of version 4.0.6-SNAPSHOT and worked.

            But, using openfire is required to disable the security in code, because I dont know how to disable security in openfire 3.9.3

            Example works fine.
            ConnectionConfiguration config = new ConnectionConfiguration ("localhost");
            config.setSecurityMode (SecurityMode.disabled);
            XMPPConnection con = new XMPPTCPConnection (config);
            con.connect();

            Anyone have an example of how to generate and import certificate in openfire or other xmpp server and a code sample using SSL and Smack?

            The code and exception:
            XMPPConnection con = new XMPPTCPConnection ("localhost");
            con.connect();

            WARNING: Exception while resovling SRV records for localhost. Consider adding '_xmpp-(server|client)._tcp' DNS SRV Records
            javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
            Nov 23, 2014 10:40:05 PM org.jivesoftware.smack.tcp.PacketWriter writePackets
            WARNING: Exception writing closing stream element
            java.net.SocketException: Socket closed
            at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:121)
            at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
            at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
            at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
            at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
            at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
            at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
            at java.io.BufferedWriter.flush(BufferedWriter.java:254)
            at org.jivesoftware.smack.tcp.PacketWriter.writePackets(PacketWriter.java:190)
            at org.jivesoftware.smack.tcp.PacketWriter.access$000(PacketWriter.java:40)
            at org.jivesoftware.smack.tcp.PacketWriter$1.run(PacketWriter.java:77)

            Thanks.

            Show
            pivetta Rafael Pivetta Balbuena added a comment - - edited Kutzi, I am using smack 4.0.5 in my project, and tested jars of version 4.0.6-SNAPSHOT and worked. But, using openfire is required to disable the security in code, because I dont know how to disable security in openfire 3.9.3 Example works fine. ConnectionConfiguration config = new ConnectionConfiguration ("localhost"); config.setSecurityMode (SecurityMode.disabled); XMPPConnection con = new XMPPTCPConnection (config); con.connect(); Anyone have an example of how to generate and import certificate in openfire or other xmpp server and a code sample using SSL and Smack? The code and exception: XMPPConnection con = new XMPPTCPConnection ("localhost"); con.connect(); WARNING: Exception while resovling SRV records for localhost. Consider adding '_xmpp-(server|client)._tcp' DNS SRV Records javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Nov 23, 2014 10:40:05 PM org.jivesoftware.smack.tcp.PacketWriter writePackets WARNING: Exception writing closing stream element java.net.SocketException: Socket closed at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:121) at java.net.SocketOutputStream.write(SocketOutputStream.java:159) at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221) at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291) at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295) at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141) at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) at java.io.BufferedWriter.flush(BufferedWriter.java:254) at org.jivesoftware.smack.tcp.PacketWriter.writePackets(PacketWriter.java:190) at org.jivesoftware.smack.tcp.PacketWriter.access$000(PacketWriter.java:40) at org.jivesoftware.smack.tcp.PacketWriter$1.run(PacketWriter.java:77) Thanks.
            Hide
            louisfelix Louis-Félix Tessier added a comment -

            Same problem here with "Jabber notifier 1.30" and "Jenkins 1.590".
            Thanks.

            Show
            louisfelix Louis-Félix Tessier added a comment - Same problem here with "Jabber notifier 1.30" and "Jenkins 1.590". Thanks.
            Hide
            kutzi kutzi added a comment -

            Fixed in upcoming release 1.31

            Show
            kutzi kutzi added a comment - Fixed in upcoming release 1.31

              People

              • Assignee:
                kutzi kutzi
                Reporter:
                mbbn Mohammad Biabani
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: