jira core8.9升级8.22,mysql5.6升级到mysql8.0,升级后web网页报错jira无法连接数据库

周慧华 April 20, 2022

 

Database: JIRA couldn't connect to your database

JIRA failed to establish a connection to your database.
This could be because:

 

  • Your database isn't running
  • The configuration of your dbconfig.xml file is incorrect (user, password, or database URL etc.)
  • There is a network issue between JIRA and your database (e.g. firewall, database doesn't allow remote access etc.)

 

1 answer

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 21, 2022

Hi @周慧华 ,

please check logs in order to provide more information about your issue. Take a look to <Jira home>/logs/atlassian-Jira.log - that should provide us a detailed reason for the disconnect.

Btw, please take a look here in order to review your current configuration https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-mysql-8-0-1018775461.html

Hope this helps,

Fabio

周慧华 April 21, 2022

Hello, can JIRA core be directly upgraded from 8.9 to 8.22?

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 21, 2022

Hello @周慧华 ,

please perform the following steps:

  • For a more tailored upgrade, go to Jira administration > Applications > Plan your upgrade. We’ll recommend a version to upgrade to, run pre-upgrade checks, and provide you with a custom upgrade guide with step-by-step instructions.
周慧华 April 22, 2022

Hello, can you provide the URL?

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2022

I don't know your own JIRA URL. You should able to perform the above steps.

周慧华 April 22, 2022

OK, I see. You said JIRA's address. The upgrade method we use is to download the bin package and install it. Because JIRA is installed on a Linux server. Do you have JIRA version upgrade instructions on JIRA official website?

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2022
周慧华 April 22, 2022

Hello, I upgraded it again today, from 8.9 to 8.22. After the upgrade, the web side shows that JIRA cannot connect to the database. What is the reason? I didn't operate the database on the way. The database uses H2 database

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2022

H2 Database is not for production instances. BTW, please verify that users has grants to access jira folders

周慧华 April 22, 2022

Hello, I understand that H2 is not suitable for production environment. Before the upgrade, the user can log in normally. I made a backup. After the upgrade, I can't connect to the database. From which point can I check whether H2 database is running normally?

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2022

H2 database is a file based DB so it should be ready for connection. As said before please check jira home and inst folder grants for the user that starts JIRA at server side.

周慧华 April 22, 2022

The user who starts JIRA is the root user with the highest authority. Which directory is the Inst folder in?

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2022

@周慧华 it depends where you placed that folders. 

周慧华 April 22, 2022

Hello, are there any log files that can analyze the reasons for the failure of database connection?

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 22, 2022

it's placed under jira home folder/los/atlassian-jira.log or under jira inst folder/log/catalina.out

周慧华 April 23, 2022

Java null pointer error reported in /logs/atlassian-jira.log

周慧华 April 23, 2022

Is it feasible to upgrade JIRA core version directly from 8.9 to 8.22? Do you need to upgrade to an intermediate version like 8.15 first?

周慧华 April 23, 2022

It's atlassian-jira.log the latest log.

Exception getting property 'jira.security.csp.sandbox.browser.differentiated.clauses' from database.

周慧华 April 23, 2022

Now the page reports an error and the database cannot be connected, but the H2 database is used. How to verify the connection status?

周慧华 April 23, 2022

Here's catalina.out the latest log.

24-Apr-2022 09:30:00.738 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 22605 ms
24-Apr-2022 09:30:00.761 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
24-Apr-2022 09:30:00.771 SEVERE [main] org.apache.catalina.core.StandardService.startInternal Failed to start connector [Connector[HTTP/1.1-8080]]
org.apache.catalina.LifecycleException: Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1101)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:763)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:688)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
Caused by: java.net.BindException: Address already in use
at java.base/sun.nio.ch.Net.bind0(Native Method)
at java.base/sun.nio.ch.Net.bind(Unknown Source)
at java.base/sun.nio.ch.Net.bind(Unknown Source)
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at java.base/sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:221)
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1220)
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:609)
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1099)
... 12 more
24-Apr-2022 09:30:00.772 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 22711 ms
24-Apr-2022 09:30:00.773 SEVERE [main] org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8005]:
java.net.BindException: Address already in use (Bind failed)
at java.base/java.net.PlainSocketImpl.socketBind(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.bind(Unknown Source)
at java.base/java.net.ServerSocket.bind(Unknown Source)
at java.base/java.net.ServerSocket.<init>(Unknown Source)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:414)
at org.apache.catalina.startup.Catalina.await(Catalina.java:776)
at org.apache.catalina.startup.Catalina.start(Catalina.java:722)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
24-Apr-2022 09:30:00.774 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
24-Apr-2022 09:30:00.774 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
2022-04-24 09:30:01,431+0800 JIRA-Bootstrap INFO [c.a.j.config.database.SystemDatabaseConfigurationLoader] Reading database configuration from /var/atlassian/application-data/jira/dbconfig.xml
2022-04-24 09:30:01,470+0800 JIRA-Bootstrap INFO [c.a.j.config.database.SystemDatabaseConfigurationLoader] Reading database configuration from /var/atlassian/application-data/jira/dbconfig.xml
2022-04-24 09:30:01,538+0800 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigHandler] Trying to get encrypted password from xml and decrypt it
2022-04-24 09:30:01,551+0800 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigHandler] Trying to get encrypted password from xml and decrypt it
2022-04-24 09:30:01,553+0800 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigHandler] Database password decryption not performed.
2022-04-24 09:30:01,563+0800 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigHandler] Database password decryption not performed.
2022-04-24 09:30:01,942+0800 JIRA-Bootstrap INFO [c.a.jira.startup.JiraStartupLogger] Running Jira startup checks.
2022-04-24 09:30:01,942+0800 JIRA-Bootstrap FATAL [c.a.jira.startup.JiraStartupLogger] Startup check failed. Jira will be locked.
2022-04-24 09:30:02,252+0800 JIRA-Bootstrap INFO [c.a.jira.startup.LauncherContextListener] Startup is complete. Jira is ready to serve.
2022-04-24 09:30:02,255+0800 JIRA-Bootstrap INFO [c.a.jira.startup.LauncherContextListener] Memory Usage:
---------------------------------------------------------------------------------
Heap memory : Used: 210 MiB. Committed: 384 MiB. Max: 2048 MiB
Non-heap memory : Used: 48 MiB. Committed: 107 MiB. Max: 1536 MiB
---------------------------------------------------------------------------------
TOTAL : Used: 258 MiB. Committed: 491 MiB. Max: 3584 MiB
---------------------------------------------------------------------------------
2022-04-24 09:30:02,257+0800 localhost-startStop-1 INFO [c.a.jira.startup.DefaultJiraLauncher] Stopping launchers
24-Apr-2022 09:30:02.364 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
24-Apr-2022 09:30:02.442 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
24-Apr-2022 09:30:02.445 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
2022-04-24 09:30:05,297+0800 JIRA-Bootstrap INFO [c.a.jira.startup.JiraStartupLogger] Running Jira startup checks.
2022-04-24 09:30:05,298+0800 JIRA-Bootstrap FATAL [c.a.jira.startup.JiraStartupLogger] Startup check failed. Jira will be locked.
2022-04-24 09:30:05,379+0800 JIRA-Bootstrap INFO [c.a.jira.startup.LauncherContextListener] Startup is complete. Jira is ready to serve.

