upgrading plugin on confluence but getting errors
Asked by Kaushal Patel:

trying to upgrade a plugin on confluence pre live env but getting this error

An unexpected error occurred. Refer to the logs for more information.

this error in the logs

2017-09-14 17:45:05,701 INFO \[UpmAsynchronousTaskManager:thread-2\] \[atlassian.plugin.manager.DefaultPluginManager\] updatePlugin Updating plugin 'com.atlassian.confluence.extra.team-calendars' from version '5.3.16' to version '5.3.19'  
2017-09-14 17:45:05,702 INFO \[UpmAsynchronousTaskManager:thread-2\] \[atlassian.plugin.manager.DefaultPluginManager\] broadcastPluginDisabling Disabling com.atlassian.confluence.extra.team-calendars  
2017-09-14 17:45:28,111 WARN \[http-nio-8090-exec-4\] \[atlassian.applinks.core.DefaultApplicationLinkService\] retrieveApplicationLink Couldn't find type id for application link with id 5c89fdb3-5d8f-3ea6-b6ee-e074df18dfc4. Link is corrupted  
-- traceId: fed54f4465ed2b6b  
2017-09-14 17:45:28,118 WARN \[http-nio-8090-exec-4\] \[atlassian.applinks.core.DefaultApplicationLinkService\] retrieveApplicationLink Couldn't find type id for application link with id 363053b8-0756-396e-a199-3db3272806b9. Link is corrupted  
-- traceId: fed54f4465ed2b6b  
2017-09-14 17:45:29,471 WARN \[UpmScheduler:thread-4\] \[atlassian.upm.pac.PacClientImpl\] getUpdates Update check request may take longer because of the number of add-ons  
-- url: /rest/plugins/1.0/ \| referer: <http://confluence-prelive-build.dave.net-a-porter.com/plugins/servlet/upm> \| traceId: 5b7e924c40b1d774 \| userName: k.patel


Answers:
author: Shannon S
body: Hi Kaushal,

I am thinking since you're on a staging environment, it may be that you restored it from a backup of your production environment, causing the applinks to become corrupt.

Can you have a look at this following article and make sure to have a look at your applinks:

