cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2622
Views
0
Helpful
9
Replies

NSO getting started guide examples errors

smolz
Enthusiast
Enthusiast

Trying to run through the getting starting guide and getting errors on the first example when doing a `devices connect`

 

admin@ncs# devices connect 

connect-result {

    device c0

    result false

    info Failed to connect to device c0: connection refused: Connection refused (Connection refused)

}

connect-result {

    device c1

    result false

    info Failed to connect to device c1: connection refused: Connection refused (Connection refused)

}

connect-result {

    device c2

    result false

    info Failed to connect to device c2: connection refused: Connection refused (Connection refused)

}

admin@ncs# *** ALARM connection-failure: Failed to connect to device c0: connection refused: Connection refused (Connection refused)

admin@ncs# *** ALARM connection-failure: Failed to connect to device c2: connection refused: Connection refused (Connection refused)

admin@ncs# *** ALARM connection-failure: Failed to connect to device c1: connection refused: Connection refused (Connection refused)

admin@ncs# 

9 Replies 9

joepak
Cisco Employee
Cisco Employee

Hi,

 

I assume these are netsim devices.

 

Did you go to the requested directory and perform the desired steps?

 

Go to examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios. ### In the install directory, follow the requested path

$ ncs-netsim create-network $NCS_DIR/packages/neds/cisco-ios 3 c

then perform the:

ncs-netsim start ## starts the 3 created netsim devices

 

And try to connect to the generated netsim devices.

 

Where exactly did you stop in the documentation?

 

 

 

 

joepak
Cisco Employee
Cisco Employee

$ ncs-setup --netsim-dir ./netsim --dest .## must be defined as well.

Nicklas Wagerth
Cisco Employee
Cisco Employee

I just played with the same example and I get the same response as you if I stop my netsim devcies and then try to re-connect.

try "ncs-netsim status" and see if they are started.

 

i.e.

connect-result {

    device c2

    result false

    info Failed to connect to device c2: connection refused: Connection refused

}

[ok][2018-12-20 10:27:32]

admin@ncs> *** ALARM connection-failure: Failed to connect to device c1: connection refused: Connection refused

:~/nso-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios$ ncs-netsim status

DEVICE c0

connection refused (status)

DEVICE c1

connection refused (status)

DEVICE c2

connection refused (status)

I have tried on both Mac and Ubuntu. See the 2 sections below

 

On mac:

