Projects tigase _server server-core Issues #855
Exception Getting Instance is Back (#855)
Closed
Eric Dziewa opened 7 years ago

This init.properties works fine with b4874. Fails with b4894.

tigase-console.log

Andrzej Wójcik (Tigase) commented 7 years ago

It appears that TigInitdb procedure executed during startup of Tigase XMPP Server executes very long on cluster-c MySQL database. As a result it should be killed as it times out.

However, it looks like MySQL forbids user A to kill procedure created by user B even if it was started by user A. To deal with this I added SQL statement to mysql-installer-post.sql which changes definer of procedures stored on Tigase XMPP Server database to the user which will be later used to execute them. That way some user will be procedure definer and executor making this user able to properly stop timing out procedure.

Fix will be part of a next snapshot build.

Eric Dziewa commented 7 years ago

Andrzej, I'm sorry to report that the problem still exists with b4899.

Andrzej Wójcik (Tigase) commented 7 years ago

Eric, this issue is fixed, but the fix was not applied on database schema of cluster-c installation.

I've just run following query:

select db, name, definer from mysql.proc where db = database();

and found out that definer field is still


while it should be 

Did you execute

scripts/tigase.sh upgrade-schema etc/tigase.conf

during this upgrade? I'm asking this as it is required part of an upgrade process when database schema changes.

Eric Dziewa commented 7 years ago

Yes i ran upgrade-schema just as I did for tpup, tigase.org, and tigase.im databases. I ran it again just now and all output was [ok] but the definer remains root@%. So I updated the column manually.

mysql> update proc set definer = 'tigase@%' where db = 'tigase';
Query OK, 106 rows affected (0.01 sec)
Rows matched: 106  Changed: 106  Warnings: 0

We will see when the nightly load test begins whether that fixes it.

I've gone and checked our other DBs. tpub, and tigase org have most rows with definer of root@%, a few are user@localhost. These systems are not getting the error.

All of the DBs for tigase.im are root@%, or root@localhost.

%andrzej.wojcik Do you suggest I change definer on all of them to user@% ?

Do you think I shou

Andrzej Wójcik (Tigase) commented 7 years ago

I've already added code to post upgrade scripts which should execute update which you mentioned, so it should be executed.

If it is executed but procedures definer is not updated I will need to review this update.

Eric Dziewa commented 7 years ago

I downloaded b4899 on tpub and ran upgrade-schema. The definer was set correct in the DB and the instance is running fine.

Since I updated cluster-c DB manually I upgraded to b4899 and started it but it errored out with a slightly different error... no thread ownership problem, just MySQLTimeoutException. ran upgrade-schema again and no difference.

Wondering if this was a problem local to cluster-c, I tested b4881 on tigase.im and got the same error.

Reverting cluster-c to b4874 works fine.

Testing b4868 on tigase.im runs. There are other errors but that is for another ticket.

For the record tigase.org is running b4875.

Seems something happened between b4875 and b4881. Strange thing is why does it run on tpub only? tpub is configured for cluster mode even though it's the only node...

by the way, running upgrade-schema with b4899 fixed the definers on tigase.im. There were a few that were skipped but I think they were old tables.

Andrzej Wójcik (Tigase) commented 7 years ago

Waiting for comments on #5565.

Andrzej Wójcik (Tigase) commented 7 years ago

As concluded in #5565, I've disabled by default call to TigInitdb() during Tigase XMPP Server startup which was timing out. With this change, the new version should start without any issues.

Eric Dziewa commented 7 years ago

Seems to be fixed.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
5727
Version
tigase-server-8.0.0
Spent time
25h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#855
Please wait...
Page is in error, reload to recover