Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence upgrade from 5.9.7 to 6.15.1, migrating SQL driver

Deleted user March 27, 2019

I tried upgrading Confluence 5.9.7 to 6.15.1 via the installer on Windows Server 2012 R2 as per this support article, our old installation still uses the jTDS driver to connect to the database. The upgrade itself went without error, but when I launched the Confluence web interface it showed "The jTDS driver for Microsoft SQL Server is no longer supported. We were not able to automatically migrate your driver. To manually switch to the official Microsoft SQL Server JDBC driver, update the driver configuration in confluence.cfg.xml.".

I tried changing the driver as per this support article, here's where the problems start.

The MS SQL server on the same server as the Confluence installation uses the named instance "CONFLUENCE", the database name is "confluence" so I changed the line of "hibernate.connection.url" in the confluence.cfg.xml as per this Microsoft article to the following:


jdbc:sqlserver://localhost;instanceName=CONFLUENCE;databaseName=confluence


After that I reinstalled the service by running the service.bat in <install-directory>/bin, first with the parameter "remove", then with the parameter "install". This shows the following output:


Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
Service will try to guess them from the registry.
Installing the service 'Confluence170316184538' ...
Using CATALINA_HOME: "C:\Program Files\Atlassian\Confluence"
Using CATALINA_BASE: "C:\Program Files\Atlassian\Confluence"
Ignoring JAVA_HOME: ""
Using JRE_HOME: ""
Warning: Neither 'server' nor 'client' jvm.dll was found at JRE_HOME.
Using JVM: "auto"
The service 'Confluence170316184538' has been installed.


When I try to start the service it immediately shuts down again, there are no new entries in the atlassian-confluence.log. The Windows event log shows an error 7024, source Service Control Manager, that error includes "Incorrect function".


I'd appreciate every help, I'm currently stuck in that state. Fortunately I cloned the VM where Confluence is installed so the production environment isn't affected, but I'm at a loss why the service doesn't even start anymore.

1 answer

1 accepted

0 votes
Answer accepted
JP _AC Bielefeld Leader_
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.
March 27, 2019

My first guess: The JDBC driver is not your first problem.

Start the Tomcat Configurator & make sure all the Java properties are set like on your old server (tomcat9w.exe //ES//Confluence170316184538), but don't remove any new Java 9 settings.

https://confluence.atlassian.com/confkb/how-to-set-system-properties-for-confluence-running-as-a-service-on-windows-873858384.html

Check the tomcat logs first (catalina.out in C:\Program Files\Atlassian\Confluence\logs). I'm pretty sure the Tomcat server is not starting up, therefore no Confluence logging.

Best

JP

Deleted user March 28, 2019

Thanks for replying, after some fiddling around with all the settings I finally was able to get the current version running in the test environment. Just for reference, if someone else has the same problem, I did the following:


There was nothing in the tomcat logs, the last entries were from yesterday (March 27th) at 9:59h, after that I reinstalled the service for the first time.


The link you provided about setting the system properties for Confluence running as a service was the key, in the new service the checkbox for "Use default" was set so tomcat tried to use C:\Program Files (x86)\Java\jre1.8.0_191\bin\client\jvm.dll instead of C:\Program Files\Atlassian\Confluence\jre\bin\server\jvm.dll. After I deactivated the checkbox for "Use default" and changed that line for the Java Virtual Machine the service started up.


After that there was another problem: With the old SQL driver I was able to access the website via http://localhost:8090 (I planned on changing the port later, first I wanted to go with the default port so I didn't have to debug yet another change), with the new driver the website didn't load, but there was no error as well, the IE just stayed white and the tab stated "waiting for localhost". I waited for 15 minutes, with the old SQL driver it used to be about 30 seconds after the restart of the service.

It turned out I inserted a wrong "hibernate.connection.url" (remember, I inserted jdbc:sqlserver://localhost;instanceName=CONFLUENCE;databaseName=confluence), I'm coming to that later. The old connection URL was jdbc:jtds:sqlserver://localhost:1433/confluence;instance=confluence.

After about 20 minutes of waiting the atlassian-confluence.log showed errors that the database connection failed. I followed this article, downloaded the testdatabase.jsp, put it in the <confluence-install>\confluence directory, renamed the web.xml to disable redirection and restarted the service. The check utility showed up, when I inserted the URL jdbc:sqlserver://localhost;instanceName=CONFLUENCE;databaseName=confluence there was an error connecting to the database, but with the following settings both driver and opening a connection to the database showed "ok":

Driver Class Name: com.microsoft.sqlserver.jdbc.SQLServerDriver
JDBC URL: jdbc:sqlserver://localhost\confluence;databaseName=confluence
DB username: <as per confluence.cfg.xml>
DB password: <as per confluence.cfg.xml>

After inserting the correct JDBC URL in the confluence.cfg.xml and doing all the stuff for reinstalling the service the login page showed up and I was able to login.

 

Thanks for the input, I didn't find the article you linked, I think I was too locked on to the database connection.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events