NETCONF error: Locked session
Condition
Your session is locked, and you see an error message like this:
<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<rpc-error>
<error-type>protocol</error-type>
<error-tag>lock-denied</error-tag>
<error-severity>error</error-severity>
<error-message>Access to the requested lock is denied because the lock is currently held by another entity</error-message>
<error-info>
<session-id>session is locked by 12969</session-id>
</error-info>
</rpc-error>
</rpc-reply>
]]>]]>
Cause
There is a lock on your NETCONF session — this may be due to another user, or you may have issued a lock in another NETCONF session. You can't make changes in this session while the <lock>
RPC is active.
Remedy
<lock>
RPC was already active at the start of your session then other operations should still work. Use the <unlock>
or <closesession>
operation to clear the lock.- If you are able to determine who holds the lock, co-ordinate with them to complete your operations.
- If you are unable to determine who holds the lock, then you may simply have to wait and try again later. For information about the duration, see RFC6241, 7.5 <lock>.