<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: API call show-access-rulebase dies after 4 iterations getting 50 rules at a time in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-show-access-rulebase-dies-after-4-iterations-getting-50/m-p/128814#M6218</link>
    <description>&lt;P&gt;That would be changing the relevant API call so that includes a limit 20 as one of the options.&lt;/P&gt;
&lt;P&gt;However, it’s probably worth a TAC case if only to get to the bottom of the underlying issue with the API.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Sep 2021 21:02:07 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2021-09-06T21:02:07Z</dc:date>
    <item>
      <title>API call show-access-rulebase dies after 4 iterations getting 50 rules at a time</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-show-access-rulebase-dies-after-4-iterations-getting-50/m-p/48773#M3206</link>
      <description>&lt;P&gt;I am using&amp;nbsp;&lt;A href="https://github.com/CheckPointSW/ExportImportPolicyPackage" target="_blank"&gt;https://github.com/CheckPointSW/ExportImportPolicyPackage&lt;/A&gt; script to export a ruleset.&lt;/P&gt;&lt;P&gt;when I run it I get:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Checking existence of package [Border_Policy]

Exporting Access Control layers

Exporting Access Layer [Border_Policy Security]

Getting layer information for layer [Border_Policy Security]
Getting information from show-access-rulebase
Retrieved 50 out of 688 rules (7%)
Retrieved 100 out of 688 rules (14%)
Retrieved 150 out of 688 rules (21%)
Retrieved 200 out of 688 rules (29%)

Traceback (most recent call last):
  File "import_export_package.py", line 44, in &amp;lt;module&amp;gt;
    export_package(client, args)
  File "/Users/rful011/src/ExportImportPolicyPackage/exporting/export_package.py", line 39, in export_package
    = export_access_rulebase(show_package.data["name"], access_layer["name"], access_layer["uid"], client, timestamp, tar_file)
  File "/Users/rful011/src/ExportImportPolicyPackage/exporting/export_access_rulebase.py", line 16, in export_access_rulebase
    get_query_rulebase_data(client, "access-rulebase", {"name": layer, "uid": layer_uid, "package": package})
  File "/Users/rful011/src/ExportImportPolicyPackage/exporting/export_objects.py", line 64, in get_query_rulebase_data
    for rulebase_reply in rulebase_replies:
  File "/Users/rful011/src/ExportImportPolicyPackage/cpapi/mgmt_api.py", line 414, in gen_api_query
    raise APIException(api_res.error_message, api_res.data)
cpapi.api_exceptions.APIException: APIResponse received a response which is not a valid JSON.&lt;/PRE&gt;&lt;P&gt;Following this the API is unresponsive and needs to be restarted on the server.&amp;nbsp; All API calls get 503 errors.&lt;/P&gt;&lt;P&gt;This feels like some sort of resource exhaustion on the server end.&lt;/P&gt;&lt;P&gt;Any suggestions on how to diagnose what is wrong?&amp;nbsp; Or ways to work around the issue?&amp;nbsp; &amp;nbsp;I have considered getting the script to process fixed ranges of rules for each run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 01:43:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-show-access-rulebase-dies-after-4-iterations-getting-50/m-p/48773#M3206</guid>
      <dc:creator>Russell_Fulton</dc:creator>
      <dc:date>2019-03-27T01:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: API call show-access-rulebase dies after 4 iterations getting 50 rules at a time</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-show-access-rulebase-dies-after-4-iterations-getting-50/m-p/48825#M3208</link>
      <description>&lt;P&gt;Give this a go then re-run the tool.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk119553&amp;amp;srcFavorites=favorites" target="_blank"&gt;https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk119553&amp;amp;srcFavorites=favorites&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 11:56:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-show-access-rulebase-dies-after-4-iterations-getting-50/m-p/48825#M3208</guid>
      <dc:creator>Joshua_Hatter</dc:creator>
      <dc:date>2019-03-27T11:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: API call show-access-rulebase dies after 4 iterations getting 50 rules at a time</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-show-access-rulebase-dies-after-4-iterations-getting-50/m-p/49385#M3239</link>
      <description>&lt;P&gt;I don't have permission to view solution to that post but it looks like the right problem.&amp;nbsp; I actually solved it by reducing the number of objects retrieved from 50 to 20.&amp;nbsp; Odd that it dies after 4 successful calls.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Mar 2019 20:42:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-show-access-rulebase-dies-after-4-iterations-getting-50/m-p/49385#M3239</guid>
      <dc:creator>Russell_Fulton</dc:creator>
      <dc:date>2019-03-31T20:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: API call show-access-rulebase dies after 4 iterations getting 50 rules at a time</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-show-access-rulebase-dies-after-4-iterations-getting-50/m-p/128803#M6217</link>
      <description>&lt;P&gt;How you change the number of objects&amp;nbsp;&lt;SPAN&gt;retrieved from 50 to 20? I'm with the same problem on R81&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 19:37:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-show-access-rulebase-dies-after-4-iterations-getting-50/m-p/128803#M6217</guid>
      <dc:creator>Ronilson</dc:creator>
      <dc:date>2021-09-06T19:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: API call show-access-rulebase dies after 4 iterations getting 50 rules at a time</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-show-access-rulebase-dies-after-4-iterations-getting-50/m-p/128814#M6218</link>
      <description>&lt;P&gt;That would be changing the relevant API call so that includes a limit 20 as one of the options.&lt;/P&gt;
&lt;P&gt;However, it’s probably worth a TAC case if only to get to the bottom of the underlying issue with the API.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 21:02:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/API-call-show-access-rulebase-dies-after-4-iterations-getting-50/m-p/128814#M6218</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-09-06T21:02:07Z</dc:date>
    </item>
  </channel>
</rss>

