powered by Jive Software

After upgrade to 3.9.3, clients can't connect to Openfire after a few hours, need to restart

Hi folks.

I have Openfire installed on an Windows 2008 64bit (virtualized) environment with MYSQL 5.5.33 database, almost 640 users using PSI IM clients. Recently It was upgraded from version 3.8.2 to the 3.9.3 and I ran openfire-service to start the application as a service. It works, but I’ve experienced some weird issues, as is:

_After a few hours some people (and sometimes happens with me) complains that they can’t authenticate on server. When it happens with me, I can’t neither even log-on on the Admin console (servername:9090). Restarting Openfire, everything works fine again, until the next time that it happen.

_ A few users have problems with PSI IM v0.15 (application hang’s sometimes). In v0.14, works fine.

I’ve tried to stop the openfire service and start it manually as it was before, but no success.

Anyone have an idea? Thanks in advance

Please check your openfire log files, located in the logs/ folder of the openfire install for any clues as to what may be happening.

You are most probably running out of memory because of an unknown memory leak in 3.9.2+ versions. https://community.igniterealtime.org/thread/52516

I suggest to use 3.9.1 for now. You can uninstall 3.9.3 and install 3.9.1 on top.

Don’t know about psi 15. I think someone else reported this also a while ago, but i wasn’t able to reproduce it myself on my test server.

Wow, thanks Daryl and Wroot. I’ve ckecked the logs, and that happens many times when the issue cames:

2014.07.03 15:33:24 org.jivesoftware.database.SequenceManager - WARNING: failed to obtain next ID block due to thread contention. Trying again…

2014.07.03 15:33:24 org.jivesoftware.database.SequenceManager - Failed at last attempt to obtain an ID, aborting…

2014.07.03 15:33:26 org.jivesoftware.openfire.privacy.PrivacyListProvider - Error loading default privacy list of username: uru-colet-andreia

java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: Couldn’t get connection because we are at maximum connection count (25/25) and there are none available

at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:151)

…and goes on.

I will consider to go to 3.9.1, because the only problem that I had in the 3.8.2 was the java memory heap (i can’t set it to more than 1536 MB and I need at least 2048)

Thanks, one more time

That’s not the kind of errors that appear on out of memory. It should say OutOfMemory somewhere actually Are you sure about the heap size? I think i wasn’t able to set it more thab 1748 or something.

Update: now i think it was more like 748, because i use 32-bit linux os and java.

In a 64bit Windows with 6GB of Ram, I can’t set more than xmx1536m, If I try more than that, Openfire cannot start, I think it’s something with the 32bit builtin jre.

For the error mentioned in the subject, I’ll wait the next one happens to read the error and info logs

Java memory at this time, WOW!

Memória do Java



1325.38 MB of 1484.81 MB (89.3%) used

Well, i think that’s a problem with DB conector on v.3.9.3:

**error.log:
**

2014.07.07 09:51:52 org.jivesoftware.database.SequenceManager - WARNING: failed to obtain next ID block due to thread contention. Trying again…

2014.07.07 09:51:52 org.jivesoftware.database.SequenceManager - Failed at last attempt to obtain an ID, aborting…

2014.07.07 09:51:53 org.jivesoftware.openfire.spi.PresenceManagerImpl - ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: Couldn’t get connection because we are at maximum connection count (25/25) and there are none available

java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: Couldn’t get connection because we are at maximum connection count (25/25) and there are none available

info.log:

2014.07.07 09:51:57 org.jivesoftware.database.DbConnectionManager - Unable to get a connection from the database pool (attempt 10 out of 10).

java.sql.SQLException: Couldn’t get connection because we are at maximum connection count (25/25) and there are none available

So, I think that I need to downgrade, because I never face that in 3.8.2.

Don’t know what mught be causing that. Maybe this change OF-697

You can try copying /openfire/lib/mysql.jar from 3.8.2 installation into 3.9.1 and see if this works. Though if you going to use older jdbc connecter, you will face the problems which users were having with older jdbc and newer mysql versions.

Well, since i’ve been ran 3.8.2 i have the same MySQL (5.5.33), so I’ll try to use the older mysql.jar

Update: I’ve changed the mysql.jar from 5.1.30 (that cames with 3.9.3) for the one of my old 3.8.2 instalation (5.0.8). Let’s see if it works…

Update 2: Two days running without any failure for while. I’ll wait until friday to confirm if the problem was solved.

Well, changing the mysql.jar to the same that found in OF 3.8.2 did the trick. No more problems and weird behaviors here!

Mysql 5.5.33 + JDBC 5.0.8 = YES
Mysql 5.5.33 + JDBC 5.1.30 = NO

Bonus: I think the new OF + JRE 1.7 uses less Java Memory.

Thank you, guys!