=> ncs-netsim status
DEVICE c0
./env.sh: line 12: export: `Fusion.app/Contents/Public:/Library/TeX/texbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/bin:/Users/smolz/bin:/Users/smolz/.rvm/bin:/Users/smolz/.rvm/bin': not a valid identifier
vsn: 6.7
SMP support: no
Using epoll: no
available modules: backplane,netconf,cdb,cli,snmp,webui
running modules: backplane,netconf,cdb,cli
status: started
namespaces: urn:ietf:params:xml:ns:yang:iana-crypt-hash prefix:ianach exported to: all
            urn:ietf:params:xml:ns:yang:ietf-inet-types prefix:inet exported to: all
            urn:ietf:params:xml:ns:yang:ietf-netconf-acm prefix:nacm exported to: none
            urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring prefix:ncm exported to: all
            urn:ietf:params:xml:ns:yang:ietf-netconf-notifications prefix:ncn exported to: all
            urn:ietf:params:xml:ns:yang:ietf-restconf prefix:rc exported to: rest
            urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring prefix:rcmon exported to: all
            urn:ietf:params:xml:ns:yang:ietf-yang-library prefix:yanglib exported to: netconf,rest
            urn:ietf:params:xml:ns:yang:ietf-yang-patch prefix:ypatch exported to: rest
            urn:ietf:params:xml:ns:yang:ietf-yang-types prefix:yang exported to: all
            http://tail-f.com/ns/aaa/1.1 prefix:aaa exported to: none
            http://tail-f.com/yang/acm prefix:tacm exported to: all
            http://tail-f.com/yang/common prefix:tailf exported to: all
            http://tail-f.com/yang/common-monitoring prefix:tfcg exported to: all
            http://tail-f.com/ns/common/query prefix:tfcq exported to: all
            http://tail-f.com/yang/confd-monitoring prefix:tfcm exported to: all
            http://tail-f.com/ns/kicker prefix:kicker exported to: all
            urn:ios prefix:ios exported to: all
            http://tail-f.com/yang/netconf-monitoring prefix:tncm exported to: all
            http://tail-f.com/ns/progress prefix:progress exported to: all
            http://tail-f.com/ns/rollback prefix:rollback exported to: rest,netconf,maapi
            http://tail-f.com/ns/webui prefix:webui exported to: all
            http://tail-f.com/yang/xsd-types prefix:xs exported to: all

YANG data models: 
  module: iana-crypt-hash revision: 2014-08-06
    namespace: urn:ietf:params:xml:ns:yang:iana-crypt-hash
    prefix: ianach
    exported to: all
  module: ietf-inet-types revision: 2013-07-15
    namespace: urn:ietf:params:xml:ns:yang:ietf-inet-types
    prefix: inet
    exported to: all
  module: ietf-netconf-acm revision: 2012-02-22
    namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-acm
    prefix: nacm
    exported to: none
  module: ietf-netconf-monitoring revision: 2010-10-04
    namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring
    prefix: ncm
    exported to: all
  module: ietf-netconf-notifications revision: 2012-02-06
    namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-notifications
    prefix: ncn
    exported to: all
  module: ietf-restconf revision: 2017-01-26
    namespace: urn:ietf:params:xml:ns:yang:ietf-restconf
    prefix: rc
    exported to: rest
  module: ietf-restconf-monitoring revision: 2017-01-26
    namespace: urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring
    prefix: rcmon
    exported to: all
  module: ietf-yang-library revision: 2016-06-21
    namespace: urn:ietf:params:xml:ns:yang:ietf-yang-library
    prefix: yanglib
    exported to: netconf,rest
  module: ietf-yang-patch revision: 2017-02-22
    namespace: urn:ietf:params:xml:ns:yang:ietf-yang-patch
    prefix: ypatch
    exported to: rest
  module: ietf-yang-types revision: 2013-07-15
    namespace: urn:ietf:params:xml:ns:yang:ietf-yang-types
    prefix: yang
    exported to: all
  module: tailf-aaa revision: 2015-06-16
    namespace: http://tail-f.com/ns/aaa/1.1
    prefix: aaa
    exported to: none
  module: tailf-acm revision: 2013-03-07
    namespace: http://tail-f.com/yang/acm
    prefix: tacm
    exported to: all
  module: tailf-common revision: 2018-04-19
    namespace: http://tail-f.com/yang/common
    prefix: tailf
    exported to: all
  module: tailf-common-monitoring revision: 2013-06-14
    namespace: http://tail-f.com/yang/common-monitoring
    prefix: tfcg
    exported to: all
  module: tailf-common-query revision: 2017-12-15
    namespace: http://tail-f.com/ns/common/query
    prefix: tfcq
    exported to: all
  module: tailf-confd-monitoring revision: 2013-06-14
    namespace: http://tail-f.com/yang/confd-monitoring
    prefix: tfcm
    exported to: all
  module: tailf-kicker revision: 2017-09-28
    namespace: http://tail-f.com/ns/kicker
    prefix: kicker
    exported to: all
  module: tailf-ned-cisco-ios revision: 2014-02-12
    namespace: urn:ios
    prefix: ios
    exported to: all
  module: tailf-netconf-monitoring revision: 2016-11-24
    namespace: http://tail-f.com/yang/netconf-monitoring
    prefix: tncm
    exported to: all
  module: tailf-progress revision: 2018-06-21
    namespace: http://tail-f.com/ns/progress
    prefix: progress
    exported to: all
  module: tailf-rollback revision: 2018-01-12
    namespace: http://tail-f.com/ns/rollback
    prefix: rollback
    exported to: rest,netconf,maapi
  module: tailf-webui revision: 2013-03-07
    namespace: http://tail-f.com/ns/webui
    prefix: webui
    exported to: all
  module: tailf-xsd-types revision: 2017-11-20
    namespace: http://tail-f.com/yang/xsd-types
    prefix: xs
    exported to: all

user sessions:
  

system sessions:
  sessionId=1 2018-12-20 08:52:14 system@0.0.0.0 system/system
       no locks set
       no transactions
  sessionId=10 2018-12-20 08:52:14 system@0.0.0.0 system/system
       no locks set
       no transactions
  sessionId=11 2018-12-20 08:52:14 system@0.0.0.0 system/system
       no locks set
       no transactions
  sessionId=12 2018-12-20 08:52:14 system@0.0.0.0 system/system
       no locks set
       transactions:
          tid=7 db=running mode=read

callpoints:

validation points:

actionpoints:

typepoints:

notification stream replay support:

SNMP inform delivery callbacks:

SNMP notification subscriptions:

authentication callback:
  not enabled

authorization callbacks:
  not enabled

error formatting callbacks:

partial running locks: 

partial candidate locks: 

partial startup locks: 

cdb:
  current transaction id: 1545-324734-697436
  running:
      ram size: 17.3 kB
      read locks: 0
      write lock: unset
  startup:
      filename: ./cdb/A.cdb
      disk size: 2.0 kB
      ram size: 17.1 kB
      read locks: 0
      write lock: unset
  operational:
      filename: ./cdb/O.cdb
      disk size: 4 bytes
      ram size: 136 bytes
      subscription lock: unset
  no pending subscription notifications
  no registered cdb clients

tts alloc:
  43175 40:50:20 64:280:0 72:35:0 120:10:0 176:57:246
DEVICE c1
./env.sh: line 12: export: `Fusion.app/Contents/Public:/Library/TeX/texbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/bin:/Users/smolz/bin:/Users/smolz/.rvm/bin:/Users/smolz/.rvm/bin': not a valid identifier
vsn: 6.7
SMP support: no
Using epoll: no
available modules: backplane,netconf,cdb,cli,snmp,webui
running modules: backplane,netconf,cdb,cli
status: started
namespaces: urn:ietf:params:xml:ns:yang:iana-crypt-hash prefix:ianach exported to: all
            urn:ietf:params:xml:ns:yang:ietf-inet-types prefix:inet exported to: all
            urn:ietf:params:xml:ns:yang:ietf-netconf-acm prefix:nacm exported to: none
            urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring prefix:ncm exported to: all
            urn:ietf:params:xml:ns:yang:ietf-netconf-notifications prefix:ncn exported to: all
            urn:ietf:params:xml:ns:yang:ietf-restconf prefix:rc exported to: rest
            urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring prefix:rcmon exported to: all
            urn:ietf:params:xml:ns:yang:ietf-yang-library prefix:yanglib exported to: netconf,rest
            urn:ietf:params:xml:ns:yang:ietf-yang-patch prefix:ypatch exported to: rest
            urn:ietf:params:xml:ns:yang:ietf-yang-types prefix:yang exported to: all
            http://tail-f.com/ns/aaa/1.1 prefix:aaa exported to: none
            http://tail-f.com/yang/acm prefix:tacm exported to: all
            http://tail-f.com/yang/common prefix:tailf exported to: all
            http://tail-f.com/yang/common-monitoring prefix:tfcg exported to: all
            http://tail-f.com/ns/common/query prefix:tfcq exported to: all
            http://tail-f.com/yang/confd-monitoring prefix:tfcm exported to: all
            http://tail-f.com/ns/kicker prefix:kicker exported to: all
            urn:ios prefix:ios exported to: all
            http://tail-f.com/yang/netconf-monitoring prefix:tncm exported to: all
            http://tail-f.com/ns/progress prefix:progress exported to: all
            http://tail-f.com/ns/rollback prefix:rollback exported to: rest,netconf,maapi
            http://tail-f.com/ns/webui prefix:webui exported to: all
            http://tail-f.com/yang/xsd-types prefix:xs exported to: all

