Public | Automated Build

Last pushed: 6 days ago
Short Description
Docker image with Sysrepo & Netopeer2 setup.
Full Description

Docker image with Sysrepo & Netopeer2 setup

Run sysrepod and netopeer2-server in the container:

docker run -it --name sysrepo -p 830:830 --rm sysrepo/sysrepo-netopeer2:latest

Connect to the NETCONF server via SSH to port 830 (username / password is netconf):

ssh netconf@localhost -p 830 -s netconf

In order to get running config via the SSH session use the following snippet:

<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <capabilities>
        <capability>urn:ietf:params:neconf:base:1.0</capability>
        <capability>urn:ietf:params:netconf:base:1.1</capability>
        <capability>urn:ietf:params:netconf:capability:writable-running:1.0</capability>
        <capability>urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?module=ietf-netconf-monitoring&amp;revision=2010-10-04</capability>
    </capabilities>
</hello>
]]>]]>

#139
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-config>
    <source>
        <running />
    </source>
</get-config>
</rpc>
##

To access sysrepoctl or sysrepocfg exec bash in the container:

docker exec -it sysrepo /bin/bash
sysrepoctl -l
sysrepocfg turing-machine

You can also connect to the NETCONF server via testconf:

docker run -it --link sysrepo --rm sysrepo/testconf:latest

asciinema demo:

Docker Pull Command
Owner
sysrepo
Source Repository

Comments (1)
jnana
a month ago

Environment :
Mac OS Sierra

Steps followed :
docker run -i -t --name sysrepo -p 830:830 sysrepo/sysrepo-netopeer2:latest

docker run error log :

$ docker run -i -t --name sysrepo -p 830:830 sysrepo/sysrepo-netopeer2:latest
2017-09-26 09:58:11,893 CRIT Supervisor running as root (no user in config file)
2017-09-26 09:58:11,896 INFO supervisord started with pid 1
2017-09-26 09:58:12,903 INFO spawned: 'sysrepod' with pid 9
2017-09-26 09:58:12,905 INFO spawned: 'sysrepo-plugind' with pid 10
2017-09-26 09:58:12,906 INFO spawned: 'netopeer2-server' with pid 11
2017-09-26 09:58:12,938 DEBG 'sysrepod' stdout output:
[WRN] Unable to delete existing rpc subscriptions.

2017-09-26 09:58:12,944 DEBG 'sysrepod' stdout output:
[WRN] Persist file for module ietf-netconf-acm does not exist.

2017-09-26 09:58:12,946 DEBG 'sysrepod' stdout output:
[WRN] Unable to delete existing rpc subscriptions.

2017-09-26 09:58:12,952 DEBG 'sysrepod' stdout output:
[WRN] Persist file for module ietf-netconf-acm does not exist.

