Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,297,453
Community Members
 
Community Events
165
Community Groups

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

 

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

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

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

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.

Hello, can you provide the URL?

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

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?

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

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

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?

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.

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

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

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

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

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

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?

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

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

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

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.

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
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

39 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you