nornir-automation / nornir

Pluggable multi-threaded framework with inventory management to help operate collections of devices
https://nornir.readthedocs.io/
Apache License 2.0
1.38k stars 234 forks source link

OSError: Search pattern never detected in send_command_expect: [\$#] #691

Closed sindhujit1 closed 3 years ago

sindhujit1 commented 3 years ago

Getting an error when using nornir to transfer OS image for arista 7010 devices. Payload:

result = nr_arista.run(
            task=netmiko_file_transfer,
            source_file=source_file,
            dest_file=BinFile,
            direction='put',
            num_workers=len(NodeSwitch_tmp),
            )

Logs:

File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/nornir/core/task.py", line 67, in start r = self.task(self, self.params) File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/nornir/plugins/tasks/networking/netmiko_file_transfer.py", line 28, in netmiko_file_transfer net_connect, source_file=source_file, dest_file=dest_file, kwargs File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/netmiko/scp_functions.py", line 78, in file_transfer if scp_transfer.check_file_exists(): File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/netmiko/arista/arista.py", line 82, in check_file_exists return self._check_file_exists_unix(remote_cmd=remote_cmd) File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/netmiko/scp_handler.py", line 188, in _check_file_exists_unix self.ssh_ctl_chan._enter_shell() File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/netmiko/arista/arista.py", line 39, in _enter_shell return self.send_command("bash", expect_string=r"[\$#]") File "/home/sgang31/.venvs3/netadc3/lib64/python3.6/site-packages/netmiko/base_connection.py", line 1337, in send_command search_pattern OSError: Search pattern never detected in send_command_expect: [\$#]

Any help is appreciated.

dbarrosop commented 3 years ago

Closing as this issue doesn't relate not nornir core. It is most probably a timeout or something but if you think it's an issue you should open it in the nornir_netmiko repo. Thanks!

ktbyers commented 3 years ago

Yes, you probably should post this in nornir_netmiko. Your particular error looks like it is failing to enter the Linux shell.