YANG data models: 
  module: iana-crypt-hash revision: 2014-08-06
    namespace: urn:ietf:params:xml:ns:yang:iana-crypt-hash
    prefix: ianach
    exported to: all
  module: ietf-inet-types revision: 2013-07-15
    namespace: urn:ietf:params:xml:ns:yang:ietf-inet-types
    prefix: inet
    exported to: all
  module: ietf-netconf-acm revision: 2012-02-22
    namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-acm
    prefix: nacm
    exported to: none
  module: ietf-netconf-monitoring revision: 2010-10-04
    namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring
    prefix: ncm
    exported to: all
  module: ietf-netconf-notifications revision: 2012-02-06
    namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-notifications
    prefix: ncn
    exported to: all
  module: ietf-restconf revision: 2017-01-26
    namespace: urn:ietf:params:xml:ns:yang:ietf-restconf
    prefix: rc
    exported to: rest
  module: ietf-restconf-monitoring revision: 2017-01-26
    namespace: urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring
    prefix: rcmon
    exported to: all
  module: ietf-yang-library revision: 2016-06-21
    namespace: urn:ietf:params:xml:ns:yang:ietf-yang-library
    prefix: yanglib
    exported to: netconf,rest
  module: ietf-yang-patch revision: 2017-02-22
    namespace: urn:ietf:params:xml:ns:yang:ietf-yang-patch
    prefix: ypatch
    exported to: rest
  module: ietf-yang-types revision: 2013-07-15
    namespace: urn:ietf:params:xml:ns:yang:ietf-yang-types
    prefix: yang
    exported to: all
  module: tailf-aaa revision: 2015-06-16
    namespace: http://tail-f.com/ns/aaa/1.1
    prefix: aaa
    exported to: none
  module: tailf-acm revision: 2013-03-07
    namespace: http://tail-f.com/yang/acm
    prefix: tacm
    exported to: all
  module: tailf-common revision: 2018-04-19
    namespace: http://tail-f.com/yang/common
    prefix: tailf
    exported to: all
  module: tailf-common-monitoring revision: 2013-06-14
    namespace: http://tail-f.com/yang/common-monitoring
    prefix: tfcg
    exported to: all
  module: tailf-common-query revision: 2017-12-15
    namespace: http://tail-f.com/ns/common/query
    prefix: tfcq
    exported to: all
  module: tailf-confd-monitoring revision: 2013-06-14
    namespace: http://tail-f.com/yang/confd-monitoring
    prefix: tfcm
    exported to: all
  module: tailf-kicker revision: 2017-09-28
    namespace: http://tail-f.com/ns/kicker
    prefix: kicker
    exported to: all
  module: tailf-ned-cisco-ios revision: 2014-02-12
    namespace: urn:ios
    prefix: ios
    exported to: all
  module: tailf-netconf-monitoring revision: 2016-11-24
    namespace: http://tail-f.com/yang/netconf-monitoring
    prefix: tncm
    exported to: all
  module: tailf-progress revision: 2018-06-21
    namespace: http://tail-f.com/ns/progress
    prefix: progress
    exported to: all
  module: tailf-rollback revision: 2018-01-12
    namespace: http://tail-f.com/ns/rollback
    prefix: rollback
    exported to: rest,netconf,maapi
  module: tailf-webui revision: 2013-03-07
    namespace: http://tail-f.com/ns/webui
    prefix: webui
    exported to: all
  module: tailf-xsd-types revision: 2017-11-20
    namespace: http://tail-f.com/yang/xsd-types
    prefix: xs
    exported to: all

