Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SKALE Node CLI, part of the SKALE suite of validator tools, is the command line

* Prerequisites

Ensure that the following package is installed: **docker**, **docker-compose** (1.27.4+)
Ensure that the following package is installed: **docker**, **docker-compose**

* Download the executable

Expand Down
2 changes: 1 addition & 1 deletion node_cli/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '2.6.2'
__version__ = '2.6.3'

if __name__ == '__main__':
print(__version__)
18 changes: 13 additions & 5 deletions node_cli/core/ssl/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import time
import socket
import logging
import subprocess
from contextlib import contextmanager

from node_cli.core.ssl.utils import detached_subprocess
Expand Down Expand Up @@ -201,8 +202,15 @@ def check_ssl_connection(host, port, silent=False):
]
expose_output = not silent
with detached_subprocess(ssl_check_cmd, expose_output=expose_output) as dp:
time.sleep(1)
code = dp.poll()
if code is not None:
logger.error('Healthcheck connection failed')
raise SSLHealthcheckError('OpenSSL connection verification failed')
timeout = 20
try:
dp.wait(timeout=timeout)
except subprocess.TimeoutExpired:
logger.error('Healthcheck timed-out after %s s', timeout)
raise SSLHealthcheckError('OpenSSL connection verification timed-out')

if dp.returncode == 0: # success
return

logger.error('Healthcheck connection failed (code %s)', dp.returncode)
raise SSLHealthcheckError('OpenSSL connection verification failed')
2 changes: 1 addition & 1 deletion node_cli/core/ssl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def detached_subprocess(cmd, expose_output=False):
logger.debug(f'Starting detached subprocess: {cmd}')
p = subprocess.Popen(
cmd,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.DEVNULL,
encoding='utf-8'
)
try:
Expand Down
Loading