Hi Robert,
We have run "web_api_show_package.sh -g FW-1", however we see the error "failed to get string data", we verify the process API Stopped.
[Expert@MGMT-PRI:0]# ./web_api_show_package.sh -g FW-1
Exception in thread "main" com.checkpoint.mgmt_api.client.ApiClientRunTimeException: Error: failed to get string data
at com.checkpoint.mgmt_api.client.UtilClass.convertToJson(UtilClass.java:54)
at com.checkpoint.mgmt_api.client.ApiClient.apiCall(ApiClient.java:296)
at com.checkpoint.mgmt_api.client.ApiClient.apiCall(ApiClient.java:394)
at com.checkpoint.mgmt_api.client.ApiClient.exit(ApiClient.java:501)
at com.checkpoint.mgmt_api.examples.ShowPackageTool.logoutReportAndExit(ShowPackageTool.java:1538)
at com.checkpoint.mgmt_api.examples.ShowPackageTool.logoutReportAndExit(ShowPackageTool.java:1602)
at com.checkpoint.mgmt_api.examples.ShowPackageTool.main(ShowPackageTool.java:169)
[Expert@MGMT-PRI:0]# api status
API Settings:
---------------------
Accessibility: Require all granted
Automatic Start: Enabled
Processes:
Name State PID More Information
-------------------------------------------------
API Stopped
CPM Started 17874 Check Point Security Management Server is running and ready
FWM Started 21383
Port Details:
-------------------
JETTY Internal Port: 50276
APACHE Gaia Port: 443
--------------------------------------------
Overall API Status: The API Server Is Not Running!
--------------------------------------------
Notes:
------------
To collect troubleshooting data, please run 'api status -s <comment>'
[Expert@MGMT-PRI:0]#
- We try with the user and password without success
[Expert@MGMT-PRI:0]# ./web_api_show_package.sh -u ******** -p ********* -g FW-1
Script stopped running due to severe error!
Result file location: show_package-2018-03-21_11-24-35.tar.gz
[Expert@MGMT-PRI:0]# api status
API Settings:
---------------------
Accessibility: Require all granted
Automatic Start: Enabled
Processes:
Name State PID More Information
-------------------------------------------------
API Started 11450
CPM Started 17874 Check Point Security Management Server is running and ready
FWM Started 21383
Port Details:
-------------------
JETTY Internal Port: 50277
APACHE Gaia Port: 443
Apache port retrieved from: httpd-ssl.conf
--------------------------------------------
Overall API Status: Started
--------------------------------------------
API readiness test SUCCESSFUL. The server is up and ready to receive connections
Notes:
------------
To collect troubleshooting data, please run 'api status -s <comment>'
File ".elg":
[Wed Mar 21 11:24:36 BRT 2018 com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: The parameters that were received: username:(-u)=******* password:(-p)=******* userRequestGateway:(-g)=FW-1
[Wed Mar 21 11:24:36 BRT 2018 com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Limit number of object per page: 10
[Wed Mar 21 11:24:38 BRT 2018 com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Login As root: false
[Wed Mar 21 11:24:38 BRT 2018 com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Login with 'read-only' flag.
[Wed Mar 21 11:24:38 BRT 2018 com.checkpoint.mgmt_api.examples.MyLogger.severe()SEVERE]: An error occurred while logging in to the server. Message: 'Authentication to server failed.'. Status Code: '400'
[Wed Mar 21 11:24:38 BRT 2018 com.checkpoint.mgmt_api.examples.ShowPackageTool.logoutReportAndExit()INFO]: Script stopped running due to severe error!
[Wed Mar 21 11:24:38 BRT 2018 com.checkpoint.mgmt_api.examples.ShowPackageTool.logoutReportAndExit()INFO]: dirPath: /opt/CPsuite-R80/fw1/scripts/e165923f-9fb4-4d7e-ba6e-902efefad19c
[Wed Mar 21 11:24:38 BRT 2018 com.checkpoint.mgmt_api.examples.ShowPackageTool.logoutReportAndExit()INFO]: tarGzPath: show_package-2018-03-21_11-24-35.tar.gz
Thank you for your assistance in this matter.
Best regards