2017-09-26 09:58:12,954 DEBG 'sysrepo-plugind' stdout output:
current turing-machine configuration:
/turing-machine:turing-machine/transition-function/delta[label='left summand'] (list instance)
/turing-machine:turing-machine/transition-function/delta[label='left summand']/label = left summand
/turing-machine:turing-machine/transition-function/delta[label='left summand']/input (container)
/turing-machine:turing-machine/transition-function/delta[label='left summand']/input/state = 0
/turing-machine:turing-machine/transition-function/delta[label='left summand']/input/symbol = 1
/turing-machine:turing-machine/transition-function/delta[label='left summand']/output (container)
/turing-machine:turing-machine/transition-function/delta[label='left summand']/output/head-move = right [default]
/turing-machine:turing-machine/transition-function/delta[label='separator'] (list instance)
/turing-machine:turing-machine/transition-function/delta[label='separator']/label = separator
/turing-machine:turing-machine/transition-function/delta[label='separator']/input (container)
/turing-machine:turing-machine/transition-function/delta[label='separator']/input/state = 0
/turing-machine:turing-machine/transition-function/delta[label='separator']/input/symbol = 0
/turing-machine:turing-machine/transition-function/delta[label='separator']/output (container)
/turing-machine:turing-machine/transition-function/delta[label='separator']/output/state = 1
/turing-machine:turing-machine/transition-function/delta[label='separator']/output/symbol = 1
/turing-machine:turing-machine/transition-function/delta[label='separator']/output/head-move = right [default]
/turing-machine:turing-machine/transition-function/delta[label='right summand'] (list instance)
/turing-machine:turing-machine/transition-function/delta[label='right summand']/label = right summand
/turing-machine:turing-machine/transition-function/delta[label='right summand']/input (container)
/turing-machine:turing-machine/transition-function/delta[label='right summand']/input/state = 1
/turing-machine:turing-machine/transition-function/delta[label='right summand']/input/symbol = 1
/turing-machine:turing-machine/transition-function/delta[label='right summand']/output (container)
/turing-machine:turing-machine/transition-function/delta[label='right summand']/output/head-move = right [default]
/turing-machine:turing-machine/transition-function/delta[label='right end'] (list instance)
/turing-machine:turing-machine/transition-function/delta[label='right end']/label = right end
/turing-machine:turing-machine/transition-function/delta[label='right end']/input (container)
/turing-machine:turing-machine/transition-function/delta[label='right end']/input/state = 1
/turing-machine:turing-machine/transition-function/delta[label='right end']/input/symbol =
/turing-machine:turing-machine/transition-function/delta[label='right end']/output (container)
/turing-machine:turing-machine/transition-function/delta[label='right end']/output/state = 2
/turing-machine:turing-machine/transition-function/delta[label='right end']/output/head-move = left
/turing-machine:turing-machine/transition-function/delta[label='write separator'] (list instance)
/turing-machine:turing-machine/transition-function/delta[label='write separator']/label = write separator
/turing-machine:turing-machine/transition-function/delta[label='write separator']/input (container)
/turing-machine:turing-machine/transition-function/delta[label='write separator']/input/state = 2
/turing-machine:turing-machine/transition-function/delta[label='write separator']/input/symbol = 1
/turing-machine:turing-machine/transition-function/delta[label='write separator']/output (container)
/turing-machine:turing-machine/transition-function/delta[label='write separator']/output/state = 3
/turing-machine:turing-machine/transition-function/delta[label='write separator']/output/symbol = 0
/turing-machine:turing-machine/transition-function/delta[label='write separator']/output/head-move = left
/turing-machine:turing-machine/transition-function/delta[label='go home'] (list instance)
/turing-machine:turing-machine/transition-function/de
2017-09-26 09:58:12,957 DEBG 'sysrepod' stdout output:
[WRN] Persist file for module ietf-netconf-acm does not exist.

2017-09-26 09:58:12,978 DEBG 'sysrepod' stdout output:
[WRN] Unable to delete existing action subscriptions.

2017-09-26 09:58:12,983 DEBG 'sysrepod' stdout output:
[WRN] Unable to delete existing action subscriptions.

2017-09-26 09:58:13,038 DEBG 'sysrepod' stdout output:
[WRN] Persist file for module ietf-netconf-acm does not exist.

2017-09-26 09:58:13,061 DEBG 'sysrepod' stdout output:
[ERR] Validation of xpath /ietf-netconf-server:netconf-server/listen/endpoint[ssh]// failed.
[ERR] Get items failed for '/ietf-netconf-server:netconf-server/listen/endpoint[ssh]//
', session id=784697683.

2017-09-26 09:58:13,061 DEBG 'netopeer2-server' stdout output:
netopeer2-server[11]: Failed to get the next value from sysrepo iterator (Request contains unknown element).
netopeer2-server[11]: Server init failed.