[Applinks between JIRA and Confluence can't be created due to obsolete applinks IDs in Confluence database](https://confluence.atlassian.com/jirakb/applinks-between-jira-and-confluence-can-t-be-created-due-to-obsolete-applinks-ids-in-confluence-database-878893588.html)

Go down to the **Cause** section for how to test this in Confluence. Let us know if you have any trouble or questions.

Kind Regards,  
Shannon

comments: author: Kaushal Patel
body: hi i did the one where there wasn't any app links and deleted one record but now when i install a plugin i get the below error

the funny thing is when i restart the application some plugin are updated but the upm one doesn't

017-09-15 10:58:51,156 INFO \[Caesium-1-3\] \[atlassian.crowd.directory.DbCachingRemoteChangeOperations\] removeUserMembershipsForGroup removed \[ 1 \] user members from \[ SSO_POM_Buyer \] in \[ 10ms \]  
2017-09-15 10:58:52,272 INFO \[UpmAsynchronousTaskManager:thread-2\] \[atlassian.plugin.manager.DefaultPluginManager\] updatePlugin Updating plugin 'com.atlassian.confluence.plugins.confluence-healthcheck-plugin' from version '2.1.7' to version '2.4.1'  
2017-09-15 10:58:52,275 INFO \[UpmAsynchronousTaskManager:thread-2\] \[atlassian.plugin.manager.DefaultPluginManager\] broadcastPluginDisabling Disabling com.atlassian.confluence.plugins.confluence-healthcheck-plugin  
2017-09-15 10:58:52,683 INFO \[UpmAsynchronousTaskManager:thread-2\] \[atlassian.plugin.manager.DefaultPluginManager\] disablePlugins Found dependent enabled plugins for plugins '\[com.atlassian.support.healthcheck.support-healthcheck-plugin\]': \[com.atlassian.support.stp(OPTIONAL)\]. Disabling...  
2017-09-15 10:58:52,683 INFO \[UpmAsynchronousTaskManager:thread-2\] \[atlassian.plugin.manager.DefaultPluginManager\] broadcastPluginDisabling Disabling com.atlassian.support.stp  
2017-09-15 10:58:52,943 INFO \[UpmAsynchronousTaskManager:thread-2\] \[atlassian.plugin.manager.DefaultPluginManager\] addPlugins Found mandatory, optional and dynamically dependent plugins to re-enable after plugin upgrade 'com.atlassian.support.healthcheck.support-healthcheck-plugin': \[com.atlassian.support.stp\]. Enabling...  
2017-09-15 10:58:52,945 INFO \[UpmAsynchronousTaskManager:thread-2\] \[atlassian.plugin.manager.DefaultPluginManager\] updatePlugin Updating plugin 'com.atlassian.support.healthcheck.support-healthcheck-plugin' from version '2.0.14' to version '2.3.0'  
2017-09-15 10:58:52,946 INFO \[UpmAsynchronousTaskManager:thread-2\] \[atlassian.plugin.manager.DefaultPluginManager\] broadcastPluginDisabling Disabling com.atlassian.support.healthcheck.support-healthcheck-plugin  
2017-09-15 10:58:53,202 INFO \[UpmAsynchronousTaskManager:thread-2\] \[atlassian.plugin.manager.DefaultPluginManager\] updatePlugin Updating plugin 'com.atlassian.support.stp' from version '3.9.12' to version '3.10.4'  
2017-09-15 10:58:56,159 INFO \[UpmAsynchronousTaskManager:thread-3\] \[atlassian.plugin.manager.DefaultPluginManager\] updatePlugin Updating plugin 'com.atlassian.confluence.plugins.confluence-healthcheck-plugin' from version '2.4.1' to version '2.4.1'  
2017-09-15 10:58:56,159 INFO \[UpmAsynchronousTaskManager:thread-3\] \[atlassian.plugin.manager.DefaultPluginManager\] broadcastPluginDisabling Disabling com.atlassian.confluence.plugins.confluence-healthcheck-plugin  
2017-09-15 10:58:59,052 ERROR \[AtlassianEvent::CustomizableThreadFactory-2\] \[atlassian.confluence.event.ConfluenceEventDispatcher\] lambda$getRunnable$1 There was an exception thrown trying to dispatch event \[com.atlassian.confluence.event.events.plugin.AsyncPluginInstallEvent\[source=com.atlassian.confluence.plugin.EventDispatchingPluginController@4e575f56\]\] from the invoker \[com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1@26f8ca61\]  
-- url: /rest/plugins/1.0/ \| referer: <http://confluence-prelive-build.dave.net-a-porter.com/plugins/servlet/upm> \| traceId: 5b5b6f38ce6f64e4 \| userName: k.patel  
java.lang.RuntimeException: Cannot getResourceAsStream(atlassian-plugin_en_GB.properties): This operation must occur before the plugin 'com.atlassian.confluence.plugins.confluence-healthcheck-plugin' is uninstalled  
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54)  
at com.atlassian.confluence.event.ConfluenceListenerHandlersConfiguration$TimingListenerHandler$1$1.invoke(ConfluenceListenerHandlersConfiguration.java:69)  
at com.atlassian.confluence.event.ConfluenceEventDispatcher$VCacheRequestContextRunnableFactory.lambda$null$0(ConfluenceEventDispatcher.java:76)  
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$doInRequestContext$0(VCacheRequestContextOperations.java:48)  
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:82)  
at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:72)  
at com.atlassian.confluence.vcache.VCacheRequestContextOperations.doInRequestContext(VCacheRequestContextOperations.java:47)  
at com.atlassian.confluence.event.ConfluenceEventDispatcher$VCacheRequestContextRunnableFactory.lambda$getRunnable$1(ConfluenceEventDispatcher.java:76)  
at com.atlassian.confluence.event.ConfluenceEventDispatcher.lambda$null$0(ConfluenceEventDispatcher.java:56)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: com.atlassian.plugin.IllegalPluginStateException: Cannot getResourceAsStream(atlassian-plugin_en_GB.properties): This operation must occur before the plugin 'com.atlassian.confluence.plugins.confluence-healthcheck-plugin' is uninstalled  
at com.atlassian.plugin.osgi.factory.OsgiPluginNotInstalledHelperBase.getResourceAsStream(OsgiPluginNotInstalledHelperBase.java:39)  
at com.atlassian.plugin.osgi.factory.OsgiPlugin.getResourceAsStream(OsgiPlugin.java:225)  
at com.atlassian.confluence.util.i18n.PluginI18NResource.getPropertyResourceAsStream(PluginI18NResource.java:20)  
at com.atlassian.confluence.util.i18n.AbstractI18NResource.getBundle(AbstractI18NResource.java:21)  
at com.atlassian.confluence.util.i18n.I18NResourceBundlesLoader.getResourceBundles(I18NResourceBundlesLoader.java:42)  
at com.atlassian.confluence.util.i18n.DefaultI18NBeanFactory.loadPluginI18NResources(DefaultI18NBeanFactory.java:154)  
at com.atlassian.confluence.util.i18n.DefaultI18NBeanFactory.buildBundles(DefaultI18NBeanFactory.java:91)  
at com.atlassian.confluence.util.i18n.DefaultI18NBeanFactory.getI18NBean(DefaultI18NBeanFactory.java:286)  
at com.atlassian.confluence.util.i18n.CachingI18NBeanFactory.lambda$getI18NBean$0(CachingI18NBeanFactory.java:69)  
at com.atlassian.confluence.impl.vcache.UnblockingRemovalJvmCache.lambda$null$1(UnblockingRemovalJvmCache.java:57)  
at java.util.Optional.orElseGet(Optional.java:267)  
at com.atlassian.confluence.impl.vcache.UnblockingRemovalJvmCache.lambda$get$2(UnblockingRemovalJvmCache.java:54)  
at java.util.Optional.orElseGet(Optional.java:267)  
at com.atlassian.confluence.impl.vcache.UnblockingRemovalJvmCache.get(UnblockingRemovalJvmCache.java:50)  
at com.atlassian.confluence.util.i18n.CachingI18NBeanFactory.getI18NBean(CachingI18NBeanFactory.java:66)  
at com.atlassian.confluence.impl.audit.AuditRecordEntityFactory.fromAuditRecordWithI18n(AuditRecordEntityFactory.java:48)  
at com.atlassian.confluence.impl.audit.listener.AbstractAuditListener.lambda$save$0(AbstractAuditListener.java:76)  
at com.atlassian.fugue.Option.map(Option.java:272)  
at com.atlassian.confluence.impl.audit.listener.AbstractAuditListener.save(AbstractAuditListener.java:75)  
at com.atlassian.confluence.impl.audit.listener.PluginAuditListener.pluginInstallEvent(PluginAuditListener.java:53)  
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:497)  
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36)  
... 11 more  
2017-09-15 10:59:04,731 INFO \[Caesium-1-3\] \[atlassian.crowd.directory.DbCachingRemoteChangeOperations\] removeUserMembershipsForGroup removed \[ 1 \] user members from \[ gs_OPE_3rd_Party_Customer_Care_BerlinTirana \] in \[ 4328ms \]  
2017-09-15 10:59:05,578 WARN \[UpmAsynchronousTaskManager:thread-2\] \[upm.core.install.DefaultPluginInstallationService\] execute Plugin installation failed: This operation must occur before the plugin 'com.atlassian.confluence.plugins.confluence-healthcheck-plugin' is uninstalled  
-- url: /rest/plugins/1.0/ \| referer: <http://confluence-prelive-build.dave.net-a-porter.com/plugins/servlet/upm> \| traceId: 5b5b6f38ce6f64e4 \| userName: k.patel  
2017-09-15 10:59:05,578 WARN \[UpmAsynchronousTaskManager:thread-2\] \[upm.core.install.DefaultPluginInstallationService\] execute com.atlassian.plugin.IllegalPluginStateException: This operation must occur before the plugin 'com.atlassian.confluence.plugins.confluence-healthcheck-plugin' is uninstalled  
-- url: /rest/plugins/1.0/ \| referer: <http://confluence-prelive-build.dave.net-a-porter.com/plugins/servlet/upm> \| traceId: 5b5b6f38ce6f64e4 \| userName: k.patel  
com.atlassian.plugin.IllegalPluginStateException: This operation must occur before the plugin 'com.atlassian.confluence.plugins.confluence-healthcheck-plugin' is uninstalled


