Forums

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

After update "Database: JIRA couldn't connect to your database"

Wilhelm
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 11, 2023

Hi,

 

recently we expanded the size of our VM disk and Jira was running well. Now I updated to 8.20.22 and after startup it shows following screen:

Jira had problems starting up

This page is for Jira administrators. If you're seeing this page, your Jira administrator is probably working to restore the service.

 

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.)

 

-----

I´ve already looked into the logs and was looking for a solution but unfortunately nothing found. The only option I see is a rollback to the previous version - but I guess this would happen again after upgrading it.

Any ideas how to solve this?

 

---

Just in case some logs attached (don´t know if its the right file "atlassian-jira.log"):


2023-05-11 16:21:16,917+0200 http-nio-8080-exec-23 WARN anonymous 981x244x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.browser.differentiated.paths' from database. Using default
2023-05-11 16:21:16,917+0200 http-nio-8080-exec-23 WARN anonymous 981x244x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.browser.differentiated.clauses' from database. Using default
2023-05-11 16:21:18,913+0200 http-nio-8080-exec-24 WARN anonymous 981x245x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.excluded.content.type' from database. Using default
2023-05-11 16:21:18,913+0200 http-nio-8080-exec-24 WARN anonymous 981x245x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.included.content.disposition' from database. Using default
2023-05-11 16:21:18,913+0200 http-nio-8080-exec-24 WARN anonymous 981x245x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.browser.differentiated.paths' from database. Using default
2023-05-11 16:21:18,913+0200 http-nio-8080-exec-24 WARN anonymous 981x245x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.browser.differentiated.clauses' from database. Using default
2023-05-11 16:21:32,920+0200 http-nio-8080-exec-25 WARN anonymous 981x246x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.excluded.content.type' from database. Using default
2023-05-11 16:21:32,920+0200 http-nio-8080-exec-25 WARN anonymous 981x246x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.included.content.disposition' from database. Using default
2023-05-11 16:21:32,920+0200 http-nio-8080-exec-25 WARN anonymous 981x246x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.browser.differentiated.paths' from database. Using default
2023-05-11 16:21:32,920+0200 http-nio-8080-exec-25 WARN anonymous 981x246x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.browser.differentiated.clauses' from database. Using default
2023-05-11 16:21:34,919+0200 http-nio-8080-exec-1 WARN anonymous 981x247x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.excluded.content.type' from database. Using default
2023-05-11 16:21:34,919+0200 http-nio-8080-exec-1 WARN anonymous 981x247x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.included.content.disposition' from database. Using default
2023-05-11 16:21:34,919+0200 http-nio-8080-exec-1 WARN anonymous 981x247x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.browser.differentiated.paths' from database. Using default
2023-05-11 16:21:34,919+0200 http-nio-8080-exec-1 WARN anonymous 981x247x1 - 10.249.48.13 /secure/johnson/data [c.a.j.config.properties.ApplicationPropertiesStore] Exception getting property 'jira.security.csp.sandbox.browser.differentiated.clauses' from database. Using default

...

 

 

Thanks in advance!

2 answers

2 accepted

4 votes
Answer accepted
Marcos Sanchez
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 Champions.
June 20, 2018

Hi,

You can make a JQL in a groovy script that will return an array of all issues in a project and then loop that array and execute your code on that issue.

The code could be something like this:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.search.SearchProvider
import com.atlassian.jira.jql.parser.JqlQueryParser
import com.atlassian.jira.web.bean.PagerFilter

def jqlQueryParser = ComponentAccessor.getComponent(JqlQueryParser)
def searchProvider = ComponentAccessor.getComponent(SearchProvider)

def issueManager = ComponentAccessor.issueManager

def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()

def projectKey = "DEMO" //THE PROJECT KEY
def queryString = "project = ${projectKey}"

def query = jqlQueryParser.parseQuery(queryString)

def projectIssues = searchProvider.search(query, user, PagerFilter.getUnlimitedFilter()).issues.key

projectIssues.each{ issueKey ->
def issue = issueManager.getIssueByCurrentKey(issueKey)
//YOUR CODE
}

 

I recommend to you to run it on a test environment (if you have any) first.

 

 Hope it works for you.

 

Regards,
Marcos

Dan27
Contributor
June 20, 2018

Thanks!!!! Work! :)

Mike Rathwell
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 Champions.
August 15, 2019

@Marcos Sanchez I voted for your answer as well as accepting @Mark Markov 's answer. These gave me two parts of things that I... need.

Cheers!

2 votes
Answer accepted
Mark Markov
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 Champions.
June 20, 2018

Hello @Dan27

Or you can get issues via getIssueIdsForProject()

import com.atlassian.jira.component.ComponentAccessor

def project = ComponentAccessor.getProjectManager().getProjectByCurrentKey("DS")
def issuesIds = ComponentAccessor.getIssueManager().getIssueIdsForProject(project.id)

issuesIds.each {issueId ->
def issue = ComponentAccessor.getIssueManager().getIssueObject(issueId)
//YOUR CODE HERE
}

 

Hope it helps!

Dan27
Contributor
June 20, 2018

Thanks !! :)

Mike Rathwell
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 Champions.
August 15, 2019

@Mark Markov , this variant just solved for part of a thing I am developing and is a clean, elegant way of doing this.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events