Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Jira server throws there is no ID mapped for the user key error Edited

sometimes our jira environment is slow, so i analysed the error log.

we have 110 times the error " Jira server throws there is no ID mapped for the user key error" and i followed the instruction on the knowledgebase: https://confluence.atlassian.com/jirakb/jira-server-throws-there-is-no-id-mapped-for-the-user-key-error-770606447.html?utm_medium=logScan&utm_source=STP

our error:

2020-10-20 12:06:28,820+0200 http-nio-80-exec-8 ERROR anonymous 726x14993x1 10lksn4 172.19.20.74 /CSAction!save.jspa [c.a.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.jira.event.issue.IssueEvent@315c9fdc[issue=HEL-722,comment=com.atlassian.jira.issue.comments.CommentImpl@6df12b10,worklog=<null>,changelog=<null>,eventTypeId=6,sendMail=true,params={eventsource=action, baseurl=http://xxxxx},subtasksUpdated=false,spanningOperation=Optional.empty]] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.jira.bc.issue.watcher.AutoWatchService.onIssueEvent(com.atlassian.jira.event.issue.IssueEvent), listener=com.atlassian.jira.bc.issue.watcher.AutoWatchService@52c10698}]
java.lang.RuntimeException: There is no ID mapped for the user key 'admin'. Listener: com.atlassian.jira.bc.issue.watcher.AutoWatchService event: com.atlassian.jira.event.issue.IssueEvent
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:57)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37)
at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:85)
at com.atlassian.event.internal.LockFreeEventPublisher$Publisher.dispatch(LockFreeEventPublisher.java:220)
at com.atlassian.event.internal.LockFreeEventPublisher.publish(LockFreeEventPublisher.java:96)
at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishEventIfNotificationsAreEnabled(DefaultIssueEventManager.java:180)
at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishEvent(DefaultIssueEventManager.java:162)
at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishAsRedundant(DefaultIssueEventManager.java:204)
at com.atlassian.jira.event.issue.DefaultIssueEventManager.dispatchRedundantEvent(DefaultIssueEventManager.java:91)
at com.atlassian.jira.issue.comments.CommentEventPublisherImpl.publishCommentCreatedEvent(CommentEventPublisherImpl.java:57)
at com.atlassian.jira.issue.comments.DefaultCommentManager.create(DefaultCommentManager.java:288)
at com.atlassian.jira.issue.comments.DefaultCommentManager.create(DefaultCommentManager.java:239)
at com.atlassian.jira.issue.comments.DefaultCommentManager.create(DefaultCommentManager.java:229)
at com.atlassian.jira.issue.comments.DefaultCommentManager.create(DefaultCommentManager.java:213)
at com.atlassian.jira.issue.comments.DefaultCommentManager.create(DefaultCommentManager.java:202)
at com.atlassian.jira.issue.comments.DefaultCommentManager.create(DefaultCommentManager.java:191)
at com.atlassian.jira.issue.comments.DefaultCommentManager.create(DefaultCommentManager.java:196)
at ru.teamlead.jira.plugins.cs.actions.CSAction.doExecute(CSAction.java:525)
at ru.teamlead.jira.plugins.cs.actions.CSAction.doSave(CSAction.java:273)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
... 2 filtered
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
... 7 filtered
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
... 52 filtered
at com.atlassian.jira.plugin.mobile.web.filter.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:59)
... 4 filtered
at com.atlassian.jira.plugin.mobile.login.MobileLoginSuccessFilter.doFilter(MobileLoginSuccessFilter.java:54)
... 3 filtered
at com.atlassian.diagnostics.internal.platform.monitor.http.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:55)
... 8 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 57 filtered
at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
... 1 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
... 39 filtered
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
... 10 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 4 filtered
at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
... 29 filtered
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
... 25 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: There is no ID mapped for the user key 'admin'
at com.atlassian.jira.user.DefaultUserPropertyManager.getPropertySetForUserKey(DefaultUserPropertyManager.java:32)
at com.atlassian.jira.user.DefaultUserPropertyManager.getPropertySet(DefaultUserPropertyManager.java:25)
at com.atlassian.jira.user.preferences.DefaultUserPreferencesManager.getExtendedPreferences(DefaultUserPreferencesManager.java:22)
at com.atlassian.jira.bc.issue.watcher.AutoWatchService.isAutoWatchEnabledForUser(AutoWatchService.java:88)
at com.atlassian.jira.bc.issue.watcher.AutoWatchService.shouldAutoWatchEvent(AutoWatchService.java:66)
... 2 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:42)
... 281 more

 

