Hi,
We had a hard disk failure (boot partition crashed, drive only accessible via USB docker) and unfortunately we didn’t do any backups and can’t follow the standard backup + restore JIRA procedures. Below steps were performed to restore JIRA on a brand new drive:
1. Install JIRA 6.2.2, MySQL 5.6.43 on RHEL 6.5, exact versions as old drive.
2. Copy below folders (and all subfolders) from old drive to new drive:
/var/lib/mysql (we used default MySQL folder)
/var/atlassian
/opt/atlassian
3. JIRA table cwd_application.ibd was corrupted and preventing mysql to startup properly. The table is therefore manually re-created with empty content.
4. /opt/atlassian/jira/logs/catalina.out has below errors, while JIRA seemed to startup ok by showing the "...access JIRA through your web browser" line.
2019-03-14 17:28:00,469 localhost-startStop-1 ERROR [core.entity.jdbc.DatabaseUtil] WARNING: Column "DEC_PROP_1" of table "JQUARTZ_SIMPROP_TRIGGERS" of entity "JQRTZSimplePropTriggers" is of type "DECIMAL(13,4)" in the database, but is defined as type "NUMERIC(13,4)" in the entity definition.
2019-03-14 17:28:00,470 localhost-startStop-1 ERROR [core.entity.jdbc.DatabaseUtil] WARNING: Column "DEC_PROP_2" of table "JQUARTZ_SIMPROP_TRIGGERS" of entity "JQRTZSimplePropTriggers" is of type "DECIMAL(13,4)" in the database, but is defined as type "NUMERIC(13,4)" in the entity definition.
2019-03-14 17:28:49,819 localhost-startStop-1 ERROR [atlassian.jira.startup.JiraStartupLogger] Cannnot obtain JIRA system information
2019-03-14 17:28:56,651 UpmScheduler:thread-1 WARN anonymous [atlassian.upm.pac.PacClientImpl] Error when querying application info from MPAC: com.atlassian.util.concurrent.LazyReference$InitializationException: com.atlassian.cache.CacheException: com.atlassian.cache.CacheException: java.lang.IllegalArgumentException: No enum constant com.atlassian.crowd.model.application.ApplicationType.jira
2019-03-14 17:28:56,854 UpmScheduler:thread-1 ERROR anonymous [atlassian.upm.schedule.AbstractUpmScheduledJob] Error executing job 'IncompatiblePluginsCheckPluginJob'
2019-03-14 17:31:57,571 QuartzScheduler_Worker-3 ERROR ServiceRunner IncompatiblePluginsCheckPluginJob-job [atlassian.upm.schedule.AbstractUpmScheduledJob] Error executing job 'IncompatiblePluginsCheckPluginJob'
2019-03-14 17:32:58,091 QuartzScheduler_Worker-3 ERROR ServiceRunner IncompatiblePluginsCheckPluginJob-job [atlassian.upm.schedule.AbstractUpmScheduledJob] Error executing job 'IncompatiblePluginsCheckPluginJob'
at com.atlassian.plugin.manager.DefaultPluginManager.broadcastIgnoreError(DefaultPluginManager.java:1772)
2019-03-14 17:34:17,782 localhost-startStop-1 ERROR [core.entity.jdbc.DatabaseUtil] WARNING: Column "DEC_PROP_1" of table "JQUARTZ_SIMPROP_TRIGGERS" of entity "JQRTZSimplePropTriggers" is of type "DECIMAL(13,4)" in the database, but is defined as type "NUMERIC(13,4)" in the entity definition.
2019-03-14 17:34:17,783 localhost-startStop-1 ERROR [core.entity.jdbc.DatabaseUtil] WARNING: Column "DEC_PROP_2" of table "JQUARTZ_SIMPROP_TRIGGERS" of entity "JQRTZSimplePropTriggers" is of type "DECIMAL(13,4)" in the database, but is defined as type "NUMERIC(13,4)" in the entity definition.
jira.projectkey.warning : admin.errors.must.specify.unique.project.key
2019-03-14 17:35:14,579 UpmScheduler:thread-1 WARN anonymous [atlassian.upm.pac.PacClientImpl] Error when querying application info from MPAC: com.atlassian.marketplace.client.MpacException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
*********************************************************************************
JIRA 6.2.2 build: 6258 started. You can now access JIRA through your web browser.
*********************************************************************************
5. Cannot login any users from web browser. /var/atlassian/application-data/jira/log/atlassian-jira-security.log has this error. Same error when trying different users.
2019-03-14 17:55:50,035 http-bio-8010-exec-3 anonymous 1075x19x1 7l0x6n 192.168.1.107 /rest/gadget/1.0/login login : 'xxxx' tried to login but they do not have USE permission or weren't found. Deleting remember me cookie
6. We tried resetting password (to ‘sphere’ https://confluence.atlassian.com/jira/retrieving-the-jira-administrator-192836.html?_ga=2.66771883.409780365.1552366733-2034864233.1552275531) for user xxxx with below SQL but still couldn’t login.
update cwd_user set credential='uQieO/1CGMUIXXftw3ynrsaYLShI+GTcPS4LdUGWbIusFvHPfUzD7CZvms6yMMvA8I7FViHVEqr6Mj4pCLKAFQ==' where user_name='xxxx';
7. Checked https://confluence.atlassian.com/jirakb/unable-to-login-jira-after-restoring-from-backup-780864242.html?_ga=2.263330569.409780365.1552366733-2034864233.1552275531 and we have only one row in cwb_directory:
mysql> select id,directory_name,directory_position from cwd_directory;
+----+-------------------------+--------------------+
| id | directory_name | directory_position |
+----+-------------------------+--------------------+
| 1 | JIRA Internal Directory | 0 |
+----+-------------------------+--------------------+
1 row in set (0.00 sec)
8. We checked couple cwd_*** tables in MySQL and they all seem intact with correct data, except that cwd_application had to be recreated as blank table.
Anything we missed? Thank you very much.
Bernard