1. 程式人生 > >Atlassian JIRA Change IP

Atlassian JIRA Change IP

pre PE query cloud onf written rac start creat

Oracle Linux 6.8

Atalssian JIRA 7

原來IP: 192.168.10.200

改新IP: 192.168.12.200

重新跑應用報錯,如下所示:

技術分享圖片

官方提示應用連接不上DB,是指當前安裝應用系統時指定了固定DB的連接IP.

當時安裝應用時有指定DB IP.

技術分享圖片

https://confluence.atlassian.com/jirakb/startup-check-jira-database-connections-872262124.html

Startup check: JIRA database connections

This Knowledge Base article was written specifically for the Atlassian Server

platform. Due to the Restricted functions in Atlassian Cloud apps, the contents of this article cannot be applied to Atlassian Cloud applications.

During Installation, Upgrade or Startup, JIRA performs a number of checks. The Database Connection check verifies that JIRA can connect to a Database, as this is vital for JIRA to run.

Cause

The reasons for this check to fail are:

  • You don‘t have a database running
  • The configuration in your dbconfig.xml is incorrect
  • Username/Password for your database are incorrect
  • Your database user doesn‘t have the correct permissions to connect to the database
  • The database specified is not the JIRA database
  • You‘re trying to use an incorrect port
  • General network issues that prevent JIRA from connecting to your database include:
    • Postgres/Mysql localhost errors
    • Firewall errors
    • Network connection not available/offline

Impact

The JIRA instance needs a database in order to run. Without a database it can‘t read any previously created Issues or store newly created issues.

Resolution

Given that there‘s a number of reasons this cold be happening, there‘s a few things you may need to check to resolve this.

Network issue

Lets see if your network is up. Lets check if your database is reachable for your JIRA instance.

Ping your database server

Can you ping your Database server? Take the URL for your database that‘s in your dbconfig.xml and ping your database

改正DB IP

[root@atlassian ~]# find / -name ‘dbconfig.xml‘
/var/atlassian/application-data/jira/dbconfig.xml

[root@atlassian ~]# vi /var/atlassian/application-data/jira/dbconfig.xml
<?xml version="1.0" encoding="UTF-8"?>

<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>mysql</database-type>
<jdbc-datasource>
<url>jdbc:mysql://192.168.10.200:3306/jira?useUnicode=true&amp;characterEncoding=UTF8&amp;sessionVariables=default_storage_engine=InnoDB</url>

<url>jdbc:mysql://192.168.12.200:3306/jira?useUnicode=true&amp;characterEncoding=UTF8&amp;sessionVariables=default_storage_engine=InnoDB</url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<username>jirauser</username>
<password>jirauser</password>
<pool-min-size>20</pool-min-size>
<pool-max-size>20</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<validation-query>select 1</validation-query>
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>
<pool-max-idle>20</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
<pool-test-on-borrow>false</pool-test-on-borrow>
<pool-test-while-idle>true</pool-test-while-idle>
<validation-query-timeout>3</validation-query-timeout>
</jdbc-datasource>
</jira-database-config>

重啟JIRA

[root@atlassian ~]# service jira stop

[root@atlassian ~]# service jira stop

Atlassian JIRA Change IP