wiprochris
Contributor
Contributor

vCloud login error

It appears that vCloud is unable to handle the case where it receives multiple login requests from the same user account at or near the same time.  From my testing this only affects LDAP accounts.  When this issue occurs, I see the following in the logs:

vcloud-debug-container.log

2012-11-26 19:20:35,041 | ERROR    | 1350430681@pool-jetty-57  | AbstractFlushingEventListener  | Could not synchronize database state with session |
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.vmware.vcloud.common.model.User
#33bea023-144a-4d16-8705-49bacdad33c7]

2012_11_26.request.log

192.168.1.64 -  -  [26/Nov/2012:19:20:34 -0700] "POST /api/sessions HTTP/1.1" 401 0 "-" "Apache-HttpClient/4.1 (java 1.5)"

HTTP response code 401 is Unauthorized - http://www.checkupdown.com/status/E401.html

If you're working with the SDK, you'll receive the following when this issue occurs:

com.vmware.vcloud.sdk.exception.UnauthorizedAccessException: Unauthorized

at com.vmware.vcloud.sdk.RestUtil.login(RestUtil.java:296)

at com.vmware.vcloud.sdk.VcloudClient.login(VcloudClient.java:321)

at VcloudLogin.login(VcloudLogin.java:25)

at VcloudLogin$1LoginTask.run(VcloudLogin.java:44)

at java.lang.Thread.run(Unknown Source)

It looks like if vCD is in the process of updating the vCD database with a new login session, it will deny all login requests from the same user until the current transaction is completed. 

We have a portal that issues multiple login request and are seeing this frequently.  Perhaps our portal needs to be modified to use the same login session when possible (I'm not involved with coding our portal so I'm not sure how it works), but I wanted to see if anyone else has ran into this issue. 

The issue occurs with vCD 1.5 and 5.1 and both Windows 2008 and 2003 LDAP servers.  Local vCD accounts do not experience the issue. 

I created a small Java app that creates multiple concurrent login requests and can reproduce the issue at any time. 

I'll open up a ticket with support if I don't hear anything.  Thanks.

Tags (3)
0 Kudos
2 Replies
wiprochris
Contributor
Contributor

Support confirmed that this is a bug that will be fixed in a future release.

0 Kudos
mcfadyenj
Hot Shot
Hot Shot

Hi Chris,

Did they ever fix this for 5.1? I have the same issue using VCD 5.1

Regards,

John


0 Kudos