Unable to start Confluence after Upgrade
Asked by Association Proxgroup:

Hello,

Since upgrading my confluence to last version ( 6.14.0 ) we're unable to start :

You can find error here : [https://paste.proxgroup.fr/?418e964b0bd231f9#PxAg0agVDKSAiTo4uF/Ei62EtRn0u04NtdZQ0Dqwayw=](https://paste.proxgroup.fr/?418e964b0bd231f9#PxAg0agVDKSAiTo4uF/Ei62EtRn0u04NtdZQ0Dqwayw=?)

I followed this guide : <https://confluence.atlassian.com/confkb/confluence-generates-confluence-is-vacant-error-on-install-779164449.html>

I can ping myself : root@intra-confluence:/opt/atlassian/confluence/logs# ping \`cat /etc/hostname\`  
PING intra-confluence (127.0.0.1) 56(84) bytes of data.  
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.020 ms  
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.024 ms  
\^C  
--- intra-confluence ping statistics ---  
2 packets transmitted, 2 received, 0% packet loss, time 999ms  
rtt min/avg/max/mdev = 0.020/0.022/0.024/0.002 ms


Answers:
author: Shannon S
body: Hi there,

The link to your logs requires a password to decrypt. What should I enter in order to be able to read the logs?

Also, which version of Confluence did you upgrade from, and can you let us know exactly which procedure you followed?

Regards,

Shannon

comments: author: Association Proxgroup
body: Hey,

Sorry, please find another upload here : <https://paste.proxgroup.fr/?a4d0b73ae03783e8#ncb03YCpKVUC+b0P0QyS9g1eIUXRPAqBUOxwPtD9hXc=>

I've upgrade from 6.11.2 to 6.14.0.

Just downloaded the latest .bin an executed it ( Enter, enter, enter... ) like all of my previous upgrades.


author: Shannon S
body: Confluence might not be able to access your database.

Could you tell me what database version you're using?

You can go to the confluence.cfg.xml file in the home directory and check that the connection is okay. You'll want to make sure you can reach the database server via the Confluence server.

* [How to find Confluence's database connection parameters](https://confluence.atlassian.com/confkb/how-to-find-confluence-s-database-connection-parameters-779172320.html)

Shannon


author: Association Proxgroup
body: Find config here : <https://paste.proxgroup.fr/?61fe58b983cc0fc1#p/gn/AuB6jmt8ECyvGfl2s+W/FmNwjKU3mRTJtsi5us=>

I'm able to login using mysql command![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/44638i8B143B57C986769E/image-size/large?v=v2&px=999 "Capture.PNG")


author: Shannon S
body: Hello,

Thank you for checking that. I noticed that you're using MariaDB, which is not supported.

You need to make sure to use MySQL 5.6 or 5.7.

For MariaDB support, please vote on the following feature request:

* [CONFSERVER-29060](https://jira.atlassian.com/browse/CONFSERVER-29060) *Support for MariaDB*

Have a look at [Database Setup for MySQL](https://confluence.atlassian.com/doc/database-setup-for-mysql-128747.html) for tips on how to install MySQL and setup your database.

Regards,

Shannon


author: Shannon S
body: One more thing - to migrate your data, you'll want to follow this article:

* [Migrating to Another Database](https://confluence.atlassian.com/doc/migrating-to-another-database-148867.html)

Let us know if you have any trouble.

Regards,

Shannon


author: Association Proxgroup
body: Hello,

Something changed in last version ? Mariadb Always worked before with confluence.

Any way to rollback ?


author: Shannon S
body: Hello,

It might have worked before, but I can confirm that MariaDB has never been supported for Confluence. It is not included in our testing when releasing a new version.

Do you happen to still have your XML backup from before the upgrade? If so, I would recommend that you just install the previous version with a working MySQL database, and then import your XML backup from there.

Regards,

Shannon


author: Association Proxgroup
body: Hello,

I moved my database from MariaDB to MySQL 5.7 ( Dump, database cr?ation following requirements, import database dump ).

I'm still not able to get Confluence working.

atlassian-confluence.log : <https://paste.proxgroup.fr/?1f6cbf603c84984b#wpa+4LnM/Ck75bkLr00Z3U+4vA3qcbCrZFE4EjMqmjo=>

catalina.out : <https://paste.proxgroup.fr/?bf7c656e5283f0b5#tmo2orooF1bvfefOz3mQh6aAOh4VoQ0fczZ8nW7wn8E=>

In the log, you can see errors about database encoding but i already followed this KB : <https://confluence.atlassian.com/kb/how-to-fix-the-collation-and-character-set-of-a-mysql-database-744326173.html>


author: Shannon S
body: Hello,

You want to migrate to MySQL from MariaDB using a supported migration method. See [Migrating to Another Database](https://confluence.atlassian.com/doc/migrating-to-another-database-148867.html) for more details.

This is why I mentioned the XML backup, since we don't recommend that you migrate simply using a database dump.

Here's what I would do.

1. Create a fresh install of Confluence 6.14 along with [a brand-new MySQL database](https://confluence.atlassian.com/doc/database-setup-for-mysql-128747.html).
2. Upon setup, you can then import the XML file.
3. You can check the article I linked earlier for any additional steps (such as if your instance is a large instance).

This will ensure the database is correctly set up and you won't get any of the encoding errors.

It seems that the way you migrated retained some of the settings from before, which is causing the same error to appear again.

Can you try it using the XML backup instead of a database dump and let me know how that goes?

Regards,

Shannon


author: Association Proxgroup
body: Hello,

I don't have the XML backup.

But the installer created a backup in /var/atlassian/application-data

Any way to use it ?


author: Shannon S
body: Hello,

We might not know how old that backup is, so we can try to troubleshoot your database the way it is now if you hadn't created it yourself.

If you run these queries on the database, see what comes back. It should tell us what specifically is triggering the error:  

    use <your database name>;

    show variables like "character_set_database";

    show variables like "collation_database";

    show variables like "storage_engine";

    show PROCEDURE STATUS;

    show FUNCTION STATUS;

    show TRIGGERS from <db name>;

    show FULL TABLES IN <db name> WHERE TABLE_TYPE LIKE 'VIEW';

    SELECT TABLE_SCHEMA,

           TABLE_NAME,

           CCSA.CHARACTER_SET_NAME AS DEFAULT_CHAR_SET,

           CCSA.COLLATION_NAME,

           COLUMN_NAME,

           COLUMN_TYPE,

           C.CHARACTER_SET_NAME

      FROM information_schema.TABLES AS T

      JOIN information_schema.COLUMNS AS C USING (TABLE_SCHEMA, TABLE_NAME)

      JOIN information_schema.COLLATION_CHARACTER_SET_APPLICABILITY AS CCSA

           ON (T.TABLE_COLLATION = CCSA.COLLATION_NAME)

     WHERE TABLE_SCHEMA=SCHEMA() AND C.DATA_TYPE IN ('enum', 'varchar', 'char', 'text', 'mediumtext', 'longtext')

     ORDER BY TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME;

`Regards,`  
`Shannon`


author: Association Proxgroup
body: Hello,

Find all commands output here : <http://paste.proxgroup.fr/?e01259058559ef2a#QSnKQLv9+iMwA5WUxaZ0nhe/qE4kAXSA6VPc4lNZJys=>


author: Shannon S
body: Thank you!

It does appear that your collation on your database is incorrect.

![Screen Shot 2019-02-13 at 11.53.25 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/45471iE11A8B6C0E0A9201/image-dimensions/785x419?v=v2 "Screen Shot 2019-02-13 at 11.53.25 AM.png")

You'll want to try to alter the collation and character set, making sure to make a backup before-hand.

You can try to use this article from Jira (should be a similar process), or check out the information we have on MySQL collation in Confluence, from the 2nd link:

* [How to change all columns' and tables' collation to 'utf8_bin' in MySQL](https://confluence.atlassian.com/jirakb/how-to-change-all-columns-and-tables-collation-to-utf8_bin-in-mysql-601456761.html)
* [How to Fix the Collation and Character Set of a MySQL Database](https://confluence.atlassian.com/confkb/how-to-fix-the-collation-and-character-set-of-a-mysql-database-670958160.html)

Regards,

Shannon


author: Association Proxgroup
body: Hello,

After running your commande, now i'm in utf8

<http://paste.proxgroup.fr/?d41a95d0230105b5#6aZi13m1GvRiZaKOweAmO+pe+udQgxrsJjhOgW4q8yI=>

But i'm still not able to start Confluence

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/45532iD2E59CC37B1805C8/image-size/large?v=v2&px=999 "Capture.PNG")