Remote User Login fails with "user matching query does not exist"
search cancel

Remote User Login fails with "user matching query does not exist"

book

Article ID: 369214

calendar_today

Updated On: 07-24-2025

Products

VMware Avi Load Balancer

Issue/Introduction

After deleting a remote user via the controller GUI, the user login fails with  "user matching query does not exist" and the user is not created on the controller.

If attempting to create the same user as a local user via the GUI it fails with “User activity with this Name already exists”

Environment

Affects Versions: 22.x, 30.x (30.1.x and 30.2.x) and 31.1.x

Cause

  • This issue has been identified as  a stale useractivity object caused by a race condition on the code.  This race condition occurs when there are continuous automation logins with the wrong credentials and a simultaneous deletion of the user via the GUI.

Resolution

Fix Version: The fix for this issue will be implemented on the next GA releases of VMware Avi Load Balancer 31.2.1

Workaround:

Steps to delete the useractivity object via manage.py

  1. ssh to the leader node with the admin user and sudo -i
  2. cd /opt/avi/python/bin/portal and launch the shell "python3 manage.py shell"
  3. execute the following commands to delete the stale useractivity object.
    admin@:~$ sudo -i
    [sudo] password for admin:
    root@:~#python3 /opt/avi/python/bin/portal/manage.py shell
    
    In [1]: username = “example-username” ---> #Deleted Remote User Name
    In [2]: from permission.models import User
    In [3]: from api.models import UserActivity
    In [4]: user_obj = User.objects.get(name=username)
    In [5]: user_activity_obj = UserActivity.objects.get(name=username)
    In [6]: user_activity_obj.protobuf()
    In [7]: user_activity_obj.delete()
    In [8]: quit()

If you encounter this issue in your system and not able to execute the given workaround to the fix the issue, please contact technical support for assistance.