In a previous article (Tackling Confluence migration issues (Windows+MSSQL to Linux+MariaDB)) I wrote about some migration issues of an Atlassian Confluence installation. At the end of this mentioned migration a new test Confluence (a staging installation) was ready to be used.
Now that the test instance, let's call it confluence-test.example.com, was ready, we tried to create an application link between confluence-test.example.com and the production JIRA instance, jira.example.com. The application link was successfully created but then we wanted to clean it to have a clean test/staging setup between a confluence-test and a jira-test instance. The application link confluence-test and jira-prod was removed and then problems started. The production Confluence was not able to retrieve the issues information from JIRA anymore.
I realized that by creating confluence-test using the backup/restore function the original Confluence server.id from confluence-prod was used. When the application link confluence-test and jira-prod was created, it used the same confluence:id in JIRA's database. When this application link was deleted, it also deleted the OAuth exchange information of confluence-prod.
To solve this, the application link between confluence-prod and jira-prod should be recreated but the application link could not be deleted in jira-prod. The following error message appeared in the atlassian-jira log file:
2017-03-30 21:18:47,589 http-bio-8080-exec-24 ERROR sysadmin 1278x180x1 1h0gr1r 192.168.1.150 /rest/applinks/2.0/permission/reciprocate-application-delete/c7726e78-6f42-3f2b-9253-653cb5e44bf1 [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: java.lang.NullPointerException: consumer
com.atlassian.cache.CacheException: java.lang.NullPointerException: consumer
at com.atlassian.cache.memory.DelegatingCache$DelegatingLoadingCache.get(DelegatingCache.java:322)
at com.atlassian.jira.oauth.consumer.CachingConsumerTokenStore.get(CachingConsumerTokenStore.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy1738.get(Unknown Source)
at com.atlassian.applinks.core.auth.oauth.DefaultConsumerTokenStoreService.getConsumerToken(DefaultConsumerTokenStoreService.java:102)
at com.atlassian.applinks.core.auth.oauth.ThreeLeggedOAuthRequestFactoryImpl.retrieveConsumerToken(ThreeLeggedOAuthRequestFactoryImpl.java:89)
at com.atlassian.applinks.core.auth.oauth.ThreeLeggedOAuthRequestFactoryImpl.createRequest(ThreeLeggedOAuthRequestFactoryImpl.java:84)
at com.atlassian.applinks.core.auth.ApplicationLinkRequestFactoryFactoryImpl$AbsoluteURLRequestFactory.createRequest(ApplicationLinkRequestFactoryFactoryImpl.java:201)
at com.atlassian.applinks.core.rest.PermissionResource.checkPermissionFor(PermissionResource.java:241)
at com.atlassian.applinks.core.rest.PermissionResource.canDeleteReciprocalApplicationLink(PermissionResource.java:93) <+3>
at java.lang.reflect.Method.invoke(Unknown Source) <+19> (DispatchProviderHelper.java:234) (DispatchProviderHelper.java:100) (DefaultMethodInvocation.java:61) (ExpandInterceptor.java:38) (DefaultMethodInvocation.java:61) (DispatchProviderHelper.java:132) (DispatchProviderHelper.java:230) (ResourceJavaMethodDispatcher.java:75) (HttpMethodRule.java:288) (RightHandPathRule.java:147) (ResourceClassRule.java:108) (RightHandPathRule.java:147) (RootResourceClassesRule.java:84) (WebApplicationImpl.java:1469) (WebApplicationImpl.java:1400) (WebApplicationImpl.java:1349) (WebApplicationImpl.java:1339) (WebComponent.java:416) (ServletContainer.java:537)
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178) <+1> (ServletContainer.java:795)
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73) <+16> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70) (RestServletUtilsUpdaterFilter.java:26) (RestServletUtilsUpdaterFilter.java:40) (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70) (ContextFilter.java:25) (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
at com.atlassian.servicedesk.internal.web.RedirectExternalCustomerToPortalFilter.doFilter(RedirectExternalCustomerToPortalFilter.scala:18) <+4> (AbstractHttpFilter.java:31) (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
at com.atlassian.mywork.client.filter.ServingRequestsFilter.doFilter(ServingRequestsFilter.java:37) <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
at com.atlassian.plugins.cors.CorsFilter.doFilter(CorsFilter.java:65) <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFixupFilter.doFilter(PrettyUrlsSiteMeshFixupFilter.java:36) <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
at com.atlassian.prettyurls.filter.PrettyUrlsDispatcherFilter.doFilter(PrettyUrlsDispatcherFilter.java:60) <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFilter.doFilter(PrettyUrlsSiteMeshFilter.java:92) <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
at com.atlassian.prettyurls.filter.PrettyUrlsMatcherFilter.doFilter(PrettyUrlsMatcherFilter.java:56) <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:36) <+21> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (AccessLogFilter.java:107) (AccessLogFilter.java:91) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (XsrfTokenAdditionRequestFilter.java:54) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (PageBuilderFilter.java:90) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (CommittedResponseHtmlErrorRecoveryFilter.java:63) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:70)
at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61) <+22> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (SecurityFilter.java:239) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (TrustedApplicationsFilter.java:100) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (BaseLoginFilter.java:172) (JiraLoginFilter.java:70) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:70) (OAuthFilter.java:79) (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:40) <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61) <+9> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (AbstractJohnsonFilter.java:71) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208)
at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) <+10> (UrlRewriteFilter.java:394) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (GzipFilter.java:88) (GzipFilter.java:59) (JiraGzipFilter.java:56) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:70)
at com.atlassian.analytics.client.filter.JiraAnalyticsFilter.doFilter(JiraAnalyticsFilter.java:40)
at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32) <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61) <+40> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (ChainedFilterStepRunner.java:87) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (AbstractCachingFilter.java:33) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (AbstractEncodingFilter.java:41) (AbstractHttpFilter.java:31) (PathMatchingEncodingFilter.java:45) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (JiraStartupChecklistFilter.java:79) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (MultipartBoundaryCheckFilter.java:41) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (ChainedFilterStepRunner.java:87) (JiraFirstFilter.java:61) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (StandardWrapperValve.java:220) (StandardContextValve.java:122) (AuthenticatorBase.java:501) (StandardHostValve.java:171) (ErrorReportValve.java:103) (StandardEngineValve.java:116) (AccessLogValve.java:950) (CoyoteAdapter.java:408) (AbstractHttp11Processor.java:1070) (AbstractProtocol.java:611) (JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException: consumer
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
at com.atlassian.oauth.Token$TokenBuilder.consumer(Token.java:179)
at com.atlassian.jira.oauth.consumer.OfBizConsumerTokenStore.createTokenFromGV(OfBizConsumerTokenStore.java:169)
at com.atlassian.jira.oauth.consumer.OfBizConsumerTokenStore.get(OfBizConsumerTokenStore.java:73)
at com.atlassian.jira.oauth.consumer.CachingConsumerTokenStore$ConsumerTokenCacheLoader.load(CachingConsumerTokenStore.java:129)
at com.atlassian.cache.memory.MemoryCacheManager$3$1.load(MemoryCacheManager.java:137)
at com.atlassian.cache.memory.BlockingCacheLoader.load(BlockingCacheLoader.java:51)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3573)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
at com.google.common.cache.LocalCache.get(LocalCache.java:3970)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4834)
at com.atlassian.cache.memory.DelegatingCache$DelegatingLoadingCache.get(DelegatingCache.java:316)
... 221 more
It turned out that the oauth consumer key, needed for the application link between jira-prod and confluence-prod, was deleted when the application link jira-prod to confluence-test was deleted (because of the same confluence:id).
Now that the application link jira-prod to confluence-prod could not be deleted in the user interface, this needs to be done in the database directly. Luckily there's an Atlassian KB article for this. So here we go!
First action was to stop JIRA. The database queries were done by using Microsoft SQL Server Management Studio on the JIRA database (a MSSQL db). In addtion to the SQL statements from the KB article above, I also ran a SELECT just before deleting anything, just to make sure and verify what I'm about to delete.
SELECT substring(a.property_key,16,36) as "Application Key", b.propertyvalue as "Application Name" FROM propertyentry a join propertystring b on a.id=b.id where a.property_key like 'applinks.admin%name';
Application Key Application Name
bc4856d3-a7d7-3da1-ab24-76deb75bbd3a External App
c7726e78-6f42-3f2b-9253-653cb5e44bf1 Confluence
SELECT * FROM oauthspconsumer WHERE consumer_key IN (SELECT CONVERT(NVARCHAR(MAX), propertyvalue) FROM propertystring WHERE id IN (SELECT id FROM propertyentry WHERE property_key LIKE 'applinks.%c7726e78-6f42-3f2b-9253-653cb5e44bf1%'));
ID CREATED CONSUMER_KEY consumername PUBLIC_KEY DESCRIPTION CALLBACK TWO_L_O_ALLOWED EXECUTING_TWO_L_O_USER TWO_L_O_IMPERSONATION_ALLOWED THREE_L_O_ALLOWED
12003 2017-03-30 13:09:57.430 Confluence:4117472381 Confluence MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCCNfUDzSXbadyMPoUEJrsFnpNMxFVrjFcl1gKaibSoTe/mNk2Si6r/Ui30cphAPaxWwwmZpnOuQoeCoMlKwm/VAo5b+6BCdb0rYBxU4FMEu6qvJAdmofrF4rhY5H82G4kdcf+8Gd7wl0HvikFgvAs4IVQcnbvcyLKC32hrrSrvpwIDAQAB Atlassian Confluence http://localhost:8080 NULL Y NULL N Y
SELECT * FROM oauthconsumer;
ID CREATED consumername CONSUMER_KEY consumerservice PUBLIC_KEY PRIVATE_KEY DESCRIPTION CALLBACK SIGNATURE_METHOD SHARED_SECRET
10100 2015-05-07 17:09:05.047 JIRA jira:f8a757db-6e19-41e2-887c-43c79dbbeab3 __HOST_SERVICE__ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCc+L9ULOP6Q6tIgtmAAb+9wgwkabGhWb365aCLfoup0Yx3FdF3GvUns1+NS7MKwCxT+FgMKeNQWrsuxE9XQvMnNk1lz7t628N1S+GSIj8q6BQlZ7Cj3pbGhwTaSPTxVqbLkUh4ny1egZDoO4Ef6s8d7RG4VBQCe0Q9PMtFy2Eb3wIDAQAB MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJz4v1Qs4/pDq0iC2YABv73CDCRpsaFZvfrloIt+i6nRjHcV0Xca9SezX41LswrALFP4WAwp41Bauy7ET1dC8yc2TWXPu3rbw3VL4ZIiPyroFCVnsKPelsaHBNpI9PFWpsuRSHifLV6BkOg7gR/qzx3tEbhUFAJ7RD08y0XLYRvfAgMBAAECgYBopj2INNVYh7ytfu7aNFBMhg3qSLyvwVCy8Fv0I82gzZ9D1TvsmABRE3jkjk8zH6Nt5+drVJHDhHm+WAo9Ntk7fpXFE2si/LPuSW8Be4WO7DkCTJ8Z9dnKBxQbSCNl3UBlVbAwu65DQ1E81hgRfl1yMuiwZMHNpVVHS3T3cajyoQJBAPSL54JT3u+/M+eZ1lWVlpLdul1d6fPkzZbk3q03k/6wj/qSMBWEcmRLq3hj6/FTd9/lL6tXesXzuu225AXQirsCQQCkUtOs9Is2Y0wqJj+v1z5PNpFBlDGIVR3YiPc/aBEBlYR3BD5L7ukm7Gk5xOtIZp9esZCqgTiROmeKL4c1VRstAkBfk6aB62HAdgxFQnzgqjxVXk+OWjwr1Ir9pKnbLVOsQTmkhyo/3qoOxPxZa0Q155d8bEi7QM99OoseiVKJaz4tAkEAnikWkkcB40Rp37vW2sG6uHWWE9+2WTlLs8oI6F+a1sJ5sDBGYcG/aXZsxWyy5YnY5UTVMDeWIbpsRAYBBqU2tQJBAIUsX9pfzPF4CCA6QrzGQ/efPlds4m8yNgbRljE/iVg8hTDomaG9JJRnVsrKZJYNb/YkZSFZp1h+DIwqBxNEhe0= Atlassian JIRA at https://jira.example.com NULL RSA_SHA1 NULL
SELECT * FROM oauthconsumertoken WHERE token_key LIKE '%c7726e78-6f42-3f2b-9253-653cb5e44bf1%';
ID CREATED TOKEN_KEY TOKEN TOKEN_SECRET TOKEN_TYPE CONSUMER_KEY
10100 2013-03-18 07:07:06.797 c7726e78-6f42-3f2b-9253-653cb5e44bf1:XXXXXXXXXXXXXXX D3WbhepfmVPjWY65w4NDYVge2LKuo7jb 09eaV2CTK6I4byMm5plyZ9Eh6Geuuvov ACCESS XXXXXXXXXXXXXXX
10102 2013-03-18 14:13:00.450 c7726e78-6f42-3f2b-9253-653cb5e44bf1:XXXXXXXXXXXXXXX YGU4Hl4QTgMxLMMSjPlcHigTqHicdE3A mlmrRRtE6rp5gkX9FsjGlqekxidcUkn0 ACCESS XXXXXXXXXXXXXXX
10103 2013-03-18 18:08:29.593 c7726e78-6f42-3f2b-9253-653cb5e44bf1:XXXXXXXXXXXXXXX dxZ9nv2kXUSAF3V6rfllnDbTsmusknd9 GnmKAKUOjXBXkbqMipD54ZEzV3gslbO3 ACCESS XXXXXXXXXXXXXXX
[...]
DELETE FROM oauthspconsumer WHERE consumer_key IN (SELECT CONVERT(NVARCHAR(MAX), propertyvalue) FROM propertystring WHERE id IN (SELECT id FROM propertyentry WHERE property_key LIKE 'applinks.%c7726e78-6f42-3f2b-9253-653cb5e44bf1%'));
(1 row(s) affected)
SELECT * FROM oauthspconsumer WHERE consumer_key IN (SELECT CONVERT(NVARCHAR(MAX), propertyvalue) FROM propertystring WHERE id IN (SELECT id FROM propertyentry WHERE property_key LIKE 'applinks.%c7726e78-6f42-3f2b-9253-653cb5e44bf1%'));
no results
DELETE FROM oauthconsumer;
(1 row(s) affected)
SELECT * FROM oauthconsumer;
no results
DELETE FROM oauthconsumertoken WHERE token_key LIKE '%c7726e78-6f42-3f2b-9253-653cb5e44bf1%';
(97 row(s) affected)
SELECT * FROM oauthconsumertoken WHERE token_key LIKE '%c7726e78-6f42-3f2b-9253-653cb5e44bf1%';
no results
SELECT * FROM trustedapp WHERE application_id IN (SELECT CONVERT(NVARCHAR(MAX), propertyvalue) FROM propertystring WHERE id IN (SELECT id FROM propertyentry WHERE property_key LIKE 'applinks.%c7726e78-6f42-3f2b-9253-653cb5e44bf1%'));
no results
DELETE FROM trustedapp WHERE application_id IN (SELECT CONVERT(NVARCHAR(MAX), propertyvalue) FROM propertystring WHERE id IN (SELECT id FROM propertyentry WHERE property_key LIKE 'applinks.%c7726e78-6f42-3f2b-9253-653cb5e44bf1%'));
(0 row(s) affected)
SELECT * FROM propertystring WHERE id IN (SELECT id FROM propertyentry WHERE property_key LIKE 'applinks.%c7726e78-6f42-3f2b-9253-653cb5e44bf1%');
ID propertyvalue
490595 #java.util.Properties #Thu Mar 30 13:10:25 CEST 2017
490590 #java.util.Properties #Thu Mar 30 13:10:24 CEST 2017
490619 https://confluence.example.com
490618 Confluence
490587 true
490589 #java.util.List oauth.incoming.consumerkey
490596 #java.util.List com.atlassian.applinks.api.auth.types.OAuthAuthenticationProvider com.atlassian.applinks.api.auth.types.TwoLeggedOAuthAuthenticationProvider
490620 http://confluence.example.com:8091
490582 confluence
490588 Confluence:4117472381
DELETE FROM propertystring WHERE id IN (SELECT id FROM propertyentry WHERE property_key LIKE 'applinks.%c7726e78-6f42-3f2b-9253-653cb5e44bf1%');
(10 row(s) affected)
SELECT * FROM propertystring WHERE id IN (SELECT id FROM propertyentry WHERE property_key LIKE 'applinks.%c7726e78-6f42-3f2b-9253-653cb5e44bf1%');
no results
SELECT * FROM propertyentry WHERE property_key LIKE 'applinks.%c7726e78-6f42-3f2b-9253-653cb5e44bf1%';
ID ENTITY_NAME ENTITY_ID PROPERTY_KEY propertytype
490595 jira.properties 1 applinks.admin.c7726e78-6f42-3f2b-9253-653cb5e44bf1.auth.4e751871359fc86ed973d2a58b40c2b7 5
490590 jira.properties 1 applinks.admin.c7726e78-6f42-3f2b-9253-653cb5e44bf1.auth.52e4d6463f02700eeefbefc74233de4f 5
490619 jira.properties 1 applinks.admin.c7726e78-6f42-3f2b-9253-653cb5e44bf1.display.url 5
490618 jira.properties 1 applinks.admin.c7726e78-6f42-3f2b-9253-653cb5e44bf1.name 5
490587 jira.properties 1 applinks.admin.c7726e78-6f42-3f2b-9253-653cb5e44bf1.primary 5
490589 jira.properties 1 applinks.admin.c7726e78-6f42-3f2b-9253-653cb5e44bf1.propertyKeys 5
490596 jira.properties 1 applinks.admin.c7726e78-6f42-3f2b-9253-653cb5e44bf1.providerKeys 5
490620 jira.properties 1 applinks.admin.c7726e78-6f42-3f2b-9253-653cb5e44bf1.rpc.url 5
490582 jira.properties 1 applinks.admin.c7726e78-6f42-3f2b-9253-653cb5e44bf1.type 5
490588 jira.properties 1 applinks.application.c7726e78-6f42-3f2b-9253-653cb5e44bf1.oauth.incoming.consumerkey 5
DELETE FROM propertyentry WHERE property_key LIKE 'applinks.%c7726e78-6f42-3f2b-9253-653cb5e44bf1%';
(10 row(s) affected)
SELECT * FROM propertyentry WHERE property_key LIKE 'applinks.%c7726e78-6f42-3f2b-9253-653cb5e44bf1%';
no results
SELECT * FROM propertystring where id in (select id from propertyentry where property_key like 'applinks.global%');
ID propertyvalue
490586 #java.util.List bc4856d3-a7d7-3da1-ab24-76deb75bbd3a c7726e78-6f42-3f2b-9253-653cb5e44bf1
UPDATE propertystring SET propertyvalue = CAST(REPLACE(CAST(propertyvalue as NVarchar(MAX)), CHAR(10)+'c7726e78-6f42-3f2b-9253-653cb5e44bf1','') AS NText) where id in (select id from propertyentry where property_key like 'applinks.global%');
(1 row(s) affected)
SELECT * FROM propertystring where id in (select id from propertyentry where property_key like 'applinks.global%');
ID propertyvalue
490586 #java.util.List bc4856d3-a7d7-3da1-ab24-76deb75bbd3a
After these steps, JIRA was started again. The application link to confluence-prod was now gone and it could be recreated in the JIRA admin interface.
Thanks to Sharon for her in-depth JIRA knowledge and Gojko from Atlassian support.
Looking for professional and super-fast Atlassian Jira hosting? Check out the dedicated Jira server hosting at Infiniroot!
No comments yet.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Observability Office OpenSearch PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder