powered by Jive Software

Moving to a new server, and fixing some small issues

I wanted to bounce some ideas about the process.

I have Openfire running in Ubuntu 12.04

I have a new VM setup and ready with 16.04. Openfire and MySQL are already installed and ready to go.

I am using the latest version of Openfire, and I also use FastPath (so I need to install Tomcat too).

I am going to do this during business hours so I wanted to make sure I cover all the bases first

  1. Prepare VM
  2. Install Ubuntu 16.04
  3. set hostname as intended for server
  4. Install Apache2
  5. Install MySQL-server
  6. Install Tomcat
  7. Install Openfire deb
  8. Copy MySQL Database
  9. Create Openfire MySQL user (it can be exported but the password needs to be set manually since it is saved as a hash)
  10. For openfire User update the password in the config file (which one??){openfire.xml I am guessing, but it is encrypted
  11. Copy Openfire configuration files from /etc/openfire
  12. (this is only for FastPath) Copy Tomcat configuration files
  13. It has been a long time so I don’t remember what I need to copy actually. I remember that I needed to put the java package, and I remember I did most of it using defaults, but I can’t remember what I did. Tomcat is my weak point.
  14. At this point most should be ready, so now switch the IP address so that the connections can go to the new server
  15. Setup SSL for Openfire and Tomcat
  16. For Openfire create a new server request from inside the application
  17. For Tomcat I am not sure what to do. I need to create a new keystore right, not move it. And then create the request.
  18. Copy additional files
  19. /usr/share/openfire/index{groupname}
  20. Any other files?
    I almost forgot. I would like to get the DNS SRV Record verification working with this server. So lets say we use for fqdn

chat.contoso.com and that the domain name is conto.com (yes, someone though to shorten our domain name for some weird reason).

Should I name the server chat? I can add a DNS record that says chat.contoso.com. Would it still give the warning?

I don’t think you need to name the server “chat”. But i haven’t done this, so i’m only assuming. You can create a DNS entry (alias: pointing chat.contoso.com to servername (if the server’s name is already resolvable by some other DNS record), or a record: pointing chat.contoso.com to IP address of the server). Then you can create a SRV record pointing queries to conto.com on 5222 to chat.contoso.com. This should get rid of a warning. Though, that warning is more like informational and things can work correctly even with it showing (in some cases, like in mine). Your fqdn can even be just chat. I don’t think there is a requirement for it to replicate the main domain name. XMPP doesn’t understand subdomaining. chat.contoso.com and contoso.com are two completely different domains for XMPP. Your users would need to put conto.com in their clients for login, so chat.contoso.com is not anywhere in that scheme.

I would try:

name server - chatserver

put chatserver as fqdn during setup

put conto.com as xmpp domain during setup

add A record pointing chatserver to its IP

add SRV record for queries to conto.com on 5222 to point to chatserver

It kept asking me to complete the setup because I forgot to restart openfire after moving the config files

Ok, I had everything running. I could even login to the new server (using IP instead of server name), but as soon as I swapped the IP address I was not able to login anymore.

The old server has multiple Virtual NICs, so maybe something is configure thru a different IP? I checked and everything seems to be configured thru server name, or localhost. So not sure.

For the moment, I swap it back (using old server for the weekend) but the new server does not work anymore. Weird.

I also made sure routing is right (I did have 1 problem there before, but it is fixed now)

I think I kind of found the problem and I might have to start from scratch since it has been so long.

But is there a way to re-launch the setup tool?

Also, it seems I when I copied the data I overwrote the MSQL connection, and it has different versions.

Also, how can I reencode the username and password?

OK, from openfire.xml I changed the values and removed the encrypted directive. After restarting OF it encrypted it.

Are there also DB settings saved somewhere else?

To restart the setup edit the openfire.xml and change the last tag to false. Almost all the settings (except for DB connection string) are saved in the database. It then removed that data from the openfire.xml file.

Thanks wroot.

I took notes in all the changes to make it easier in the next migration.

I think I had a connection, and password issue, plus networking routing issue in my first try (the networking is due to my lack of experience in Linux Static IP )

What I ended up doing is running a clean install, then deleting the very few tables that had data besides property and then move everything over from the original DB.

After I did however I noticed that new Openfire version also encrypts the AD connection account as well. I think I might not have changed one of the accounts in the DB when I did the move the first time too

Life learning lesssons

Do you think there will be any issues with the aproach I took?

Spark and imessage clients connected with no problem. However my Xabber (the client I use from my Android phone) cannot connect

It’s hard to follow the things you do. And i don’t know why you do this. It seems that you are trying to migrate your server to a new one. But why do you have to take parts of one database and replace parts in another one i don’t understand. Xabber issue might not be related. Not sure if Xabber has any logs to clarify the issue.

I realized it was harder than it was supposed to be

The reason I took that route yesterday was that the first time I did it something went wrong. Everything worked until I switched the IP address.

So yesterday I was testing something, creating a new server from scratch, and then “import” the data. I wanted to see what was different. After I did that I realized I had the problem with the routing for starters, and that some account credentials might not have been set correctly.

During the day sometimes I get too busy and I get sidetracked by other tasks, and because the company I support is retail, I have users online until 9 PM where caffeine starts to wear off and I end up doing crazy things

I am doing a migration because I want to separate OF from another server project I have in that server, and upgrade the baseline OS (from Ubuntu 14.04 to 16.04.2), and there are a few changes coming along too line new Java (from 17 to 18), New Tomcat (from 6 to 8), new MySQL (5.5 to 5.7), but there are also a few new property settings changes I noticed database.defaultProvider.username I wasn’t sure how much they affect the system (since a lot of those properties are somewhere else, like in the openfire.xml, so I decided to try to import everything without writing over properties.

If I am awake enough tonight I was planning to do a test move again cleaning the DB and moving everything.

Got everything moved. I tried again using fully the DB from the other server, minus property table initially, but later I did a backtrack and added, and changed with new settings. Having the server as virtual allows to keep using checkpoints )

I have a keyring that I created using keytool to add SSL for Tomcat. I am guessing I can use it in OF as well.

Before I set it, I wanted to make sure where the settings are in the DB or config file in case I need to change them back