2017-09-26 09:58:13,067 DEBG fd 13 closed, stopped monitoring <POutputDispatcher at 140234496854136 for <Subprocess at 140234496853344 with name netopeer2-server in state STARTING> (stdout)>
2017-09-26 09:58:13,067 INFO exited: netopeer2-server (exit status 1; not expected)
2017-09-26 09:58:13,067 DEBG received SIGCLD indicating a child quit
2017-09-26 09:58:14,071 INFO success: sysrepod entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-09-26 09:58:14,071 INFO success: sysrepo-plugind entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-09-26 09:58:14,073 INFO spawned: 'netopeer2-server' with pid 18
2017-09-26 09:58:14,136 DEBG 'sysrepod' stdout output:
[ERR] Validation of xpath /ietf-netconf-server:netconf-server/listen/endpoint[ssh]// failed.
[ERR] Get items failed for '/ietf-netconf-server:netconf-server/listen/endpoint[ssh]//
', session id=22647578.

2017-09-26 09:58:14,136 DEBG 'netopeer2-server' stdout output:
netopeer2-server[18]: Failed to get the next value from sysrepo iterator (Request contains unknown element).

2017-09-26 09:58:14,137 DEBG 'netopeer2-server' stdout output:
netopeer2-server[18]: Server init failed.

2017-09-26 09:58:14,142 DEBG fd 13 closed, stopped monitoring <POutputDispatcher at 140234496854136 for <Subprocess at 140234496853344 with name netopeer2-server in state STARTING> (stdout)>
2017-09-26 09:58:14,143 INFO exited: netopeer2-server (exit status 1; not expected)
2017-09-26 09:58:14,143 DEBG received SIGCLD indicating a child quit
2017-09-26 09:58:16,148 INFO spawned: 'netopeer2-server' with pid 20
2017-09-26 09:58:16,212 DEBG 'sysrepod' stdout output:
[ERR] Validation of xpath /ietf-netconf-server:netconf-server/listen/endpoint[ssh]// failed.
[ERR] Get items failed for '/ietf-netconf-server:netconf-server/listen/endpoint[ssh]//
', session id=1228402570.

2017-09-26 09:58:16,213 DEBG 'netopeer2-server' stdout output:
netopeer2-server[20]: Failed to get the next value from sysrepo iterator (Request contains unknown element).

2017-09-26 09:58:16,213 DEBG 'netopeer2-server' stdout output:
netopeer2-server[20]: Server init failed.

2017-09-26 09:58:16,218 DEBG fd 13 closed, stopped monitoring <POutputDispatcher at 140234496854136 for <Subprocess at 140234496853344 with name netopeer2-server in state STARTING> (stdout)>
2017-09-26 09:58:16,218 INFO exited: netopeer2-server (exit status 1; not expected)
2017-09-26 09:58:16,219 DEBG received SIGCLD indicating a child quit
2017-09-26 09:58:19,230 INFO spawned: 'netopeer2-server' with pid 22
2017-09-26 09:58:19,303 DEBG 'sysrepod' stdout output:
[ERR] Validation of xpath /ietf-netconf-server:netconf-server/listen/endpoint[ssh]// failed.
[ERR] Get items failed for '/ietf-netconf-server:netconf-server/listen/endpoint[ssh]//
', session id=1302330465.

2017-09-26 09:58:19,304 DEBG 'netopeer2-server' stdout output:
netopeer2-server[22]: Failed to get the next value from sysrepo iterator (Request contains unknown element).
netopeer2-server[22]: Server init failed.

2017-09-26 09:58:19,310 DEBG fd 13 closed, stopped monitoring <POutputDispatcher at 140234496854136 for <Subprocess at 140234496853344 with name netopeer2-server in state STARTING> (stdout)>
2017-09-26 09:58:19,310 INFO exited: netopeer2-server (exit status 1; not expected)
2017-09-26 09:58:19,311 DEBG received SIGCLD indicating a child quit
2017-09-26 09:58:20,315 INFO gave up: netopeer2-server entered FATAL state, too many start retries too quickly

fails to start netopeer2 server with the above error.

Is this because of Mac OS, or am I missing some step.