CheckPointSW / CheckPointAnsibleMgmtCollection

This Ansible collection provides control over a Check Point Management server using Check Point's web-services APIs.
https://galaxy.ansible.com/check_point/mgmt
Apache License 2.0
40 stars 30 forks source link

ConnectionError: The read operation timed out #67

Closed tehdisko closed 2 years ago

tehdisko commented 2 years ago

Hi, I have an issue while adding/changing a huge number of members (~1500) to group. Changing variables connect_timeout and command_timeout does't help. Here is an output.

fatal: [172.16.85.5]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/home/user/.ansible/tmp/ansible-local-25969j2q87ymj/ansible-tmp-1650986164.1702852-203734164353076/AnsiballZ_cp_mgmt_group.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/home/user/.ansible/tmp/ansible-local-25969j2q87ymj/ansible-tmp-1650986164.1702852-203734164353076/AnsiballZ_cp_mgmt_group.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/user/.ansible/tmp/ansible-local-25969j2q87ymj/ansible-tmp-1650986164.1702852-203734164353076/AnsiballZ_cp_mgmt_group.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.check_point.mgmt.plugins.modules.cp_mgmt_group', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib/python3.8/runpy.py\", line 207, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.8/runpy.py\", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/lib/python3.8/runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_check_point.mgmt.cp_mgmt_group_payload_6zczmhaz/ansible_check_point.mgmt.cp_mgmt_group_payload.zip/ansible_collections/check_point/mgmt/plugins/modules/cp_mgmt_group.py\", line 140, in <module>\n  File \"/tmp/ansible_check_point.mgmt.cp_mgmt_group_payload_6zczmhaz/ansible_check_point.mgmt.cp_mgmt_group_payload.zip/ansible_collections/check_point/mgmt/plugins/modules/cp_mgmt_group.py\", line 135, in main\n  File \"/tmp/ansible_check_point.mgmt.cp_mgmt_group_payload_6zczmhaz/ansible_check_point.mgmt.cp_mgmt_group_payload.zip/ansible_collections/check_point/mgmt/plugins/module_utils/checkpoint.py\", line 317, in api_call\n  File \"/tmp/ansible_check_point.mgmt.cp_mgmt_group_payload_6zczmhaz/ansible_check_point.mgmt.cp_mgmt_group_payload.zip/ansible_collections/check_point/mgmt/plugins/module_utils/checkpoint.py\", line 71, in send_request\n  File \"/tmp/ansible_check_point.mgmt.cp_mgmt_group_payload_6zczmhaz/ansible_check_point.mgmt.cp_mgmt_group_payload.zip/ansible/module_utils/connection.py\", line 185, in __rpc__\nansible.module_utils.connection.ConnectionError: The read operation timed out\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}
chkp-shirango commented 2 years ago

Hi @tehdisko,

Please try to add the ansible_command_timeout: 300 (5 minutes) parameter under the task in the playbook: image

Thanks, Shiran

tehdisko commented 2 years ago

HI, @chkp-shirango! Thanks. I tried that before. It didn't help. Also, I tried to change connect_timeout. In my case error message apears after ~2 min.

chkp-shirango commented 2 years ago

Hi @tehdisko,

Can you please send me:

  1. Your playbook with the ansible_command_timeout variable.
  2. The error message that you got.
  3. api.csv logs file

My email: shirango@checkpoint.com

Thanks, Shiran