使用ODL Oxygen连接netopeer-server遇data-missing错误求助
分析ODL Oxygen连接Netopeer-server时的“Mount point does not exist”错误
我来帮你拆解这个问题——你遇到的Mount point does not exist错误,核心原因是你还没在ODL Oxygen控制器中创建对应Netopeer-server的NETCONF挂载点,直接发送操作请求肯定会触发这个报错。下面是具体的问题说明和解决步骤:
1. 先搞懂什么是ODL里的NETCONF挂载点
在ODL的NETCONF管理逻辑里,每一台要管控的NETCONF设备(比如你的Netopeer-server)都需要在ODL中创建一个“挂载点(Mount Point)”——这相当于ODL给设备分配的一个逻辑节点,后续所有针对该设备的操作都要通过这个挂载点来触发。你现在跳过了创建挂载点的步骤,直接发请求,ODL自然找不到对应的目标节点。
2. 先创建Netopeer-server的挂载点
你需要先通过ODL的RESTCONF接口发送创建挂载点的请求,示例命令如下(记得替换成你的实际参数):
curl -H "Content-Type: application/xml" -u admin:admin -X POST -d '<?xml version="1.0" encoding="UTF-8"?> <node xmlns="urn:TBD:params:xml:ns:yang:network-topology"> <node-id>netopeer-node-01</node-id> <host xmlns="urn:opendaylight:netconf-node-topology">192.168.1.100</host> <!-- 替换成你的Netopeer-server IP --> <port xmlns="urn:opendaylight:netconf-node-topology">830</port> <!-- 默认NETCONF端口,若修改过请替换 --> <username xmlns="urn:opendaylight:netconf-node-topology">netconf</username> <!-- Netopeer的用户名 --> <password xmlns="urn:opendaylight:netconf-node-topology">netconf</password> <!-- Netopeer的密码 --> <tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only> <keepalive-delay xmlns="urn:opendaylight:netconf-node-topology">0</keepalive-delay> </node>' http://127.0.0.1:8181/restconf/config/network-topology:network-topology/topology/netconf/node/netopeer-node-01
3. 验证挂载点是否创建成功
发送GET请求检查挂载点状态:
curl -u admin:admin http://127.0.0.1:8181/restconf/config/network-topology:network-topology/topology/netconf/node/netopeer-node-01
如果返回完整的节点配置XML,说明挂载成功;如果返回404,需要检查:
- 请求的XML格式是否正确(有没有语法错误)
- ODL是否安装了NETCONF相关特性:在ODL的Karaf控制台执行
feature:list | grep netconf,确认odl-netconf-node-manager或odl-netconf-all已安装 - Netopeer-server的网络是否能被ODL访问,830端口是否开放
4. 修正你的原始curl命令
你的原始命令里的XML内容是截断的(xmlns=\"urn:opendaylight...\"不完整),而且目标路径需要指向已创建的挂载点。比如要获取Netopeer-server的netconf-monitoring数据,请求路径应该是这样的:
curl -H "Content-Type: application/xml" -u admin:admin -X GET http://127.0.0.1:8181/restconf/operational/network-topology:network-topology/topology/netconf/node/netopeer-node-01/yang-ext:mount/netconf-monitoring:netconf-state
额外注意事项
- 确保Netopeer-server已经启用了
netconf-monitoring模块,可以在Netopeer上执行netconf-cli命令,查看已加载的模块确认 - 检查ODL和Netopeer-server之间的防火墙规则,避免端口被拦截
内容的提问来源于stack exchange,提问作者Entwickler
相关产品推荐
相关产品推荐

