> Source: [sk150332](https://support.checkpoint.com/results/sk/sk150332)

# sk150332 - Remove/Add object operation through API fails with "generic_err_object_locked" error

| Property | Value |
|----------|-------|
| Solution ID | sk150332 |
| Date Created | 2019-04-17 |
| Last Modified | 2023-04-21 |
| Technical Level | Advanced |
| Products | Multi-Domain Security Management Server |
| Versions | R81.10 (EOS) |
| OS | Gaia |

## Symptoms

- * Remove/Add group object operation through API fails with error:  


  `ERROR - {'code': 'generic_err_object_locked', 'message': 'Requested object with ObjId: [objid] name: [group_object] locked: [Locked for editing by admin_user]', '_action': 'add_host'}`

* In SmartConsole the group object is indeed locked, however Sessions View shows no objects locked for the admin user.

* However the following psql command from Expert mode shows the object is locked:   

  `
  # psql_client cpm postgres -c "SELECT objid, name, dlesession, cpmitable, subquery1.lockingsessionid, subquery1.operation FROM dleobjectderef_data, (SELECT lockedobjid, lockingsessionid, operation FROM locknonos) subquery1 WHERE subquery1.lockedobjid = objid and objid = '[objid]' and not deleted and dlesession >=0;" `   

  \* Replace \[objid\] in the above command with the object ID found in the error logs. The output should be something like this:

  ```
  
           objid       ???? |  name  ?| dlesession | ? cpmitable ?  ?| ?? lockingsessionid ???   | ?? operation 
  --------------------------+---------+------------+-----------------+---------------------------+----------------------+ 
  85c8e0ec-...-ee69b2a837f1 | GRP-OBJ | ?? 12 ?   ?| network_objects | b6bfa425-...-ac58e4d3a45b | CP_LOCK_OPERATION_EDIT 
  85c8e0ec-...-ee69b2a837f1 | GRP-OBJ | ?? 0 ?    ?| network_objects | b6bfa425-...-ac58e4d3a45b | CP_LOCK_OPERATION_EDIT
  ```

## Cause

API service crashed during the previous operation and the object was locked out.

## Solution

This solution requires authentication. Please log in to view the full solution.

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
