Confluence Error 500 after server upgrade: Unknown system variable 'useUnicode'

Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 6, 2021

Hi,

Our infrastructure team has upgraded one of the confluence servers to be able to install some compliance plugins on the server.  Im not to familiar with the server administrator aspects, just getting up to speed now so im sure im also missing some critical area's to review. 

Once they upgraded the server, Confluence no longer starts up successfully and we get an error 500.

In the confluence logs im seeing the following error:

java.sql.SQLException: Unknown system variable 'useUnicode'

In the confluence config.xml file we have the following 

<property name="hibernate.connection.url">jdbc:mysql://localhost/confluencedb?sessionVariables=useUnicode=true&amp;characterEncoding=utf8</property>

On My SQL im seeing the following when viewing the confluenceDB status.  Not positive if Client Character set and Conn. Character set is culprit or something else...maybe the fact they are running everything off root?

Screen Shot 2021-01-06 at 12.02.15 PM.png 

The ERROR 500 is indicating:

com.atlassian.confluence.tenant.VacantException: Confluence is Vacant, a call to tenanted [public abstract org.hibernate.Session org.hibernate.SessionFactory.getCurrentSession() throws org.hibernate.HibernateException] is not allowed

 The confluence service is running under a dedicate user account "confluence" so that isnt running under root and the confluence server previous worked according to the team that set it up and managed it. 

Im currently stumped on where to look to try to find the issue and resolve it. I wanted to see if anyone else has had this issue after a server upgrade?

1 answer

1 accepted

0 votes
Answer accepted
Radek Dostál
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 6, 2021

You have these parameters:

jdbc:mysql://localhost/confluencedb?sessionVariables=useUnicode=true&amp;characterEncoding=utf8

 

Notice the use of equals '=' twice in succession.

 

Comparing that to my instance it uses this:

jdbc:mysql://xxx.xxx.xxx.xxx:xxxx/confluencedb?autoReconnect=true&amp;useSSL=false&amp;useUnicode=true&amp;characterEncoding=utf8

 

Each parameter must contain only a single equals, i.e. key=value; separated by ampersand &.

Can you remove the sessionVariables to and see if this helps?

 

jdbc:mysql://localhost/confluencedb?useUnicode=true&amp;characterEncoding=utf8

Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 6, 2021

Thanks for the response @Radek Dostál that eliminated the useUnicode error but i got a new one

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'performance_schema.session_variables' doesn't exist

I haven't checked the mysql config file just yet but will later to understand if the performance_schema = on is in there 

Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 6, 2021

Thank you again for the help, once i made the suggested change, i did get another error but all i needed to do was set the compatibility on using the below command in mysql

set @@global.show_compatibility_56=ON;

Restarted confluence and boom, it's back up and running.  

Radek Dostál
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 6, 2021

Oof, nice one :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events