当我在ODL中使用restconf创建网桥时,出现错误:
java.lang.RuntimeException: RemoteDevice{of-config-test}: Failed to lock running. Failed to initialize transaction
at org.opendaylight.netconf.sal.connect.netconf.sal.tx.WriteCandidateRunningTx.lockRunning(WriteCandidateRunningTx.java:61)
at org.opendaylight.netconf.sal.connect.netconf.sal.tx.WriteCandidateRunningTx.init(WriteCandidateRunningTx.java:38)
at org.opendaylight.netconf.sal.connect.netconf.sal.tx.AbstractWriteTx.<init>(AbstractWriteTx.java:52)
at org.opendaylight.netconf.sal.connect.netconf.sal.tx.WriteCandidateTx.<init>(WriteCandidateTx.java:75)
at org.opendaylight.netconf.sal.connect.netconf.sal.tx.WriteCandidateRunningTx.<init>(WriteCandidateRunningTx.java:33)
at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceDataBroker.newWriteOnlyTransaction(NetconfDeviceDataBroker.java:72)
at org.opendaylight.netconf.sal.connect.netconf.sal.NetconfDeviceDataBroker.newReadWriteTransaction(NetconfDeviceDataBroker.java:65)
at org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.putDataViaTransaction(BrokerFacade.java:272)
at org.opendaylight.netconf.sal.restconf.impl.BrokerFacade.commitConfigurationDataPut(BrokerFacade.java:121)
at org.opendaylight.netconf.sal.restconf.impl.RestconfImpl.updateConfigurationData(RestconfImpl.java:723
然后显示ODL Controller日志:
NetconfDocumentedException{message=RemoteDevice{of-config-test}: Lock Running failed: [RpcError [message=Access to the requested lock is denied because the lock is currently held by another entity., severity=ERROR, errorType=PROTOCOL, tag=lock-denied, applicationTag=null, info=<session-id>1</session-id>, cause=null]], errorType=application, errorTag=operation_failed, errorSeverity=warning, errorInfo={}}
restconf URL为:
http://192.168.1.230:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/of-config-test/yang-ext:mount/of-config:capable-switch/
和播放量:
<capable-switch xmlns="urn:onf:config:yang" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
<id>openvswitch</id>
<logical-switches>
<switch nc:operation="create">
<id>s1</id>
<datapath-id>02:02:02:02:03:03:04:06</datapath-id>
</switch>
</logical-switches>
那么为什么会发生此错误,请帮助我,谢谢!