Upgrading Ejabberd from 16.06 to 17.04

Hello,

I am attempting to upgrade my ejabberd server from 16.06 to 17.04. I followed the instruction for 16.06 to 16.08 and performed the SQL table creation for oauth_token.

I also tried to do the table alterations under 17.01 - 17.03, however, it failed with the error that rosterusers table does not exist. But since this wasn't required, I tried to start the server.

I am getting the strange problem of ejabberdctl keeps trying to read the .erlang-cookie from the old directory. I tried setting HOME in ejabberdctl.cfg but that doesn't seem to do anything. If I remove the directory of the old 16.06 installation, the server fails to start with a error that points to cookie mismatch.

Can someone help me with what is going on here?

Thanks.

koensayr wrote: I also tried

koensayr wrote:

I also tried to do the table alterations under 17.01 - 17.03, however, it failed with the error that rosterusers table does not exist. But since this wasn't required, I tried to start the server.

The rosterusers table is required for mod_roster. Do you use SQL only for auth? If you also use it for mod_roster, then that missing table is a worrying error.

koensayr wrote:

I am getting the strange problem of ejabberdctl keeps trying to read the .erlang-cookie from the old directory. I tried setting HOME in ejabberdctl.cfg but that doesn't seem to do anything. If I remove the directory of the old 16.06 installation, the server fails to start with a error that points to cookie mismatch.

It seems you have both installations mixed now. In those situations, what I do is:
1. Remove all the installed files, config files, logs, mnesia database files, ejabberdctl script from /sbin/ or any other system path. Of course, keeping a good backup of all the good stuff.

2. Install the new ejabberd

3. Start the new ejabberd, check it works with its default configuration

4. Now restore some of the old stuff from my old server, for example certificate files and some basic modules configurations.

5. Restart ejabberd, check it works.

6. Now restore the SQL database configuration in ejabberd.

7. Restart ejabberd, check it works.

[Repeat restoring and configuring stuff one by one, until you are happy with it, or until you find a problem]

As you can see, it doesn't make sense to bother with 4, 5, ..., until you have 3 done correctly.

I was able to fix the mix-up

I was able to fix the mix-up issue with 2 versions following your step 1-7. Thank you.

badlop wrote:

The rosterusers table is required for mod_roster. Do you use SQL only for auth? If you also use it for mod_roster, then that missing table is a worrying error.

I have the default mod_roster setting with no options:
mod_roster: {}
however, I also have:
default_db: sql
So it seems mod_roster should be using sql. What do I need to do in this case?

Ok, in that case mod_roster

Ok, in that case mod_roster should be using SQL as database, and it requires that table to exist. Does it really exist? Does the mod_roster feature work (add some contact to see if it persists)?

Syndicate content