author: Shannon S
body: Can you let me know your Confluence version and your UPM version?

Thank you!

Kind Regards,  
Shannon


author: Kaushal Patel
body: version of confluence is 5.10.3 and upm version is 2.21.4


author: Shannon S
body: Thanks Kaushal,

What about the Confluence Instance Health plugin? Were you trying to uninstall it? Can you check the status of that? Let me know if it's installed, enabled, and what version of it you have.

Kind Regards,  
Shannon


author: Kaushal Patel
body: that has shown as installed after a restart and the version is 2.4.1


author: Shannon S
body: Thank you!

Can you please try clearing the [Plugin Cache](https://confluence.atlassian.com/confkb/how-to-clear-confluence-plugins-cache-297664846.html) and after restart let me know if the errors have changed?

Kind Regards,  
Shannon


author: Kaushal Patel
body: i am getting this error now

017-09-15 12:04:17,816 INFO \[UpmAsynchronousTaskManager:thread-3\] \[atlassian.plugin.manager.DefaultPluginManager\] updatePlugin Updating plugin 'com.atlassian.upm.atlassian-universal-plugin-manager-selfupdate-plugin' from version '2.21.4' to version '2.21.4'  
2017-09-15 12:04:17,819 INFO \[UpmAsynchronousTaskManager:thread-3\] \[atlassian.plugin.manager.DefaultPluginManager\] broadcastPluginDisabling Disabling com.atlassian.upm.atlassian-universal-plugin-manager-selfupdate-plugin  
2017-09-15 12:04:24,823 INFO \[Caesium-1-4\] \[atlassian.crowd.directory.DbCachingRemoteChangeOperations\] removeUserMembershipsForGroup removed \[ 1 \] user members from \[ Studio Interns uk \] in \[ 1676ms \]  
2017-09-15 12:04:28,741 INFO \[Caesium-1-4\] \[atlassian.crowd.directory.DbCachingRemoteChangeOperations\] removeUserMembershipsForGroup removed \[ 1 \] user members from \[ gs_pfN_Customer_Care \] in \[ 6ms \]  
2017-09-15 12:04:29,387 INFO \[Caesium-1-4\] \[atlassian.crowd.directory.DbCachingRemoteChangeOperations\] removeUserMembershipsForGroup removed \[ 1 \] user members from \[ profile_CustomerCareAdvisor \] in \[ 6ms \]  
2017-09-15 12:04:29,510 INFO \[Caesium-1-4\] \[atlassian.crowd.directory.DbCachingRemoteChangeOperations\] removeUserMembershipsForGroup removed \[ 1 \] user members from \[ 3rd Party Customer Care Team - Berlin and Tirana \] in \[ 6ms \]  
2017-09-15 12:04:30,094 INFO \[Caesium-1-4\] \[directory.ldap.cache.AbstractCacheRefresher\] logIfNecessary migrated memberships for group - (3793/5498 - 69.0%) 120048ms elapsed


author: Shannon S
body: Hi Kaushal,

Those logs look like they're progressing through something, with no errors. Can you let me know if you see anything now with an ERROR heading rather than INFO? That might give us more details.

Thank you!

Kind Regards,  
Shannon


author: Kaushal Patel
body: hi not getting anything in the logs now

just this on the ui

An error was encountered while updating the UPM. See the logs for more details.

in the logs all i have is

2017-09-15 12:25:11,145 INFO \[UpmAsynchronousTaskManager:thread-1\] \[atlassian.plugin.manager.DefaultPluginManager\] updatePlugin Updating plugin 'com.atlassian.upm.atlassian-universal-plugin-manager-selfupdate-plugin' from version '2.21.4' to version '2.21.4'  
2017-09-15 12:25:11,145 INFO \[UpmAsynchronousTaskManager:thread-1\] \[atlassian.plugin.manager.DefaultPluginManager\] broadcastPluginDisabling Disabling com.atlassian.upm.atlassian-universal-plugin-manager-selfupdate-plugin


author: Shannon S
body: Kaushal,

Thank you! Can you please try [upgrading UPM Manually](https://confluence.atlassian.com/upm/updating-the-universal-plugin-manager-273875702.html?_ga=2.241657026.1968809103.1505222838-1253941999.1505222838#UpdatingtheUniversalPluginManager-UpdatingtheUPMsoftware)?

Kind Regards,  
Shannon


author: Kaushal Patel
body: that worked thanks


author: Shannon S
body: Fantastic! Thank you for confirming :)

Take care and have a pleasant weekend, Kaushal!

Kind Regards,  
Shannon