- play_arrow Disclaimer
- play_arrow Junos PyEZ Overview
- play_arrow Install Junos PyEZ
- play_arrow Connect to and Retrieve Facts From a Device Using Junos PyEZ
- play_arrow Use Junos PyEZ to Manage Device Operations
- Use Junos PyEZ to Execute RPCs on Junos Devices
- Suppress RpcError Exceptions Raised for Warnings in Junos PyEZ Applications
- Use Junos PyEZ to Halt, Reboot, or Shut Down Junos Devices
- Use Junos PyEZ to Install Software on Junos Devices
- Use Junos PyEZ to Perform File System Operations
- Transfer Files Using Junos PyEZ
- Specify the XML Parser for a Junos PyEZ Session
- play_arrow Use Junos PyEZ to Manage the Configuration
- Use Junos PyEZ to Retrieve a Configuration
- Use Junos PyEZ to Compare the Candidate Configuration and a Previously Committed Configuration
- Use Junos PyEZ to Configure Junos Devices
- Use the Junos PyEZ Config Utility to Configure Junos Devices
- Use Junos PyEZ to Commit the Configuration
- Example: Use Junos PyEZ to Load Configuration Data from a File
- Example: Use Junos PyEZ to Roll Back the Configuration
- Use Junos PyEZ to Manage the Rescue Configuration on Junos Devices
- play_arrow Create and Use Junos PyEZ Tables and Views
- Understanding Junos PyEZ Tables and Views
- Predefined Junos PyEZ Operational Tables (Structured Output)
- Load Inline or External Tables and Views in Junos PyEZ Applications
- Define Junos PyEZ Operational Tables for Parsing Structured Output
- Define Views for Junos PyEZ Operational Tables that Parse Structured Output
- Use Junos PyEZ Operational Tables and Views that Parse Structured Output
- Define Junos PyEZ Operational Tables for Parsing Unstructured Output
- Define Views for Junos PyEZ Operational Tables that Parse Unstructured Output
- Use Junos PyEZ Tables with TextFSM Templates
- Use Junos PyEZ Operational Tables and Views that Parse Unstructured Output
- Define Junos PyEZ Configuration Tables
- Define Views for Junos PyEZ Configuration Tables
- Use Junos PyEZ Configuration Tables to Retrieve Configuration Data
- Overview of Using Junos PyEZ Configuration Tables to Define and Configure Structured Resources
- Use Junos PyEZ Configuration Tables to Configure Structured Resources on Junos Devices
- Save and Load Junos PyEZ Table XML to and from Files
Troubleshoot Junos PyEZ Connection Errors
Problem
Description
When using Junos PyEZ to manage Junos devices, the code generates an error that the connection was refused. For example:
jnpr.junos.exception.ConnectRefusedError
Cause
NETCONF is not enabled on the device or the number of connections exceeds the limit.
The most likely cause for a refused connection error is that NETCONF over SSH is not enabled on the Junos device. To quickly test whether NETCONF is enabled, verify that the user account can successfully start a NETCONF session with the device.
[user@server]$ ssh user@R1.example.com -p 830 -s netconf
Solution
If NETCONF is not enabled on the Junos device, enable NETCONF.
[edit] user@R1# set system services netconf ssh user@R1# commit
If the number of NETCONF sessions exceeds the limit, increase the maximum number of permitted sessions up to 250. The default is 75.
[edit] user@R1# set system services netconf ssh connection-limit limit user@R1# commit