- 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 Errors When Configuring Junos Devices
The following sections outline errors that you might encounter when using Junos PyEZ to configure Junos devices. These sections also present potential causes and solutions for each error.
Troubleshoot Timeout Errors
Problem
Description
The Junos PyEZ code generates an RpcTimeoutError message or a TimeoutExpiredError message and fails to update the device configuration.
RpcTimeoutError(host: dc1a.example.com, cmd: commit-configuration, timeout: 30)
Cause
The default time for a NETCONF RPC to time out is 30 seconds. Large configuration changes might exceed this value causing the operation to time out before the configuration can be uploaded and committed.
Solution
To accommodate configuration changes that might require
a commit time that is longer than the default timeout interval, set
the timeout interval to an appropriate value and rerun the code. To
configure the interval, either set the Device
timeout
property to an appropriate value,
or include the timeout=seconds
argument in the commit()
or set()
method when you load and commit configuration
data on a device. For example:
dev = Device(host="host") dev.open() dev.timeout = 300 with Config(dev, mode='exclusive') as cu: cu.load(path='junos-config.conf', merge=True) cu.commit(timeout=360) dev.close()
Troubleshoot Configuration Lock Errors
Problem
Description
The Junos PyEZ code generates a LockError message indicating that the configuration cannot be locked.
LockError(severity: error, bad_element: None, message: configuration database modified)
Cause
A configuration lock error can occur for the following reasons:
Another user has an exclusive lock on the configuration.
The shared configuration database has uncommitted changes.
The user executing the Junos PyEZ code does not have permissions to configure the device.
Solution
If another user has an exclusive lock on the configuration or has modified the configuration, wait until the lock is released or the changes are committed, and execute the code again. If the cause of the issue is that the user does not have permissions to configure the device, either execute the program with a user who has the necessary permissions, or if appropriate, configure the Junos device to give the current user the necessary permissions to make the changes.
Troubleshoot Configuration Change Errors
Problem
Description
The Junos PyEZ code generates a ConfigLoadError message indicating that the configuration cannot be modified due to a permissions issue.
ConfigLoadError(severity: error, bad_element: scripts, message: permission denied)
Cause
This error message might be generated when the user executing the Junos PyEZ code has permission to alter the configuration, but does not have permission to alter the desired portion of the configuration.
Solution
Either execute the program with a user who has the necessary permissions, or if appropriate, configure the Junos device to give the current user the necessary permissions to make the changes.