Details
-
Bug
-
Resolution: Fixed
-
Highest
-
7.1.8, 7.2.8, 7.2.9, 7.3.5, 7.3.7, 7.2.10
-
7.01
-
2
-
Severity 2 - Major
-
1
-
-
Description
Summary
After changing the username of an user on node1, sometimes this user will not be able to log in any other nodes aside from node1.
Tech details: ApplicationUserEntity used in UserKeyStoreImpl's caches' keys is not Serializable and causes java.io.NotSerializableException in Data Center.
Environment
- JIRA Data Center
Steps to Reproduce
For end user:
- After changing the username of an user on node1, sometimes this user will not be able to log in any other nodes aside from node1.
- Deploy a new JIRA Data Center cluster with two nodes
- Create an user (e.g. user1) at node1
- On node1, change user1's username to user2.
- Try to login as user user2 at node2.
For developers:
- Deploy a new JIRA Data Center cluster with two nodes, making sure you are not using an unlimited license.
- Create an user (e.g. user1).
- On node1, flush all caches
- On node1, change user1's username to user2.
Expected Results
Cache is correctly replicated to other nodes in the cluster and user2 is able to login properly.
Actual Results
The following exception is thrown on node1:
2017-09-22 10:48:36,331 http-nio-8080-exec-9 INFO admin 648x1078x1 15qcmg1 0:0:0:0:0:0:0:1 /rest/internal/1.0/cache/app [c.a.c.e.c.a.j.c.e.ofbiz.EagerOfBizGroupCache.groupCache] Cache com.atlassian.jira.crowd.embedded.ofbiz.EagerOfBizGroupCache.groupCache was flushed 2017-09-22 10:48:41,488 ehcache-replicator-19 ERROR admin 678x136x1 1cbrzc8 0:0:0:0:0:0:0:1 /secure/admin/user/EditUser.jspa [c.a.j.c.cache.ehcache.BlockingParallelCacheReplicator] Exception on replication of remove. error marshalling arguments; nested exception is: java.io.NotSerializableException: com.atlassian.jira.user.ApplicationUserEntity. Cache: com.atlassian.jira.user.util.UserKeyStoreImpl.keyToUserCache Peer: com.atlassian.jira.user.util.UserKeyStoreImpl.keyToUserCache java.rmi.MarshalException: error marshalling arguments; nested exception is: java.io.NotSerializableException: com.atlassian.jira.user.ApplicationUserEntity at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:158) at net.sf.ehcache.distribution.RMICachePeer_Stub.remove(Unknown Source) at com.atlassian.jira.cluster.cache.ehcache.BlockingParallelCacheReplicator.lambda$replicateRemovalNotification$1(BlockingParallelCacheReplicator.java:163) at com.atlassian.jira.cluster.cache.ehcache.BlockingParallelCacheReplicator.lambda$null$3(BlockingParallelCacheReplicator.java:203) at com.atlassian.jira.cluster.cache.ehcache.ClassLoaderSwitchingRunnable.run(ClassLoaderSwitchingRunnable.java:18) at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626) 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: java.io.NotSerializableException: com.atlassian.jira.user.ApplicationUserEntity at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:294) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:153) ... 8 more
This happens because the class com.atlassian.jira.user.ApplicationUserEntity does not implement the interface Serializable. Due to that node1 will fail to replicate this cache invalidation event to other nodes, making them unaware user1 is now called user2.
Notes
The specific operation during normal JIRA usage causing a cache flush is still unknown. There is some suspicion on third-party add-ons calling ClearCacheEvent, which could cause this.
Workaround
- Perform rolling restarts on all nodes except the one where the user was renamed.
Attachments
Issue Links
- is duplicated by
-
JRASERVER-66074 User cannot log in to most nodes after a username change in an external directory when using Data Center
-
- Closed
-
- relates to
-
JRASERVER-62071 Installed plugins initializing Data Center cache with wrong class loader
-
- Closed
-