powered by Jive Software

Openfire Install on Centos 7

Hi there.

I have just done a brand new install of Centos 7, and on that an install of Openfire
This is part of a project where I need to set up a chat server.

I installeed Openfire fine and ran through the set up, I also followed the tutorial on this site.
I went with their postgressql set up of a DB, but have since then reinstalled Openfire and chose the embedded DB route in hopes that would make it work.

I have tried to set up Sparkweb, and changed my IP address appropriately in the SparkWeb.html file. No luck.
I then tried to just use the Spark app and connect to my server with my admin user name and password, but no luck

I am unable to create new users or do anything, but everything on Openfire’s end seems fine.

Any help would be GREATLY appreciated.

Sparkweb is a discontinued project, so you won’t get much support about it here. As about Spark, what version are you using, what error do you get and how exactly are you trying to login to Openfire?

I initially chose Sparkweb because it would be much more convenient for me to use a simple web client for this project. But, I decided to try Spark to see if that even worked. I am using the latest version (2.8.1), and it gives me “Invalid username or password.” when trying to sign in. I know the username and password are correct, though, because I use them to sign into Openfire. I also tried creating an account through Spark, and the error message I received was “Unable to connect to 204...*”.

Do you think this could be an issue with certain ports being closed on my server? I would need help with going about this…
Also, when I check the logs in Openfire, both Error, Warn, Info, and Debug are filled with lots of entries…

Edit: Now I am using Spark 2.8.1. When I try to log in now I get the error: “Unknown connection error. Please review the logs for more information.”. The logs/error file is empty. Note I am on Windows.

Are you sure you are using 2.8.1? It was just released today. 2.8.1 should give a more appropriate error (2.8.0 was showing “wrong user or password” for almost every issue). You need to open 5222 port on your server for an xmpp client to be able to login (Spark or any else client).

Yup, I just updated my previous install with 2.8.1. Would you perhaps know the command on how to set up port 5222 for an xmpp client on Centos 7 command line?


I ran the commandfirewall-cmd --permanent --zone=public --add-port=5222/tcp

Then I ran firewall-cmd --reload

Now the error I am getting is: Certificate hostname verification failed.

On Spark’s login screen go to Advanced and check “Disable certificate hostname verification”. Then you should be able to login. This is happening because your TLS certificate has been generated for your server’s name (which you have specified during the setup, usually it defaults to machine’s hostname), but you are logging in using IP. So domain’s name in the certificate doesn’t match the domain name you are logging into.

Alternatively you can put your domain name into Domain field on the login screen and in the Advanced menu uncheck the “Automatically discover host ane port” and put your IP there.

Thank you! I did that, and I was able to sign in. But, I am unable to create accounts still. I get “Unable to connect to 204...*”

How do I go about fixing this?

During Openfire setup, was it incorrect to use my IP (204...*) as the domain name?? I think by default it tried to put “” or something like that.

It is always better to use some name instead of IP. Of course, it is easier for admin to just use IPs and not worry about setting up some sort of name resolution for it to work (DNS, hosts, etc.)

I have just tried to setup a test server on my localhost and named it I wasn’t able to login to it by specifying as Domain. Was still getting “Certificate hostname verification failed” error, though TLS certificates are generated for “domain”. Looks like this doesn’t work correctly when using IP addresses as Spark probably uses IP address directly in that case and not as a domain name, hence the error. Account creation also didn’t work. It looks to me it just can’t accept IP address in that dialog, so you will have to use some name for your server.

If you don’t want to setup DNS resolution, then you can go with the second option (granted, this will be more confusing for your users). Do a fresh Openfire installation and name it, say chatserver. Then a new user after running Spark for the first time would have to go to Advanced settings. Uncheck “Automatically discover host and port” and put your server’s IP there. Press OK. Then press on Accounts button and enter: username, password, password and chatserver as Domain. Should be able to create an account then. And then this user will use servername, password and chatserver to login. No need to check “Disable certificate hostname verification” option in this case.

If you will have a DNS setup to resolve chatserver into your server’s IP address, then user should be able to create new account without going into Advanced settings.

Hmm… I would much prefer to just stick with using the IP, I don’t know if I have enough control over my school server to set it up as something like “chatserver.com” for it to connect to… definitely not. If I am misunderstanding you, please let me know.

Also, using Spark is unfortunately still not my desired way to distribute the chat system among my fellow students/teacher. It is preferable for it to run in a web browser; this is why I initially tried to use Sparkweb. Also if I did stick with Spark, having them go through and have to manually change options would be too clunky as the final project.

Thanks for your help, wroot.

Edit: My “hostname” is set to something like “comp-27*-**”. Can that help?

Will anything on this page help me? Linux: find out information about current domain name and host name

Well, i don’t know of a way to use IP and it not to be clunky At least with Spark. Maybe you can find another client which will work better with such setup. You can also look for other web client here XMPP | XMPP Clients But as far as i know, web client seems like a dying breed. Many listed there are not maintained anymore. Some are group chat only (like Candy, which is used on this site in the Group Chat menu).

It doesn’t have to have .com in the name if that’s only for the internal use. It can be just “chatserver”. But your other computers must know how to find it by its name. I’m not that familiar with the Linux network stuff. In our network (Windows based) i just created A HOST record in our internal DNS server to point “chatserver” to local IP. So my clients put chatserver as Domain to login and everything works fine.

Your server’s hostname has no effect on that.