Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Management tunnel goes down just before iperf3 check was executed #399

Closed
Aryamanz29 opened this issue Jun 21, 2022 · 0 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@Aryamanz29
Copy link
Member

Reported by @pandafy in #394 (review)

  • The database reports that DeviceConnection is working, but the management tunnel goes down just before iperf check was executed. The code should be able to gracefully handle this and also notify users that SSH connection is not working.

Error log

[2022-06-21 14:04:53,311: ERROR/ForkPoolWorker-8] 'NoneType' object has no attribute 'open_session'
Traceback (most recent call last):
  File "/home/aryaman/Desktop/Iperf-GSoC/env/lib/python3.8/site-packages/openwisp_controller/connection/connectors/ssh.py", line 174, in exec_command
    stdin, stdout, stderr = self.shell.exec_command(command, timeout=timeout)
  File "/home/aryaman/Desktop/Iperf-GSoC/env/lib/python3.8/site-packages/paramiko/client.py", line 508, in exec_command
    chan = self._transport.open_session(timeout=timeout)
AttributeError: 'NoneType' object has no attribute 'open_session'
[2022-06-21 14:04:53,313: ERROR/ForkPoolWorker-8] Task openwisp_monitoring.check.tasks.perform_check[9b3fe0a6-e740-4bcc-abce-7c616c4837e7] raised unexpected: AttributeError("'NoneType' object has no attribute 'open_session'")
Traceback (most recent call last):
  File "/home/aryaman/Desktop/Iperf-GSoC/env/lib/python3.8/site-packages/celery/app/trace.py", line 451, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/aryaman/Desktop/Iperf-GSoC/env/lib/python3.8/site-packages/celery/app/trace.py", line 734, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/aryaman/Desktop/Iperf-GSoC/openwisp-monitoring/openwisp_monitoring/check/tasks.py", line 48, in perform_check
    result = check.perform_check()
  File "/home/aryaman/Desktop/Iperf-GSoC/openwisp-monitoring/openwisp_monitoring/check/base/models.py", line 86, in perform_check
    return self.check_instance.check(store=True)
  File "/home/aryaman/Desktop/Iperf-GSoC/openwisp-monitoring/openwisp_monitoring/check/classes/iperf.py", line 37, in check
    res, exit_code = device_connection.connector_instance.exec_command(
  File "/home/aryaman/Desktop/Iperf-GSoC/env/lib/python3.8/site-packages/openwisp_controller/connection/connectors/ssh.py", line 182, in exec_command
    raise e
  File "/home/aryaman/Desktop/Iperf-GSoC/env/lib/python3.8/site-packages/openwisp_controller/connection/connectors/ssh.py", line 174, in exec_command
    stdin, stdout, stderr = self.shell.exec_command(command, timeout=timeout)
  File "/home/aryaman/Desktop/Iperf-GSoC/env/lib/python3.8/site-packages/paramiko/client.py", line 508, in exec_command
    chan = self._transport.open_session(timeout=timeout)
AttributeError: 'NoneType' object has no attribute 'open_session'
@Aryamanz29 Aryamanz29 added this to To do in [GSoC 22] Iperf3 check via automation Jun 21, 2022
@Aryamanz29 Aryamanz29 moved this from To do to In progress in [GSoC 22] Iperf3 check Jun 21, 2022
@Aryamanz29 Aryamanz29 self-assigned this Jun 21, 2022
@Aryamanz29 Aryamanz29 added the bug Something isn't working label Jun 21, 2022
@pandafy pandafy moved this from In progress to To do in [GSoC 22] Iperf3 check Jun 22, 2022
Aryamanz29 added a commit that referenced this issue Jun 23, 2022
- We need to check device_connection is_working just right after connect().
- because it may be possible that authentication (publickey) failed.
- or any other failure happened during connect().

Closes #399
Aryamanz29 added a commit that referenced this issue Jun 23, 2022
- We need to check device_connection is_working just right after connect().
- because it may be possible that authentication (publickey) failed.
- or any other failure happened during connect().

Fixes #399
Aryamanz29 added a commit that referenced this issue Jun 23, 2022
- We need to check device_connection is_working just right after connect().
- because it may be possible that authentication (publickey) failed.
- or any other failure happened during connect().

Fixes #399
Aryamanz29 added a commit that referenced this issue Jun 23, 2022
- We need to check device_connection is_working just right after connect().
- because it may be possible that authentication (publickey) failed.
- or any other failure happened during connect().

Fixes #399
@Aryamanz29 Aryamanz29 moved this from To do to In progress in [GSoC 22] Iperf3 check Jun 23, 2022
Aryamanz29 added a commit that referenced this issue Jun 27, 2022
- We need to check device_connection is_working just right after connect().
- because it may be possible that authentication (publickey) failed.
- or any other failure happened during connect().

Fixes #399
Aryamanz29 added a commit that referenced this issue Jul 3, 2022
- We need to check device_connection is_working just right after connect().
- because it may be possible that authentication (publickey) failed.
- or any other failure happened during connect().

Fixes #399
Aryamanz29 added a commit that referenced this issue Jul 4, 2022
- We need to check device_connection is_working just right after connect().
- because it may be possible that authentication (publickey) failed.
- or any other failure happened during connect().

Fixes #399
Aryamanz29 added a commit that referenced this issue Jul 21, 2022
- We need to check device_connection is_working just right after connect().
- because it may be possible that authentication (publickey) failed.
- or any other failure happened during connect().

Fixes #399
Aryamanz29 added a commit that referenced this issue Aug 9, 2022
- We need to check device_connection is_working just right after connect().
- because it may be possible that authentication (publickey) failed.
- or any other failure happened during connect().

Fixes #399
nemesifier added a commit that referenced this issue Aug 9, 2022
Closes #385
Closes #390
Closes #398
Closes #399
Closes #405
Closes #412
Closes #406
Closes #414
Closes #417
Closes #418
Closes #422

Co-authored-by: Federico Capoano <[email protected]>
@Aryamanz29 Aryamanz29 moved this from In progress to Done in [GSoC 22] Iperf3 check Aug 9, 2022
Aryamanz29 added a commit that referenced this issue Aug 9, 2022
Closes #385
Closes #390
Closes #398
Closes #399
Closes #405
Closes #412
Closes #406
Closes #414
Closes #417
Closes #418
Closes #422

Co-authored-by: Federico Capoano <[email protected]>
Aryamanz29 added a commit that referenced this issue Aug 26, 2022
Closes #385
Closes #390
Closes #398
Closes #399
Closes #405
Closes #412
Closes #406
Closes #414
Closes #417
Closes #418
Closes #422

Co-authored-by: Federico Capoano <[email protected]>
Aryamanz29 added a commit that referenced this issue Sep 7, 2022
Closes #385
Closes #390
Closes #398
Closes #399
Closes #405
Closes #412
Closes #406
Closes #414
Closes #417
Closes #418
Closes #422

Co-authored-by: Federico Capoano <[email protected]>
Aryamanz29 added a commit that referenced this issue Sep 15, 2022
Closes #385
Closes #390
Closes #398
Closes #399
Closes #405
Closes #412
Closes #406
Closes #414
Closes #417
Closes #418
Closes #422

Co-authored-by: Federico Capoano <[email protected]>
Aryamanz29 added a commit that referenced this issue Sep 27, 2022
Closes #385
Closes #390
Closes #398
Closes #399
Closes #405
Closes #412
Closes #406
Closes #414
Closes #417
Closes #418
Closes #422

Co-authored-by: Federico Capoano <[email protected]>
Aryamanz29 added a commit that referenced this issue Sep 27, 2022
Closes #385
Closes #390
Closes #398
Closes #399
Closes #405
Closes #412
Closes #406
Closes #414
Closes #417
Closes #418
Closes #422

Co-authored-by: Federico Capoano <[email protected]>
Aryamanz29 added a commit that referenced this issue Sep 27, 2022
Closes #385
Closes #390
Closes #398
Closes #399
Closes #405
Closes #412
Closes #406
Closes #414
Closes #417
Closes #418
Closes #422

Co-authored-by: Federico Capoano <[email protected]>
@Aryamanz29 Aryamanz29 changed the title [bug] Management tunnel goes down just before iperf check was executed [bug] Management tunnel goes down just before iperf3 check was executed Oct 7, 2022
nemesifier added a commit that referenced this issue Oct 20, 2022
#424 #426 #406 #435 #416 #391 #443

Added Iperf3 check to perform active measurements of the maximum achievable bandwidth

Closes #385
Closes #390
Closes #398
Closes #399
Closes #406
Closes #405
Closes #412
Closes #414
Closes #417
Closes #418
Closes #422
Closes #424
Closes #426
Closes #406
Closes #435
Closes #416
Closes #391
Closes #443

Signed-off-by: Aryaman <[email protected]>
Co-authored-by: Aryaman <[email protected]>
Co-authored-by: Federico Capoano <[email protected]>
Co-authored-by: Gagan Deep <[email protected]>
Aryamanz29 added a commit that referenced this issue Oct 21, 2022
#424 #426 #406 #435 #416 #391 #443

Added Iperf3 check to perform active measurements of the maximum achievable bandwidth

Closes #385
Closes #390
Closes #398
Closes #399
Closes #406
Closes #405
Closes #412
Closes #414
Closes #417
Closes #418
Closes #422
Closes #424
Closes #426
Closes #406
Closes #435
Closes #416
Closes #391
Closes #443

Signed-off-by: Aryaman <[email protected]>
Co-authored-by: Aryaman <[email protected]>
Co-authored-by: Federico Capoano <[email protected]>
Co-authored-by: Gagan Deep <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

No branches or pull requests

1 participant