sql command is

SELECT * from userassociation WHERE association_type = 'WatchIssue'
AND source_name = 'admin'

and the result was NULL

 

-> If the query above returns any results, please proceed to the next steps. Otherwise, contact Atlassian Support.

1 answer

0 votes
Andy Heinzer Atlassian Team Oct 22, 2020

Hi Sandro,

Thanks for the detailed log here.  I can see that Jira does not appear to have a username entry for the user_key of admin on your system.  While the KB you referenced does appear to be correct for this problem, I'm curious to learn more here to see if we can better understand the source of this error.

I'd be interested to see if you can run the following SQL command to try to directly identify any accounts that might exist in the app_user table that are not correctly referenced in the cwd_user table.  You can do this in a Postgres database with the statement of:

SELECT lower_user_name FROM cwd_user
WHERE lower_user_name NOT IN (
SELECT lower_user_name FROM app_user
);

I'm expecting that you will get back at least one entry here.  If you do, then I'd recommend checking out a different article over in Jira throws error user exists but has no unique key mapping on login.  This article is a bit broader as it tries to encompass multiple causes for this kind of error.  You should be able to follow the steps in that KB as a means to resolve this.  However if you have any questions or concerns about your results or the correct steps to fix this, please let me know more about your results and I will try to offer more concise troubleshooting steps to try to follow.

Andy

Hi Andy,

result is NULL :)

Br

Sandro

Andy Heinzer Atlassian Team Oct 23, 2020

Could you please let me know the exact version of Jira this is?  The post seems to indicate that it's 8.9, but I'd like to be certain if this a 8.9.0, 8.9.1, etc.

Also what type for SQL database are you using for Jira here?  (postgresql, mysql, oracle, or Microsoft SQL?)  In some cases, the database type can influence how these queries need to be formatted.

 

I would also be interested if you can post the results to these three queries as well:

select count(*) from app_user;

select count(*) from cwd_user;

select count(*) from cwd_directory;

The cwd_directory table tells us about the user directories you have in Jira.  If all the users are in a single directory, then I would expect that the count from app_user and cwd_users should be equal.  However if you have multiple user directories, then it is very likely that these two tables will have different values.  This is because if a user account could exist by the same name in multiple user directories, but this does not create a new entry in app_user table.  Typically when I have seen this particular error message, it is because some missing or corrupted entry in the app_user table of the database.

Do you have any results for this query?

select * from app_user where user_key like '%admin%' OR lower_user_name like '%admin%';

Please let me know the results.

Andy

Hi Andy,

we are using Jira Core 8.9.0 with a MSSQL on a other server running on the version 13.0.5622.0

select count(*) from app_user;  -> 8093

select count(*) from cwd_user; -> 313

select count(*) from cwd_directory; -> 2

we are using the internal user database of jira and the active directory server.

 

select * from app_user where user_key like '%admin%' OR lower_user_name like '%admin%';  -> result is 59 rows do you need any details of this result?
Andy Heinzer Atlassian Team Oct 28, 2020

Thanks for this info, perhaps that last query was too broad. 59 is more than I expected here. Let's just try to reverse the lookup of a previous query.  Try:

SELECT * FROM app_user
WHERE lower_user_name NOT IN (
SELECT lower_user_name FROM cwd_user
);

Basically we are looking for a malformed entry in the app_user table here.  Jira believes there should be a user account that has a user_key of 'admin'.  But figuring out exactly which account should have that can be tricky. 

If accounts have never been renamed, then it should just be a user with the username of admin, but when accounts get renamed in Jira, that username can change while the user_key is expected to remain the same throughout the life of that account (Jira 8.3 and later rolled out a means to anonymize user_key values to meet GDPR compliance, but that process should not cause this error.)

I'm also concerned that the SQL syntax might just be slightly different for MS SQL, versus Postgresql where I'm testing out this.  I would have expected a previous SQL query to return an account here but it did not.

Let me know the results.

Andy

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.9
TAGS
Community showcase
Published in Jira

Announcing the waitlist for Jira Work Management

Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...

880 views 14 20
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you