Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
6.1.1
-
None
Description
If socket connection timed out like
[01/Sep/2021 05:35:01] cmapi_server get_status starts |
[01/Sep/2021 05:35:11] root Cannot establish or use DBRM connection. timed out |
If the socket timeout is reached, cluster will be set to readony.
module_logger.error("Cannot establish or use DBRM connection. " + str(e)) |
return 'readonly' |
The timeout has a fix value in the code.
SOCK_TIMEOUT = 10 |
sock.settimeout(SOCK_TIMEOUT)
|
Unfortunately, socket timeout can be reset with a sock.settimeout(None) that some libraries do rather rashly. |
Suggestion:
add new optional parameter for cmapi_server.conf
SOCK_TIMEOUT = xx # xx in seconds
It is optional.
Should not be part of the default file
If the parameter is not in the file, SOCK_TIMEOUT keep to current default value of 10 seconds.