"Error reading running config" while backup config
Opened this issue · 0 comments
Hi
I had some some error while backuping configuration on Fortigate 3000.
I have the message "Error reading running config" and a raise socket.timeout() exception.
My investigating found that it was the error channel of the ssh connection which raise this timeout and stop the reading for the standard output.
I do this modification on the plugin python module:
pyfg/pyFG/fortios.py
from line 149 replace this
error = '' output = '' for e in error_chan.read(): error = error + self._read_wrapper(e) for o in output_chan.read(): output = output + self._read_wrapper(o)
by
error = '' output = '' try: for e in error_chan.read(): error = error + self._read_wrapper(e) except: pass for o in output_chan.read(): output = output + self._read_wrapper(o)
And with this modification, i have no more error.
As diagnosis, i suspect that the Fortigate 3000 don't send any caracter to the stream