Koozali.org formerly Contribs.org

Other Languages => Français => Topic started by: ericcar on January 15, 2019, 10:36:04 AM

Title: Installation openfire 4.3.0-1 - pas de cnx mysql
Post by: ericcar on January 15, 2019, 10:36:04 AM
Bonjour

Sur une installation vierge de sme 9.2 a jour, j'ai un problème mors de l'installation d'openfire

je suis ce tuto https://wiki.contribs.org/Openfire

sur l'écran des paramètres base de données, j'ai cet erreur :
"A connection to the database could not be made. View the error message by opening the "/logs/error.log" log file, then go back to fix the problem. "

dans le fichier log :
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure

Avez vous une idée du problème.
merci de vos conseils
Title: Re: Installation openfire 4.3.0-1 - pas de cnx mysql
Post by: mmccarn on January 15, 2019, 12:16:16 PM
Confirm that you successfully created the database and reconfigured mysql to listen on port 3306:
Code: [Select]
mysql --port=3306 -e "show databases;"
# (examine the output for your openfire database)

If the database is listed, test the credentials you used:
Code: [Select]
mysql --port=3306 -u openfireuser -p openfiredb -e "show tables;"
# replace "openfireuser" with the openfire user account you created
# replace "openfiredb" with the openfire database you created
# you will be prompted for the password

If those tests succeed, try replacing "localhost" with "127.0.0.1" in the jdbc connect string:
jdbc:mysql://localhost:3306/openfiredb
jdbc:mysql://127.0.0.1:3306/openfiredb


If the sql configuration tests failed, back up and find out why.
Title: Re: Installation openfire 4.3.0-1 - pas de cnx mysql
Post by: ericcar on January 15, 2019, 01:42:00 PM
sql ok
Code: [Select]
mysql --port=3306 -e "show databases"
+--------------------+
| Database           |
+--------------------+
| information_schema |
| horde              |
| mysql              |
| openfiredb         |
| test               |
+--------------------+

Code: [Select]
[root@sme logs]# mysql --port=3306 -u openfireuser -p openfiredb -e "show tables;"
+----------------------+
| Tables_in_openfiredb |
+----------------------+
| ofExtComponentConf   |
| ofGroup              |
| ofGroupProp          |
| ofGroupUser          |
| ofID                 |
| ofMucAffiliation     |
| ofMucConversationLog |
| ofMucMember          |
| ofMucRoom            |
| ofMucRoomProp        |
| ofMucService         |
| ofMucServiceProp     |
| ofOffline            |
| ofPresence           |
| ofPrivacyList        |
| ofProperty           |
| ofPubsubAffiliation  |
| ofPubsubDefaultConf  |
| ofPubsubItem         |
| ofPubsubNode         |
| ofPubsubNodeGroups   |
| ofPubsubNodeJIDs     |
| ofPubsubSubscription |
| ofRemoteServerConf   |
| ofRoster             |
| ofRosterGroups       |
| ofSASLAuthorized     |
| ofSecurityAuditLog   |
| ofUser               |
| ofUserFlag           |
| ofUserProp           |
| ofVCard              |
| ofVersion            |
+----------------------+

same error with "jdbc:mysql://127.0.0.1:3306/openfiredb"
thanks
Title: Re: Installation openfire 4.3.0-1 - pas de cnx mysql
Post by: ericcar on January 15, 2019, 03:29:25 PM

I redid the same procedure with the version 4.2.3

It works.

SME 9.2 does not seem compatible with the latest version 4.3

cordially
Title: Re: Installation openfire 4.3.0-1 - pas de cnx mysql
Post by: ReetP on January 16, 2019, 12:50:46 AM
I redid the same procedure with the version 4.2.3

It works.

SME 9.2 does not seem compatible with the latest version 4.3

cordially

Doesn't seem that MySQl is trhe issue

http://download.igniterealtime.org/openfire/docs/latest/documentation/database.html

"Make sure that you are using MySQL 4.1.18 or later (5.x recommended)"

So the question is exactly WHAT is not compatible....

A quick search for your error:

https://stackoverflow.com/questions/38909705/com-mysql-cj-jdbc-exceptions-communicationsexception-communications-link-failur

Please have a read about the error, symptoms and things to test
Title: Re: Installation openfire 4.3.0-1 - pas de cnx mysql
Post by: mmccarn on January 16, 2019, 11:59:39 AM
I found this bug on stackoverflow talking about the same problem (openfire 4.2 works, but 4.3 can't talk to mysql):
https://stackoverflow.com/questions/2983248/com-mysql-jdbc-exceptions-jdbc4-communicationsexception-communications-link-fai?rq=1

In that bug the response points out that openfire 4.3 upgraded the jdbc mysql connector and suggests you might get openfire 4.3 to work by replacing the jdbc jar in 4.3 with the same file from 4.2.

The detailed error message from the stackoverflow report mentions "mysql-connector-java-8.0.12.jar"; I found this note on the mysql jdbc connector saying the minimum mysql version is 5.5:
https://dev.mysql.com/downloads/connector/j/
Title: Re: Installation openfire 4.3.0-1 - pas de cnx mysql
Post by: ReetP on January 16, 2019, 01:36:24 PM
My suspicion was they haven't updated their documentation yet - typical developers.... !!

It is possible to run the existing mysql side by side with mysql55 from Software collections so it is worth a go to test.

https://wiki.contribs.org/Software_Collections:MySQL55

If that works then the wiki needs updating