Restore from backup fails due to "Timeout exceeded waiting for service - com.atlassian.activeobjects.spi.Backup"
Problem
Restoring a Fisheye/Crucible backup using the command line fails and the following is written in stdout
:
ERROR: problem running command
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:101)
at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:44)
Caused by: com.atlassian.applinks.host.OsgiServiceProxyFactory$ServiceTimeoutExceeded: Timeout exceeded waiting for service - com.atlassian.activeobjects.spi.Backup
at com.atlassian.applinks.host.OsgiServiceProxyFactory$DynamicServiceInvocationHandler.invoke(OsgiServiceProxyFactory.java:106)
at com.sun.proxy.$Proxy27.restore(Unknown Source)
at com.atlassian.crucible.migration.item.ActiveObjectsBackup$ActiveObjectsRestorer.restore(ActiveObjectsBackup.java:122)
at com.cenqua.fisheye.ctl.Restore.run(Restore.java:197)
at com.cenqua.fisheye.ctl.Restore.main(Restore.java:273)
... 6 more
Diagnosis
Environment
- Reproducible when restoring to Oracle 11g and to HSQLDB. This was not tested with other database types.
Diagnostic Steps
- The backup file, regardless of having been created manually or via scheduled backup, includes the
ActiveObjects
option among other options. - The Java option
--Datlassian.plugins.enable.wait=300
cannot be used in the restore command.
Cause
The command line fails to restore the Active Objects due to an unknown reason thus far.
Resolution
Active Objects are database tables used by plugins in order to persist data (most likely plugin configuration data), being them bundled or user installed plugins.
In the database schema, the Active Objects tables have a common naming prefix, starting with AO_
.
For the restore command to work, the Active Objects should not be restored along with the other items backed up, and any plugin that persists data in the Active Objects tables will likely need to be reconfigured.
By default, the restore command will restore all items included in the backup if no specific item is specified along with the command.
Considering the restore command line options mentioned in Backing up and restoring Fisheye data:
Backup options in the web interface | Switch |
---|---|
ActiveObjects | --ao |
Repository and application caches | --cache |
Plugins and their configuration data | --plugins |
SQL database | --sql |
Web Templates | --templates |
Uploaded files and local copies of files under review | --uploads |
The restore command line should include all options backed up except ActiveObjects, so all switches except --ao
should be specified along with the restore command line.
Examples:
If the backup includes all options mentioned above, the restore command line should be like this (excluding only
--ao
):fisheyectl.sh restore --f /path/to/backup_file.zip [OPTIONS] --cache --plugins --sql --templates --uploads
If the backup includes ActiveObjects, SQL database and Web Templates, the restore command line should look like this:
fisheyectl.sh restore --f /path/to/backup_file.zip [OPTIONS] --sql --templates
- And so on. The switches that must be specified along with the restore command line depend on what is included in the backup.
In the examples given above, [OPTIONS]
is a placeholder for any other restore switches you may need to specify, such as the ones pertinent to database settings if you want to restore into a different database.