周慧华 April 23, 2022

Here's catalina.out the latest log.

24-Apr-2022 09:30:00.738 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 22605 ms
24-Apr-2022 09:30:00.761 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
24-Apr-2022 09:30:00.771 SEVERE [main] org.apache.catalina.core.StandardService.startInternal Failed to start connector [Connector[HTTP/1.1-8080]]
org.apache.catalina.LifecycleException: Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1101)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:439)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:763)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:688)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
Caused by: java.net.BindException: Address already in use
at java.base/sun.nio.ch.Net.bind0(Native Method)
at java.base/sun.nio.ch.Net.bind(Unknown Source)
at java.base/sun.nio.ch.Net.bind(Unknown Source)
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at java.base/sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:221)
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1220)
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:609)
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1099)
... 12 more
24-Apr-2022 09:30:00.772 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 22711 ms
24-Apr-2022 09:30:00.773 SEVERE [main] org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8005]:
java.net.BindException: Address already in use (Bind failed)
at java.base/java.net.PlainSocketImpl.socketBind(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.bind(Unknown Source)
at java.base/java.net.ServerSocket.bind(Unknown Source)
at java.base/java.net.ServerSocket.<init>(Unknown Source)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:414)
at org.apache.catalina.startup.Catalina.await(Catalina.java:776)
at org.apache.catalina.startup.Catalina.start(Catalina.java:722)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
24-Apr-2022 09:30:00.774 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
24-Apr-2022 09:30:00.774 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
2022-04-24 09:30:01,431+0800 JIRA-Bootstrap INFO [c.a.j.config.database.SystemDatabaseConfigurationLoader] Reading database configuration from /var/atlassian/application-data/jira/dbconfig.xml
2022-04-24 09:30:01,470+0800 JIRA-Bootstrap INFO [c.a.j.config.database.SystemDatabaseConfigurationLoader] Reading database configuration from /var/atlassian/application-data/jira/dbconfig.xml
2022-04-24 09:30:01,538+0800 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigHandler] Trying to get encrypted password from xml and decrypt it
2022-04-24 09:30:01,551+0800 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigHandler] Trying to get encrypted password from xml and decrypt it
2022-04-24 09:30:01,553+0800 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigHandler] Database password decryption not performed.
2022-04-24 09:30:01,563+0800 JIRA-Bootstrap INFO [c.a.j.config.database.DatabaseConfigHandler] Database password decryption not performed.
2022-04-24 09:30:01,942+0800 JIRA-Bootstrap INFO [c.a.jira.startup.JiraStartupLogger] Running Jira startup checks.
2022-04-24 09:30:01,942+0800 JIRA-Bootstrap FATAL [c.a.jira.startup.JiraStartupLogger] Startup check failed. Jira will be locked.
2022-04-24 09:30:02,252+0800 JIRA-Bootstrap INFO [c.a.jira.startup.LauncherContextListener] Startup is complete. Jira is ready to serve.
2022-04-24 09:30:02,255+0800 JIRA-Bootstrap INFO [c.a.jira.startup.LauncherContextListener] Memory Usage:
---------------------------------------------------------------------------------
Heap memory : Used: 210 MiB. Committed: 384 MiB. Max: 2048 MiB
Non-heap memory : Used: 48 MiB. Committed: 107 MiB. Max: 1536 MiB
---------------------------------------------------------------------------------
TOTAL : Used: 258 MiB. Committed: 491 MiB. Max: 3584 MiB
---------------------------------------------------------------------------------
2022-04-24 09:30:02,257+0800 localhost-startStop-1 INFO [c.a.jira.startup.DefaultJiraLauncher] Stopping launchers
24-Apr-2022 09:30:02.364 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [org.h2.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
24-Apr-2022 09:30:02.442 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
24-Apr-2022 09:30:02.445 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
2022-04-24 09:30:05,297+0800 JIRA-Bootstrap INFO [c.a.jira.startup.JiraStartupLogger] Running Jira startup checks.
2022-04-24 09:30:05,298+0800 JIRA-Bootstrap FATAL [c.a.jira.startup.JiraStartupLogger] Startup check failed. Jira will be locked.
2022-04-24 09:30:05,379+0800 JIRA-Bootstrap INFO [c.a.jira.startup.LauncherContextListener] Startup is complete. Jira is ready to serve.
2022-04-24 09:30:05,381+0800 JIRA-Bootstrap INFO [c.a.jira.startup.LauncherContextListener] Memory Usage:
---------------------------------------------------------------------------------
Heap memory : Used: 52 MiB. Committed: 384 MiB. Max: 2048 MiB
Non-heap memory : Used: 52 MiB. Committed: 110 MiB. Max: 1536 MiB
---------------------------------------------------------------------------------
TOTAL : Used: 104 MiB. Committed: 494 MiB. Max: 3584 MiB
---------------------------------------------------------------------------------

Suggest an answer

Log in or Sign up to answer