Can't delete Application Links to Stash server we removed

We have a locally-hosted version of Jira. We previously set up Stash on a local server on our office LAN, and an Application Link was created between Jira and Stash correctly. We then decided that we wanted to set up Stash on a different server (at a different IP address) on our office LAN. Doing this created a new Application Link between Jira and Stash, which worked correctly. We then removed the first Stash server (reformatting that server in the process). Now we get an error that Jira can't communicate with the first server:

Request to http://10.4.20.80:7990 failed: An error occurred whilst communicating with Stash: No route to host

This makes sense, since that server is no longer there. So attempted to delete the Application Link to the first server, but when I do I get this error:

Couldn't retrieve manifest for link with id cc353bd3-dd1c-3168-9aeb-c6ebb85c78b2

and I'm unable to delete the Link. Since I can't bring the old Stash server back online, I don't seem to be able to remove the Application Link. Is there any way to work around this?

8 answers

1 accepted

This widget could not be displayed.

You should be able to delete it directly in database with teh following steps:

  1. Get the applicatin okey for the application to remove:
    SELECT SUBSTR(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%' and  a.property_key like '%name';
  2. Delete the application link from databse. Replace <tt><APP_KEY></tt>fro the application key from step #1:
    DELETE FROM oauthspconsumer WHERE consumer_key IN (SELECT propertyvalue FROM propertystring WHERE id IN (SELECT id FROM propertyentry WHERE property_key LIKE 'applinks.admin%' AND property_key LIKE '%&lt;APP_KEY&gt;%'));
    DELETE FROM trustedapp WHERE application_id IN (SELECT propertyvalue FROM propertystring WHERE id IN (SELECT id FROM propertyentry WHERE property_key LIKE 'applinks.admin%' AND property_key LIKE '%&lt;APP_KEY&gt;%'));
    DELETE FROM propertystring WHERE id IN (SELECT id FROM propertyentry WHERE property_key LIKE 'applinks.admin%' AND property_key LIKE '%&lt;APP_KEY&gt;%');
    DELETE FROM propertyentry WHERE property_key LIKE 'applinks.admin%' AND property_key LIKE '%&lt;APP_KEY&gt;%';
    UPDATE propertystring SET propertyvalue = REPLACE(propertyvalue,'\n&lt;APP_KEY&gt;','');

More info in this link.

Sorry for the slow response. I followed your instructions and it worked, although you might want to add that I needed to stop/start Jira before it took effect.

This widget could not be displayed.

Another simple workaround is to inspect button element in browser and remove "disabled" flag.

Works like charm :)

yeah, worked great :) (remove button disabled flag)

This widget could not be displayed.
This widget could not be displayed.

How to remove the button disabled flag

That depends on your web browser. In chrome it's kind of like right click on the button, inspect element, then double click on "disabled" flag in HTML source to edit and just remove with backspace.

This widget could not be displayed.

When I am trying to delete I am getting the below error.Iam using JIRA 5.2.7

REST request failed: ApplicationLink with id '84306eb6-4fe7-3aef-98c3-e351870569a0' not found!

Well, either it's already removed or could be any other reason since it's not a supported solution just simple workaround. I don't think I'm able to help you more with that - you can try to fall back to the SQL solution or contact atlassian support.

This widget could not be displayed.

Thanks Andrzej.

But the sql delete queries are giving another error. "The data types nvarchar and ntext are incompatible in the equal to operator."

This widget could not be displayed.

Hi,

Can you please tell that on which database shall I run these commands. on JIRA database or STASH database.

I have already removed the links from the JIRA database using above commands. Now I want to remove them from STASH database. 

 

Regards

sandeep

This widget could not be displayed.

really bad advice..asking user to delete from database.  Is there a workaround?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

281 views 5 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you