Spark Configuration

Hi. Is there a step by step for setting up Spark with Openfire? Specifically the certificates? I found my trust and identity stores in Openfire, I enter the file paths and password, but I get invalid certificate in Spark. If I accept all certificates, it works.

There is no such guide. Certificates are tricky. Current Spark version also can’t manage certificates, so it is either Accept all or nothing. Unless you use trusted certificate which is included in Java’s truststore. Then Spark won’t complain about it. You will have to select Accept all if your certificate is self-signed (generated by Openfire).

Ok, thanks. Should be safe if the server isn’t internet connected and it’s behind a firewall? I hope so. Thanks for your input. I’m going to get if it a go.

It’s less insecure, as there is probably small chance that someone on your internal network would make a man in the middle attack and present their own server with own certificate to your users to intercept and decrypt their messages and passwords.

wroot, not sure if you’re willing to help or you can point me in the right direction, but I’m unable to login to Spark on another machine. The only error I get it is “unknown connection error, check logs”. The logs are empty on the client machine, and on the server I can’t see any attempts to connect. I am able to ping the server via IP and name, I have verified port 5222 is open. The allow all certificates box is checked.

I am able to login to spark on the same machine the server is running on, just nowhere else.

I found the log files. Appears to be a DNS issue. I need to create two SRV records? Can you tell me how this would be done in Windows Server DNS?

You can watch this video guide on creating DNS records for Openfire (you can skip AD/SSO parts, if you are not using it) How To: Video on setting up SSO/AD with Openfire

I hate to be a pain… I installed spark on my network to test. I originally installed it on the DNS server, and did not need to create any DNS records.

Today I tried to go live with the client. I installed Openfire on a DNS domain controller, thinking I won’t have to create the DNS records. It doesn’t work. I’m getting the same error as before.
The following addresses failed: ‘_xmpp-client._tcp.dc02.xxx.local:5222’ failed because javax.naming.NameNotFoundException: DNS name not found [response code 3]; remaining name ‘_xmpp-client._tcp.dc02.xxx.local’, ‘dc02.xxx.local:5222’ failed because java.net.ConnectException: Connection timed out: connect
at org.jivesoftware.smack.SmackException$ConnectionException.from(SmackException.java:255)

So, I did watch the video. I created the SRV record.
Domain: xxx.local
Service: _xmpp-client
Protocol: _tcp
Priority:0
Weight: 5
Port: 5222
Host Offering Service: xmpp.xxx.local

I also created a CNAME record.

Alias: xmpp
FQDN: xmpp.xxx.local
FQDN target host: dc02.xxx.local

In the admin panel under Server properties I have
XMpp Domain: dc02.xxx.local
Server host FQDN: dc02.xxx.local

Any ideas what I’m doing wrong?

Watch at 11:05. Your Openfire’s XMPP domain should be xxx.local and FQDN xmpp.xxx.local. If you only starting, then you can install Openfire from scratch and set it that way.

Thank wroot. Ok, I re-installed OpenFire and made the changes
XMPP Domain Name- xxx.local
Server Host Name FQDN- xmpp.xxx.local

Logging into Spark, what should the domain be?

I believe domain should be xxx.local. I sent you a private message. Thanks!

Yep, you should login with your xmpp domain in Spark.