The session id for user [admin] is invalid
John Mazzitelli
mazz at redhat.com
Thu Oct 14 12:12:14 UTC 2010
This means your overlord subject has had its session expire. I've seen
this happen before. If your test calls "SubjectManager.getOverlord()"
make sure you don't keep that overlord user around longer than you have
to. If you see this problem, try to get a new one just prior to needing
it and throw it away when you are done with it after that one time.
The general problem occurs when:
1) you get the overlord user
2) you perform something that takes a long time
3) you attempt to authenticate with the overlord user
For example:
Subject overlord = getOverlord();
do_Something_That_Takes_A_Long_Time();
call_Something_That_Needs_A_Subject(overlord);
In this case, your overlord could expire before you need it. To help
solve this, get the overlord right before you need it and throw it away
after you use it - getting a new one the next time you need it. So for
example, instead of doing this:
// this overlord will be reused over the entire for-loop iteration
Subject overlord = getOverlord();
for (...iterate over something...) {
doSomeStuff();
call_Something_That_Needs_A_Subject(overlord);
}
do this:
for (...iterate over something...) {
doSomeStuff();
// get a new overlord right before you need it
// and throw it away afterward
Subject overlord = getOverlord();
call_Something_That_Needs_A_Subject(overlord);
}
On 10/14/2010 05:25 AM, Heiko W.Rupp wrote:
> When running my (long running) performance tests, I get from time to time the following exception:
>
> Those affected tests run for> 300sec - do we have some new more aggressive session timeout somewhere?
> And how can this be disabled for long running tests?
>
> org.rhq.enterprise.server.authz.PermissionException: The session ID for user [admin] is invalid!: invocation: method=public long org.rhq.enterprise.server.system.SystemManagerBean.vacuum(org.rhq.core.domain.auth.Subject,java.lang.String[]),context-data={}
> at org.rhq.enterprise.server.authz.RequiredPermissionsInterceptor.buildPermissionException(RequiredPermissionsInterceptor.java:164)
[chomp]
> at org.rhq.enterprise.server.performance.test.AvailabilityInsertPurgeTest.testRandom(AvailabilityInsertPurgeTest.java:221)
More information about the rhq-devel
mailing list