8000 "Error reading running config" while backup config · Issue #36 · spotify/pyfg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 28, 2022. It is now read-only.
This repository was archived by the owner on Mar 28, 2022. It is now read-only.
"Error reading running config" while backup config #36
Open
@polaris197

Description

@polaris197

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0