Bug 149503 - Jira Authentication Failed for existing query
Summary: Jira Authentication Failed for existing query
Status: RESOLVED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P4 major (vote)
Target Milestone: ---   Edit
Assignee: Mylyn Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2006-07-03 19:57 EDT by Eugene Kuleshov CLA
Modified: 2006-10-22 12:50 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Kuleshov CLA 2006-07-03 19:57:21 EDT
Got this error after upgrading to Mylar 0.6 when trying to edit existing custom jira query. Strange thing is that credentials are valid according to the "validate" check on repository configuration wizard.

Jira Authentication Failed.
Please check your Jira username and password in the Task Repositories view

org.tigris.jira.core.service.exceptions.AuthenticationException
	at org.tigris.jira.internal.core.service.soap.SoapJiraService.getSavedFilters(SoapJiraService.java:326)
	at org.tigris.jira.core.service.CachedRpcJiraServer.getNamedFilters(CachedRpcJiraServer.java:464)
	at org.eclipse.mylar.internal.jira.ui.wizards.JiraQueryWizardPage$3.run(JiraQueryWizardPage.java:182)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Comment 1 Brock Janiczak CLA 2006-07-04 05:40:30 EDT
You should only be getting authentication failures when we try to get a login token, which is done before the call to get saved filters.  It almost looks like the server forgot about your token.

Does it do this all the time?

If this doesn't happen all the time, could you tell me what the session timeout is on the Jira Server?  We currently get a new login token after 10 minutes of inactivity.  Perhaps this needs to be lowered.
Comment 2 Eugene Kuleshov CLA 2006-07-04 09:43:50 EDT
(In reply to comment #1)
> Does it do this all the time?

It look like it. I've restarted Eclipse several times since then and still getting it. List of saved filters is not being populated after that.

> If this doesn't happen all the time, could you tell me what the session timeout
> is on the Jira Server?  We currently get a new login token after 10 minutes of
> inactivity.  Perhaps this needs to be lowered.

How do I check that?
Comment 3 Eugene Kuleshov CLA 2006-07-04 12:24:00 EDT
Hmm. Now this error is gone. Few restarts probably helped after all...
Comment 4 Mik Kersten CLA 2006-07-04 16:36:47 EDT
Sheesh, that's not a good note to resolve a bug on ;)  I guess that this sounds like a credentials caching issue since the restarts 'solved' it.

Brock: what if we flush/reset the credentials after the validation step?  Could we get a method to do that?
Comment 5 Brock Janiczak CLA 2006-07-04 16:52:26 EDT
Restarting eclipse should be enough.  We do not cache login tokens across sessions.

You would have to ask the admin to find the session timeout for you.  It will depend on which appserver or servlet container it is deployed on.

Validate connection doesn't use a server instance, but the token should be reset when the username or password is changed for a server.  This is currently not being done (but this isn't the same issue you are seeing).
Comment 6 Eugene Kuleshov CLA 2006-07-04 18:25:14 EDT
I am seeing this again. Probably Brock is right and it is something around caching... I wonder if caching can be flushed off on such error in this place and retried second time...
Comment 7 Mik Kersten CLA 2006-07-05 12:54:18 EDT
What would be more simple to start is to catch that exception and then pop up a dialog instructing the user to reset the server information if this happens. 

Brock, could you add a such a flush to JiraServer.refreshDetails(), perhaps renaming the method to JiraServer.reset()?  Then I can add it as an action to the Task Rrepositories view.
Comment 8 Brock Janiczak CLA 2006-07-06 06:37:14 EDT
(In reply to comment #7)
> Brock, could you add a such a flush to JiraServer.refreshDetails(), perhaps
> renaming the method to JiraServer.reset()?  Then I can add it as an action to
> the Task Rrepositories view.
> 

not to sound rude, but no :)

I will make it clear the login token whenever we get an authentication error when calling a remote function.  This way it will try to login again when you retry the operation.  No need for calling code to refresh all server details.

I will also reduce the session timeout from 10 minutes to 1 minute.  This should cover most setups.

Eugene, does restarting Eclipse make the problem go away (for a while)?
Comment 9 Mik Kersten CLA 2006-10-20 02:48:24 EDT
Eugene: is this still a problem?
Comment 10 Eugene Kuleshov CLA 2006-10-20 10:26:46 EDT
Haven't seen it for some time now.
Comment 11 Eugene Kuleshov CLA 2006-10-22 12:50:59 EDT
Closing as not reproduceable.