Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Ansible for Junos OS 문제 해결 요약

표 1 에는 Ansible 모듈을 사용하여 juniper.device 주니퍼 네트웍스 디바이스를 관리할 때 발생할 수 있는 몇 가지 일반적인 오류가 나와 있습니다. 각 문제에 대해 이 표는 오류 및 문제 해결을 위한 잠재적 솔루션에 대한 추가 정보가 포함된 참조를 제공합니다. 그러나 모든 환경은 고유하며 제안된 솔루션이 모든 경우에 작동하지 않을 수 있습니다.

표 1: Junos OS 오류에 대한 Ansible
일반 문제 샘플 오류 참고

Junos PyEZ
(junos-eznc) 라이브러리 오류

  • "msg": "junos-eznc is required but does not appear to be installed. It can be installed using 'pip install junos-eznc'"

Ansible 모듈에 대한 Junos PyEZ(junos-eznc) 설치 오류 문제 해결

Ansible 수집 및 모듈 확인 오류

  • ERROR! couldn't resolve module/action 'module-name'. This often indicates a misspelling, missing collection, or incorrect module path.

  • ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

Junos 디바이스 관리 시 Ansible 수집 및 모듈 오류 문제 해결

외부 연결 플러그인 오류
(AttributeError: 'Connection')

(Ansible ansible-core 버전 >= 2.12.9에서 발생)

  • AttributeError: 'Connection' object has no attribute 'nonetype'

트리거 오류를 설정_sub_plugin하지 않는 외부 연결 플러그인

연결할 수 없는 호스트

  • UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ", "unreachable": true}

연결 실패, 알 수 없는 명령 또는 인터프리터를 찾을 수 없음 오류 문제 해결

모듈 인터프리터를 찾을 수 없음/알 수 없는 명령

  • [ERROR]: Task failed: Action failed: The module interpreter '/path/to/bin/python' was not found.

  • unknown command: /bin/sh\r\n

연결 실패, 알 수 없는 명령 또는 인터프리터를 찾을 수 없음 오류 문제 해결

알 수 없는 호스트 또는 주소 오류

  • "msg": "Unable to make a PyEZ connection: ConnectUnknownHostError(dc1a.example.net)"

  • [WARNING]: Could not match supplied host pattern, ignoring: name

  • "msg": "[Errno -5] No address associated with hostname"

알 수 없는 호스트 오류 문제 해결

연결 거부 또는 소켓 오류

  • "msg": "Unable to make a PyEZ connection: ConnectRefusedError(dc1a.example.net)"

  • "msg": "Could not open socket to hostname:830"

거부된 연결 오류 및 소켓 오류 문제 해결

호스트 네트워크 OS 오류

  • Unable to automatically determine host network os. Please manually configure ansible_network_os value for this host

호스트 네트워크 OS 오류 문제 해결

인증 오류

  • "msg": "Unable to make a PyEZ connection: ConnectAuthError(dc1a.example.net)"

  • "msg": "AuthenticationException('Authentication failed.')"

인증 오류 문제 해결

호스트 누락 또는 sock_fd 오류(junos_package)

  • [ERROR]: Task failed: You must provide either 'host' or 'sock_fd' value

모듈에 대한 연결 및 인증 매개 변수 제공

conn_type 오류

  • AttributeError: 'JuniperJunosModule' object has no attribute 'conn_type'

속성 conn_type 오류 문제 해결

구성 시간 초과 오류
(TimeoutExpiredError)

  • ncclient.operations.errors.TimeoutExpiredError: ncclient timed out while waiting for an rpc reply

구성 시간 초과 오류 문제 해결

구성 잠금 오류
(LockError)

  • "msg": "Unable to open the configuration in exclusive mode: LockError(severity: error, bad_element: None, message: configuration database modified)"

  • "msg": "Unable to open the configuration in exclusive mode: LockError(severity: error, bad_element: lock-configuration, message: permission denied)"

구성 잠금 오류 문제 해결

구성 로드 오류
(ConfigLoadError)

  • FAILED! => {"changed": false, "msg": "Failure loading the configuraton: ConfigLoadError(severity: error, bad_element: scripts, message: error: permission denied)"}

구성 로드 오류 문제 해결

구성 커밋 오류
(CommitError)

  • FAILED! => {"changed": false, "msg": "Unable to commit configuration: CommitError(edit_path: None, bad_element: None, message: error: remote lock-configuration failed on re0\n\nnote: consider using 'commit synchronize force' to\nterminate remote edit sessions and force the commit)"}

커밋 오류 문제 해결