Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

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:

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.

Solution

If NETCONF is not enabled on the Junos device, enable NETCONF.

If the number of NETCONF sessions exceeds the limit, increase the maximum number of permitted sessions up to 250. The default is 75.