powered by Jive Software

Exception DNS name not found in Spark

i have warning like this

Okt 27, 2018 10:01:29 AM org.jivesoftware.spark.util.log.Log warning
WARNING: Exception in Login:
org.jivesoftware.smack.SmackException$ConnectionException: The following addresses failed: ‘_xmpp-client._tcp.unigrain.com:5222’ failed because javax.naming.NameNotFoundException: DNS name not found [response code 3]; remaining name ‘_xmpp-client._tcp.unigrain.com’, ‘unigrain.com:5222’ failed because java.net.ConnectException: Connection refused: connect
at org.jivesoftware.smack.SmackException$ConnectionException.from(SmackException.java:255)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:612)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:850)
at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:364)
at org.jivesoftware.LoginDialog$LoginPanel.login(LoginDialog.java:1107)
at org.jivesoftware.LoginDialog$LoginPanel.access$900(LoginDialog.java:335)
at org.jivesoftware.LoginDialog$LoginPanel$3.construct(LoginDialog.java:894)
at org.jivesoftware.spark.util.SwingWorker.lambda$new$1(SwingWorker.java:138)
at java.lang.Thread.run(Unknown Source)
i am using Openfire 4.2.1 and spark Spark
some body help me please!!

Next time don’t hijack old resolved threads and create your own…

You should setup proper DNS entries for your Openfire server, so clients would be able to find this server.

please forgive me mr @wroot
i can ping client to server with ip address then i try ping server with dns name it work’s
but spark still can’t login

Of course you can ping it (i can ping it too). Because you are pinging domain unigrain.com, which is a website and it’s web server is responding. Openfire is not a web server though. You have to create SRV records for it and point to a machine hosting Openfire. If this machine is in the local network you will also have to setup a routing rules in your firewall to forward requests on domain:5222 to a proper machine in the local network.

Read about XMPP DNS records: https://wiki.xmpp.org/web/SRV_Records

Btw, if you are not going to connect to Openfire from the Internet, it can probably be done easier for just the local network setup, if you have local DNS infrastructure.

my openfire server in local network, i try ping domain unigrain.com and server respond is true from my local server openfire, i try to install sparkweb but i can’t login with warning server not respond, how to check my client connection to server openfire ? my firewall is off.

btw now in log error spark is blank, nothing update log again, what mus t i do ?
thank you before

when login to other workstation warning like this @wroot
Oct 29, 2018 4:48:44 PM org.jivesoftware.spark.util.log.Log warning
WARNING: Exception in Login: Exception: XMPPError connecting to; : remote-server-error(502)
at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:600)
at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1022)
at org.jivesoftware.LoginDialog$LoginPanel.login(LoginDialog.java:1084)
at org.jivesoftware.LoginDialog$LoginPanel.access$1400(LoginDialog.java:333)
at org.jivesoftware.LoginDialog$LoginPanel$4.construct(LoginDialog.java:867)
at org.jivesoftware.spark.util.SwingWorker$2.run(SwingWorker.java:141)
at java.lang.Thread.run(Unknown Source)
what’s wrong with my server?

Can you login to Openfire’s Admin Console? What is the value of XMPP Domain? You can also post a screenshot of your Admin Console.

yes, i can login to openfire’s admin console,

You have named your Openfire server unigrain.com. Which is a website. When you try to put it in Spark, your computer tries to go to that website instead and Spark tries to connect to Openfire on your website. But your Openfire server is not there. You can’t just name servers whatever you like. You have to setup network settings for that.

If you still want for your users to put unigrain.com into domain field in Spark, you can manually edit settings of every Spark client by going into Advanced settings on Spark’s login screen, unchecking Automatically discover host and port and putting into Host field. You can leave unigrain.com as domain on the login screen. This way Spark will connect to and will use unigrain.com as Openfire server’s name.This should work, but if IP changes, you will have to change it for every client. Which is not convenient.

As it going to be local server only, i would delete it and install a fresh copy. This time giving it some unique name during setup. Like “chatserver” or “unigrainchat” etc. Then you need some sort of local DNS system (either Windows DNS based or maybe you can do this in your router or other network hardware). You need to setup name resolution. So, when you put unigrainchat into domain filed in Spark, it will ask your DNS what IP stands behind unigrainchat and DNS will reply and then Spark will connect to that IP and use unigainchat as domain name.

The easiest and lazy way is to use IP address. It can work, but it could be problematic also. If you use IP, your Spark clients will complain about certificate name not matching server’s name, your users will have names user@ instead of prettier user@unigrainchat. They will have to remember this IP address to login in Spark. Names are easier to remember and just look more appropriate.

You can also read this guide, it basically tells same things i have already told http://www.wroot.lt/wp/technology/very-basic-openfire-spark-guide-en/

1 Like