user sessions:
  

system sessions:
  sessionId=1 2018-12-20 08:52:15 system@0.0.0.0 system/system
       no locks set
       no transactions
  sessionId=10 2018-12-20 08:52:15 system@0.0.0.0 system/system
       no locks set
       no transactions
  sessionId=11 2018-12-20 08:52:15 system@0.0.0.0 system/system
       no locks set
       no transactions
  sessionId=12 2018-12-20 08:52:15 system@0.0.0.0 system/system
       no locks set
       transactions:
          tid=7 db=running mode=read

callpoints:

validation points:

actionpoints:

typepoints:

notification stream replay support:

SNMP inform delivery callbacks:

SNMP notification subscriptions:

authentication callback:
  not enabled

authorization callbacks:
  not enabled

error formatting callbacks:

partial running locks: 

partial candidate locks: 

partial startup locks: 

cdb:
  current transaction id: 1545-324735-936486
  running:
      ram size: 17.2 kB
      read locks: 0
      write lock: unset
  startup:
      filename: ./cdb/A.cdb
      disk size: 2.0 kB
      ram size: 17.1 kB
      read locks: 0
      write lock: unset
  operational:
      filename: ./cdb/O.cdb
      disk size: 4 bytes
      ram size: 136 bytes
      subscription lock: unset
  no pending subscription notifications
  no registered cdb clients

tts alloc:
  43191 40:50:20 64:284:0 72:30:0 120:11:0 176:57:246
