[MCOL-4854] Cannot establish or use DBRM connection. timed out Created: 2021-09-01  Updated: 2021-10-13

Status: Open
Project: MariaDB ColumnStore
Component/s: cmapi
Affects Version/s: 6.1.1
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Richard Stracke Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: 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)

Maybe
https://medium.com/pipedrive-engineering/socket-timeout-an-important-but-not-simple-issue-with-python-4bb3c58386b4https://medium.com/pipedrive-engineering/socket-timeout-an-important-but-not-simple-issue-with-python-4bb3c58386b4

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.


Generated at Thu Feb 08 02:53:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.