- Products
- Learn
- Local User Groups
- Partners
-
More
Celebrate the New Year
With CheckMates!
Value of Security
Vendor Self-Awareness
Join Us for CPX 360
23-24 February 2021
Important certificate update to CloudGuard Controller, CME,
and Azure HA Security Gateways
How to Remediate Endpoint & VPN
Issues (in versions E81.10 or earlier)
Mobile Security
Buyer's Guide Out Now
Important! R80 and R80.10
End Of Support around the corner (May 2021)
hi i use the rest web api using php
mostly when i am using the add access rule , the action does not succeed
i just need to refresh the page few times , sometimes 5 times the action complete successfully
can someone help with the reason for that ?
the code i use
$curl = curl_init();
$url = $this->checkPointMgmntServer.$Name;
showMsg('running function: ',$Name,'');
showMsg('running json: ',$json,'');
#echo $this->cpSid;
$ch = curl_init(); // initialize curl handle
curl_setopt($ch, CURLOPT_URL,$url); // set url to post to
curl_setopt($ch, CURLOPT_USERPWD, "abc:password");
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
curl_setopt($ch, CURLOPT_TIMEOUT, 10); // times out after 4s
curl_setopt($ch, CURLOPT_POST, 0); // set POST method
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
# curl_setopt($ch, CURLOPT_SSL_VERIFYSTATUS , FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Accept: application/json',
'x-chkp-sid: '.$this->cpSid
));
curl_setopt($ch, CURLOPT_POSTFIELDS, $json); // add POST fields
//curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json;"));
try {
$result = curl_exec($ch);
}
catch(Exception $e)
{
print_r($e);
}
$trimed = json_decode($result, true);
return $result ;
}
On what hardware (CPU type, number of cores, RAM) is the R80.x Management running on?
Also, what exact version of code?
Also, what API call exactly are you making with this code?
the machine is a vm and all functions working but the add access rule
that succeed only once in 5 to 10 refresh of same code
just to clarify
i use same function to do a lot of action like adding time object adding host etc
on all of them it runs on first time smoothly
only when i am runnig the add access rule it fails and after some trials it is at the end succeed
that means the json i am passing to function is ok....
but still somthing causing it to fail
This could easily be the result of an underpowered management server, which is why I asked the questions I did.
Please review my questions again and provide answers.
In the case of a VM, please tell me what ram/CPU has been allocated to it,
You also set the timeout really low (10 seconds)—you might try a higher timeout.
vm with 24 gig memory 12 cpu cores i changed the 10 seconds to 120 sec
no special results
thanks for your response
Make sure you run latest jumbo fix on your management, at least higher than 142 as there have been multiple fixes for API. Also for larger rule and objects bases switch API java to 64 bit and increase default memory heap
https://community.checkpoint.com/thread/9495-api-dying-on-mds-take-142-every-few-days
About CheckMates
Learn Check Point
Advanced Learning
WELCOME TO THE FUTURE OF CYBER SECURITY