DEVICE c2
./env.sh: line 12: export: `Fusion.app/Contents/Public:/Library/TeX/texbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/bin:/Users/smolz/bin:/Users/smolz/.rvm/bin:/Users/smolz/.rvm/bin': not a valid identifier
vsn: 6.7
SMP support: no
Using epoll: no
available modules: backplane,netconf,cdb,cli,snmp,webui
running modules: backplane,netconf,cdb,cli
status: started
namespaces: urn:ietf:params:xml:ns:yang:iana-crypt-hash prefix:ianach exported to: all
            urn:ietf:params:xml:ns:yang:ietf-inet-types prefix:inet exported to: all
            urn:ietf:params:xml:ns:yang:ietf-netconf-acm prefix:nacm exported to: none
            urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring prefix:ncm exported to: all
            urn:ietf:params:xml:ns:yang:ietf-netconf-notifications prefix:ncn exported to: all
            urn:ietf:params:xml:ns:yang:ietf-restconf prefix:rc exported to: rest
            urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring prefix:rcmon exported to: all
            urn:ietf:params:xml:ns:yang:ietf-yang-library prefix:yanglib exported to: netconf,rest
            urn:ietf:params:xml:ns:yang:ietf-yang-patch prefix:ypatch exported to: rest
            urn:ietf:params:xml:ns:yang:ietf-yang-types prefix:yang exported to: all
            http://tail-f.com/ns/aaa/1.1 prefix:aaa exported to: none
            http://tail-f.com/yang/acm prefix:tacm exported to: all
            http://tail-f.com/yang/common prefix:tailf exported to: all
            http://tail-f.com/yang/common-monitoring prefix:tfcg exported to: all
            http://tail-f.com/ns/common/query prefix:tfcq exported to: all
            http://tail-f.com/yang/confd-monitoring prefix:tfcm exported to: all
            http://tail-f.com/ns/kicker prefix:kicker exported to: all
            urn:ios prefix:ios exported to: all
            http://tail-f.com/yang/netconf-monitoring prefix:tncm exported to: all
            http://tail-f.com/ns/progress prefix:progress exported to: all
            http://tail-f.com/ns/rollback prefix:rollback exported to: rest,netconf,maapi
            http://tail-f.com/ns/webui prefix:webui exported to: all
            http://tail-f.com/yang/xsd-types prefix:xs exported to: all

YANG data models: 
  module: iana-crypt-hash revision: 2014-08-06
    namespace: urn:ietf:params:xml:ns:yang:iana-crypt-hash
    prefix: ianach
    exported to: all
  module: ietf-inet-types revision: 2013-07-15
    namespace: urn:ietf:params:xml:ns:yang:ietf-inet-types
    prefix: inet
    exported to: all
  module: ietf-netconf-acm revision: 2012-02-22
    namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-acm
    prefix: nacm
    exported to: none
  module: ietf-netconf-monitoring revision: 2010-10-04
    namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring
    prefix: ncm
    exported to: all
  module: ietf-netconf-notifications revision: 2012-02-06
    namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-notifications
    prefix: ncn
    exported to: all
  module: ietf-restconf revision: 2017-01-26
    namespace: urn:ietf:params:xml:ns:yang:ietf-restconf
    prefix: rc
    exported to: rest
  module: ietf-restconf-monitoring revision: 2017-01-26
    namespace: urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring
    prefix: rcmon
    exported to: all
  module: ietf-yang-library revision: 2016-06-21
    namespace: urn:ietf:params:xml:ns:yang:ietf-yang-library
    prefix: yanglib
    exported to: netconf,rest
  module: ietf-yang-patch revision: 2017-02-22
    namespace: urn:ietf:params:xml:ns:yang:ietf-yang-patch
    prefix: ypatch
    exported to: rest
  module: ietf-yang-types revision: 2013-07-15
    namespace: urn:ietf:params:xml:ns:yang:ietf-yang-types
    prefix: yang
    exported to: all
  module: tailf-aaa revision: 2015-06-16
    namespace: http://tail-f.com/ns/aaa/1.1
    prefix: aaa
    exported to: none
  module: tailf-acm revision: 2013-03-07
    namespace: http://tail-f.com/yang/acm
    prefix: tacm
    exported to: all
  module: tailf-common revision: 2018-04-19
    namespace: http://tail-f.com/yang/common
    prefix: tailf
    exported to: all
  module: tailf-common-monitoring revision: 2013-06-14
    namespace: http://tail-f.com/yang/common-monitoring
    prefix: tfcg
    exported to: all
  module: tailf-common-query revision: 2017-12-15
    namespace: http://tail-f.com/ns/common/query
    prefix: tfcq
    exported to: all
  module: tailf-confd-monitoring revision: 2013-06-14
    namespace: http://tail-f.com/yang/confd-monitoring
    prefix: tfcm
    exported to: all
  module: tailf-kicker revision: 2017-09-28
    namespace: http://tail-f.com/ns/kicker
    prefix: kicker
    exported to: all
  module: tailf-ned-cisco-ios revision: 2014-02-12
    namespace: urn:ios
    prefix: ios
    exported to: all
  module: tailf-netconf-monitoring revision: 2016-11-24
    namespace: http://tail-f.com/yang/netconf-monitoring
    prefix: tncm
    exported to: all
  module: tailf-progress revision: 2018-06-21
    namespace: http://tail-f.com/ns/progress
    prefix: progress
    exported to: all
  module: tailf-rollback revision: 2018-01-12
    namespace: http://tail-f.com/ns/rollback
    prefix: rollback
    exported to: rest,netconf,maapi
  module: tailf-webui revision: 2013-03-07
    namespace: http://tail-f.com/ns/webui
    prefix: webui
    exported to: all
  module: tailf-xsd-types revision: 2017-11-20
    namespace: http://tail-f.com/yang/xsd-types
    prefix: xs
    exported to: all

user sessions:
  

system sessions:
  sessionId=1 2018-12-20 08:52:16 system@0.0.0.0 system/system
       no locks set
       no transactions
  sessionId=10 2018-12-20 08:52:17 system@0.0.0.0 system/system
       no locks set
       no transactions
  sessionId=11 2018-12-20 08:52:17 system@0.0.0.0 system/system
       no locks set
       no transactions
  sessionId=12 2018-12-20 08:52:17 system@0.0.0.0 system/system
       no locks set
       transactions:
          tid=7 db=running mode=read

callpoints:

validation points:

actionpoints:

typepoints:

notification stream replay support:

SNMP inform delivery callbacks:

SNMP notification subscriptions:

authentication callback:
  not enabled

authorization callbacks:
  not enabled

error formatting callbacks:

partial running locks: 

partial candidate locks: 

partial startup locks: 

cdb:
  current transaction id: 1545-324737-174921
  running:
      ram size: 17.1 kB
      read locks: 0
      write lock: unset
  startup:
      filename: ./cdb/A.cdb
      disk size: 2.0 kB
      ram size: 17.1 kB
      read locks: 0
      write lock: unset
  operational:
      filename: ./cdb/O.cdb
      disk size: 4 bytes
      ram size: 136 bytes
      subscription lock: unset
  no pending subscription notifications
  no registered cdb clients

tts alloc:
  43039 40:50:20 64:285:0 72:32:0 120:8:0 176:57:246
_______________________________________
| ~/ncs-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios @ iMacistan (smolz) 
| => 

 

 

 

On Ubuntu:

 

ubuntu:~/nso-4.7/examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios$ ncs-netsim status
DEVICE c0
connection refused (status)
DEVICE c1
connection refused (status)
DEVICE c2
connection refused (status)

 

joepak
Cisco Employee
Cisco Employee

Hi, so i think i know what the issue is/was.

 

Josephs-MacBook-Pro:1-simulated-cisco-ios jleepak$ ncs-setup --netsim-dir ./netsim --dest .
Using netsim dir ./netsim

 

I stopped NSO due to my previous instance being up via ncs --stop. Started NSO

 

Josephs-MacBook-Pro:1-simulated-cisco-ios jleepak$ ncs
Josephs-MacBook-Pro:1-simulated-cisco-ios jleepak$ ncs_cli -C -u admin

admin connected from 127.0.0.1 using console on Josephs-MacBook-Pro.local
admin@ncs# show devices list
NAME  ADDRESS    DESCRIPTION  NED ID     ADMIN STATE  
----------------------------------------------------
c0    127.0.0.1  -            cisco-ios  unlocked     
c1    127.0.0.1  -            cisco-ios  unlocked     
c2    127.0.0.1  -            cisco-ios  unlocked     
admin@ncs# devices connect
connect-result {
    device c0
    result true
    info (admin) Connected to c0 - 127.0.0.1:10022
}

 

What I think you did was forgetting to set up the netsim-dir in the examples.ncs/getting-started/using-ncs/1-simulated-cisco-ios directory.

 

You must remain in the directory of the desired samples.

Not true. I did follow the examples. set the netsim folder to the examples folder.

I got the same error , connection refused.

 

Here is what I did:

JOEPAK-M-21L8:using-ncs jleepak$ pwd
/Users/jleepak/nso/471/install/examples.ncs/getting-started/using-ncs
JOEPAK-M-21L8:using-ncs jleepak$ ls
0-hello-world 4-netconf-device 8-ssh-keys
1-simulated-cisco-ios 5-snmp-alarm-northbound README
2-real-device-cisco-ios 6-access-lists
3-real-device-juniper 7-scripting
JOEPAK-M-21L8:using-ncs jleepak$ cd 1-simulated-cisco-ios/
JOEPAK-M-21L8:1-simulated-cisco-ios jleepak$ ls
README README.netsim ncs-cdb netsim scripts
README.ncs logs ncs.conf packages state
JOEPAK-M-21L8:1-simulated-cisco-ios jleepak$ pwd
/Users/jleepak/nso/471/install/examples.ncs/getting-started/using-ncs/1-simulated-ciscoJOJOEPAK-M-JOEPAK-M-JOEPAJOEPJOEPAK-M-21L8:1-simulated-cisco-ios jleepak$ ncs-setup --netsim-dir ./netsim --dest .
Using netsim dir ./netsim
JOEPAK-M-21L8:1-simulated-cisco-ios jleepak$ ncs --stop
ncsJOEPAK-M-21L8:1-simulated-cisco-ios jleepak$ ncs
JOEPAK-M-21L8:1-simulated-cisco-ios jleepak$ ncs_cli -u admin

admin connected from 127.0.0.1 using console on JOEPAK-M-21L8
admin@ncs> switch cli
admin@ncs# show devices list
NAME ADDRESS DESCRIPTION NED ID ADMIN STATE
----------------------------------------------------
c0 127.0.0.1 - cisco-ios unlocked
c1 127.0.0.1 - cisco-ios unlocked
c2 127.0.0.1 - cisco-ios unlocked


Can you show me step by step how you are performing this? Can you perform 'pwd' and proceed with trying to generate the samples?

admin@ncs# devices connect
connect-result {
device c0
result false
info Failed to connect to device c0: connection refused: Connection refused (Connection refused)
}
connect-result {
device c1
result false
info Failed to connect to device c1: connection refused: Connection refused (Connection refused)
}
connect-result {
device c2
result false
info Failed to connect to device c2: connection refused: Connection refused (Connection refused)
}
admin@ncs# exit
JOEPAK-M-21L8:1-simulated-cisco-ios jleepak$ ncs-netsim restart
DEVICE c0 already STOPPED
DEVICE c1 already STOPPED
DEVICE c2 already STOPPED
DEVICE c0 RESET
DEVICE c1 RESET
DEVICE c2 RESET
DEVICE c0 OK STARTED
DEVICE c1 OK STARTED
DEVICE c2 OK STARTED
JOEPAK-M-21L8:1-simulated-cisco-ios jleepak$ ncs_cli -u admin

admin connected from 127.0.0.1 using console on JOEPAK-M-21L8
admin@ncs> switch cli
admin@ncs# devices connect
connect-result {
device c0
result true
info (admin) Connected to c0 - 127.0.0.1:10022
}
connect-result {
device c1
result true
info (admin) Connected to c1 - 127.0.0.1:10023
}
connect-result {
device c2
result true
info (admin) Connected to c2 - 127.0.0.1:10024

joepak
Cisco Employee
Cisco Employee
For reference as well:

JOEPAK-M-21L8:1-simulated-cisco-ios jleepak$ ncs-netsim status
DEVICE c0
vsn: 6.7.2
SMP support: no
Using epoll: no
available modules: backplane,netconf,cdb,cli,snmp,webui
running modules: backplane,netconf,cdb,cli
status: started
namespaces: urn:ietf:params:xml:ns:yang:iana-crypt-hash prefix:ianach exported to: all
urn:ietf:params:xml:ns:yang:ietf-inet-types prefix:inet exported to: all
urn:ietf:params:xml:ns:yang:ietf-netconf-acm prefix:nacm exported to: none
urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring prefix:ncm exported to: all
urn:ietf:params:xml:ns:yang:ietf-netconf-notifications prefix:ncn exported to: all
urn:ietf:params:xml:ns:yang:ietf-restconf prefix:rc exported to: rest
urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring prefix:rcmon exported to: all
urn:ietf:params:xml:ns:yang:ietf-yang-library prefix:yanglib exported to: netconf,rest
urn:ietf:params:xml:ns:yang:ietf-yang-patch prefix:ypatch exported to: rest
urn:ietf:params:xml:ns:yang:ietf-yang-types prefix:yang exported to: all
http://tail-f.com/ns/aaa/1.1 prefix:aaa exported to: none
http://tail-f.com/yang/acm prefix:tacm exported to: all
http://tail-f.com/yang/common prefix:tailf exported to: all
http://tail-f.com/yang/common-monitoring prefix:tfcg exported to: all
http://tail-f.com/ns/common/query prefix:tfcq exported to: all
http://tail-f.com/yang/confd-monitoring prefix:tfcm exported to: all
http://tail-f.com/ns/kicker prefix:kicker exported to: all
urn:ios prefix:ios exported to: all
http://tail-f.com/yang/netconf-monitoring prefix:tncm exported to: all
http://tail-f.com/ns/progress prefix:progress exported to: all
http://tail-f.com/ns/rollback prefix:rollback exported to: rest,netconf,maapi
http://tail-f.com/ns/webui prefix:webui exported to: all
http://tail-f.com/yang/xsd-types prefix:xs exported to: all

YANG data models:
module: iana-crypt-hash revision: 2014-08-06
namespace: urn:ietf:params:xml:ns:yang:iana-crypt-hash
prefix: ianach
exported to: all
module: ietf-inet-types revision: 2013-07-15
namespace: urn:ietf:params:xml:ns:yang:ietf-inet-types
prefix: inet
exported to: all
module: ietf-netconf-acm revision: 2012-02-22
namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-acm
prefix: nacm
exported to: none
module: ietf-netconf-monitoring revision: 2010-10-04
namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring
prefix: ncm
exported to: all
module: ietf-netconf-notifications revision: 2012-02-06
namespace: urn:ietf:params:xml:ns:yang:ietf-netconf-notifications
prefix: ncn
exported to: all
module: ietf-restconf revision: 2017-01-26
namespace: urn:ietf:params:xml:ns:yang:ietf-restconf
prefix: rc
exported to: rest
module: ietf-restconf-monitoring revision: 2017-01-26
namespace: urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring
prefix: rcmon
exported to: all
module: ietf-yang-library revision: 2016-06-21
namespace: urn:ietf:params:xml:ns:yang:ietf-yang-library
prefix: yanglib
exported to: netconf,rest
module: ietf-yang-patch revision: 2017-02-22
namespace: urn:ietf:params:xml:ns:yang:ietf-yang-patch
prefix: ypatch
exported to: rest
module: ietf-yang-types revision: 2013-07-15
namespace: urn:ietf:params:xml:ns:yang:ietf-yang-types
prefix: yang
exported to: all
module: tailf-aaa revision: 2018-09-12
namespace: http://tail-f.com/ns/aaa/1.1
prefix: aaa
exported to: none
module: tailf-acm revision: 2013-03-07
namespace: http://tail-f.com/yang/acm
prefix: tacm
exported to: all
module: tailf-common revision: 2018-11-12
namespace: http://tail-f.com/yang/common
prefix: tailf
exported to: all
module: tailf-common-monitoring revision: 2013-06-14
namespace: http://tail-f.com/yang/common-monitoring
prefix: tfcg
exported to: all
module: tailf-common-query revision: 2017-12-15
namespace: http://tail-f.com/ns/common/query
prefix: tfcq
exported to: all
module: tailf-confd-monitoring revision: 2013-06-14
namespace: http://tail-f.com/yang/confd-monitoring
prefix: tfcm
exported to: all
module: tailf-kicker revision: 2017-09-28
namespace: http://tail-f.com/ns/kicker
prefix: kicker
exported to: all
module: tailf-ned-cisco-ios revision: 2014-02-12
namespace: urn:ios
prefix: ios
exported to: all
module: tailf-netconf-monitoring revision: 2016-11-24
namespace: http://tail-f.com/yang/netconf-monitoring
prefix: tncm
exported to: all
module: tailf-progress revision: 2018-06-21
namespace: http://tail-f.com/ns/progress
prefix: progress
exported to: all
module: tailf-rollback revision: 2018-01-12
namespace: http://tail-f.com/ns/rollback
prefix: rollback
exported to: rest,netconf,maapi
module: tailf-webui revision: 2013-03-07
namespace: http://tail-f.com/ns/webui
prefix: webui
exported to: all
module: tailf-xsd-types revision: 2017-11-20
namespace: http://tail-f.com/yang/xsd-types
prefix: xs
exported to: all

user sessions:


system sessions:
sessionId=1 2019-02-11 15:50:56 system@0.0.0.0 system/system
no locks set
no transactions
sessionId=10 2019-02-11 15:50:57 system@0.0.0.0 system/system
no locks set
no transactions
sessionId=11 2019-02-11 15:50:57 system@0.0.0.0 system/system
no locks set
no transactions
sessionId=12 2019-02-11 15:50:57 system@0.0.0.0 system/system
no locks set
transactions:
tid=7 db=running mode=read

callpoints:

validation points:

actionpoints:

typepoints:

notification stream replay support:

SNMP inform delivery callbacks:

SNMP notification subscriptions:

authentication callback:
not enabled

authorization callbacks:
not enabled

error formatting callbacks:

partial running locks:

partial candidate locks:

partial startup locks:

cdb:
current transaction id: 1549-921857-158880
running:
ram size: 17.2 kB
read locks: 0
write lock: unset
startup:
filename: ./cdb/A.cdb
disk size: 2.0 kB
ram size: 17.1 kB
read locks: 0
write lock: unset
operational:
filename: ./cdb/O.cdb
disk size: 4 bytes
ram size: 136 bytes
subscription lock: unset
no pending subscription notifications
no registered cdb clients

tts alloc:
43263 40:50:20 64:274:0 72:40:0 120:11:0 176:57:246


-----
I see this in your status:

DEVICE c0
./env.sh: line 12: export: `Fusion.app/Contents/Public:/Library/TeX/texbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/bin:/Users/smolz/bin:/Users/smolz/.rvm/bin:/Users/smolz/.rvm/bin': not a valid identifier
vsn: 6.7

I'm not sure if that affects the netsim, but i notice i do not have that in my status output. What device are you trying to run the samples on?
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community:

Recognize Your Peers