- 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 Team,
I am trying to reset the SIC without restart by using below command via ansible and getting the error .Kinldy help on this.
Playbook:
- name: SIC key generation
command: "{{ item }}"
with_items:
- /opt/CPshrd-R80/bin/cp_conf sic init Infy123+ norestart
- /opt/CPshrd-R80/bin/cpwd_admin stop -name CPD -path "/opt/CPshrd-R80/bin/cpd_admin" -command "cpd_admin stop"
- /opt/CPshrd-R80/bin/cpwd_admin start -name CPD -path "/opt/CPshrd-R80/bin/cpd" -command "cpd"
Error in ansible:
failed: [10.6 (item=/opt/CPshrd-R80/bin/cp_conf sic init Infy123+ norestart) => {"changed": true, "cmd": ["/opt/CPshrd-R80/bin/cp_conf", "sic", "init", "Infy123+", "norestart"], "delta": "0:00:00.018486", "end": "2019-07-17 07:50:20.309823", "item": "/opt/CPshrd-R80/bin/cp_conf sic init Infy123+ norestart", "msg": "non-zero return code", "rc": 127, "start": "2019-07-17 07:50:20.291337", "stderr": "/opt/CPshrd-R80/bin/cp_conf: error while loading shared libraries: libcpconfca.so: cannot open shared object file: No such file or directory", "stderr_lines": ["/opt/CPshrd-R80/bin/cp_conf: error while loading shared libraries: libcpconfca.so: cannot open shared object file: No such file or directory"], "stdout": "", "stdout_lines": []}
failed: (item=/opt/CPshrd-R80/bin/cpwd_admin stop -name CPD -path "/opt/CPshrd-R80/bin/cpd_admin" -command "cpd_admin stop") => {"changed": true, "cmd": ["/opt/CPshrd-R80/bin/cpwd_admin", "stop", "-name", "CPD", "-path", "/opt/CPshrd-R80/bin/cpd_admin", "-command", "cpd_admin stop"], "delta": "0:00:00.019825", "end": "2019-07-17 07:50:20.956607", "item": "/opt/CPshrd-R80/bin/cpwd_admin stop -name CPD -path \"/opt/CPshrd-R80/bin/cpd_admin\" -command \"cpd_admin stop\"", "msg": "non-zero return code", "rc": 127, "start": "2019-07-17 07:50:20.936782", "stderr": "/opt/CPshrd-R80/bin/cpwd_admin: error while loading shared libraries: libcpwd_is.so: cannot open shared object file: No such file or directory", "stderr_lines": ["/opt/CPshrd-R80/bin/cpwd_admin: error while loading shared libraries: libcpwd_is.so: cannot open shared object file: No such file or directory"], "stdout": "", "stdout_lines": []}
failed: (item=/opt/CPshrd-R80/bin/cpwd_admin start -name CPD -path "/opt/CPshrd-R80/bin/cpd" -command "cpd") => {"changed": true, "cmd": ["/opt/CPshrd-R80/bin/cpwd_admin", "start", "-name", "CPD", "-path", "/opt/CPshrd-R80/bin/cpd", "-command", "cpd"], "delta": "0:00:00.019049", "end": "2019-07-17 07:50:21.613861", "item": "/opt/CPshrd-R80/bin/cpwd_admin start -name CPD -path \"/opt/CPshrd-R80/bin/cpd\" -command \"cpd\"", "msg": "non-zero return code", "rc": 127, "start": "2019-07-17 07:50:21.594812", "stderr": "/opt/CPshrd-R80/bin/cpwd_admin: error while loading shared libraries: libcpwd_is.so: cannot open shared object file: No such file or directory", "stderr_lines": ["/opt/CPshrd-R80/bin/cpwd_admin: error while loading shared libraries: libcpwd_is.so: cannot open shared object file: No such file or directory"], "stdout": "", "stdout_lines": []}
Kinldy help on this.
Regards
Athimoolam.A
You are missing various environment variables required cp_conf to run, namely $LD_LIBRARY_PATH.
Execute something like this prior to all the other commands and try again:
source /opt/CPshrd-R80/tmp/.CPprofile.sh
or
. /opt/CPshrd-R80/tmp/.CPprofile.sh
HI Timothy,
Thank you so much for your update.
I tried as below but still getting the error.
- name: SIC key generation
command: "{{ item }}"
with_items:
- ./opt/CPshrd-R80/tmp/.CPprofile.sh
- /opt/CPshrd-R80/bin/cp_conf sic init Infy123+ norestart
- /opt/CPshrd-R80/bin/cpwd_admin stop -name CPD -path "/opt/CPshrd-R80/bin/cpd_admin" -command "cpd_admin stop"
- /opt/CPshrd-R80/bin/cpwd_admin start -name CPD -path "/opt/CPshrd-R80/bin/cpd" -command "cpd"
Error:
failed: (item=./opt/CPshrd-R80/tmp/.CPprofile.sh) => {"changed": false, "cmd": "./opt/CPshrd-R80/tmp/.CPprofile.sh", "item": "./opt/CPshrd-R80/tmp/.CPprofile.sh", "msg": "[Errno 2] No such file or directory", "rc": 2}
Regards
Aathi
It is really the file $CPDIR/conf/.CPprofile.sh, that is /var/opt/CPshrd-R80.30/conf/.CPprofile.sh !!!
The space after the period matters:
. /var/opt/CPshrd-R80.30/conf/.CPprofile.sh
Try:
source /var/opt/CPshrd-R80.30/conf/.CPprofile.sh
Please read my last post again. You are using the wrong directory path.
source /var/opt/CPshrd-R80.10/conf/.CPprofile.sh
source /var/opt/CPshrd-R80/conf/.CPprofile.sh
HI
The below format is working for me.
with_items:
- clish -c 'cp_conf sic init abc123 norestart'
- clish -c 'cpwd_admin stop -name CPD -path "$CPDIR/bin/cpd_admin" -command "cpd_admin stop"'
- clish -c 'cpstart'
Anyhow .Please let me know is there any other way to make it work for below commands.
/opt/CPshrd-R80/bin/cp_conf sic init abc123 norestart
/opt/CPshrd-R80/bin/cpwd_admin stop -name CPD -path "/opt/CPshrd-R80/bin/cpd_admin" -command "cpd_admin stop"
/opt/CPshrd-R80/bin/cpwd_admin start -name CPD -path "/opt/CPshrd-R80/bin/cpd" -command "cpd"
Regards
Athimoolam.A
About CheckMates
Learn Check Point
Advanced Learning
WELCOME TO THE FUTURE OF CYBER SECURITY