inconsistent 'failed to enter configuration mode'
See original GitHub issueI have a script that iterates through a list of interfaces and enables PIM sparse-mode on Cisco IOS devices.
I have started receiving an error today that I’m unfamiliar with:
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 1531, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "/Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py", line 938, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Users/tiger/PycharmProjects/enable_pim_sparse_mode/enable_pim_sql.py", line 80, in <module>
ssh.send_config_set(updatePIM) # netmiko command to send to the switch
File "/Library/Python/2.7/site-packages/netmiko/base_connection.py", line 606, in send_config_set
output = self.config_mode()
File "/Library/Python/2.7/site-packages/netmiko/ssh_connection.py", line 43, in config_mode
return super(SSHConnection, self).config_mode(config_command=config_command)
File "/Library/Python/2.7/site-packages/netmiko/base_connection.py", line 529, in config_mode
raise ValueError("Failed to enter configuration mode")
ValueError: Failed to enter configuration mode
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pytz/__init__.py:29: UserWarning: Module logging was already imported from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.pyc, but /Library/Python/2.7/site-packages is being added to sys.path
from pkg_resources import resource_stream
Debugs show that it’s sourced from this line of code in base_connection.py:
output = ''
if not self.check_config_mode():
output = self.send_command(config_command, strip_prompt=False, strip_command=False)
if not self.check_config_mode():
raise ValueError("Failed to enter configuration mode")
return output
any ideas on where I can start my investigation?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Solved: Running db may be inconsistent - Cisco Community
Solved: NSO 4.5.5.1 I am seeing the following in ncs_cli on the "master" in a high availability configuration just after adding a "slave"....
Read more >Failed to enter configuration mode in Netmiko while trying to ...
I;m trying to use netmiko to login to aruba switches. while i pass on some commands using send_config_set, it is erroring out saying...
Read more >DFS Namespaces service and configuration - Windows Server
Provides information about the Distributed File System (DFS) Namespaces service to help you create a new namespace.
Read more >Inconsistent Databases and Recovery
If you receive an “inconsistent database” error after recovery is complete, ... To examine the configuration file of your database, enter the infodb...
Read more >Resolve an Amazon RDS instance that is in an incompatible ...
Configurations can fail if you attempt to associate a different parameter group, scale the DB instance type, change the engine version, or ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@calvinchristopher Yes, I did a lot of work recently to improve the reliability of enable and config_mode methods (i.e. methods for going into, checking, and exiting these states).
I will probably try to push a new Netmiko version up to pypi in the next week or two.
upgrading to 0.4.3 seems to have resolved it. That will teach me to rely on pypi distros