cancel
Showing results for 
Search instead for 
Did you mean: 
Post a Question
Simon_Garay
Nickel

Error web_api_show_package

Jump to solution

Hello everyone,

I need to export a policy package from the MGMT R80.10. This policy is applied to a virtual FW on VSX R76 Environment, however when I run "web_api_show_package.sh -g FW_1" it shows me the error "Script stopped running due to severe error!".

I've visited some forums without finding the answer, have you experienced this issue?

[Expert@MGMT-PRI:0]# ./web_api_show_package.sh -g FW_1
Script stopped running due to severe error!
Result file location: show_package-2018-03-20_03-51-32.tar.gz
[Expert@MGMT-PRI:0]#

Thank you for your assistance in this matter.


Best regards !

Labels (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Employee++
Employee++

Re: Error web_api_show_package

Jump to solution

Hi Simon,

The tool reports that it failed to login to the management server (login as root).

Try logging in using user name and possword instead.

If it still fails, run on the management server "api status" command and paste the output here.

Robert.

6 Replies
Employee++
Employee++

Re: Error web_api_show_package

Jump to solution

Hi,

Inside the generated tar archive, there is a log file, with ".elg" extension.

Please paste its content here, for analysis.

BTW, why are you exporting the policy out of your management?

Robert.

0 Kudos
Simon_Garay
Nickel

Re: Error web_api_show_package

Jump to solution

Hi Robert,

I show file ".elg".

[Tue Mar 20 15:51:33 BRT 2018 com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: The parameters that were received: userRequestGateway:(-g)=FW_1
[Tue Mar 20 15:51:33 BRT 2018 com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Limit number of object per page: 10
[Tue Mar 20 15:51:33 BRT 2018 com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Local Ips: [192.168.1.2, 172.16.1.100, 10.25.3.250, 127.0.0.1]
[Tue Mar 20 15:51:35 BRT 2018 com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Login As root: true
[Tue Mar 20 15:51:35 BRT 2018 com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Login with 'read-only' flag.
[Tue Mar 20 15:51:36 BRT 2018 com.checkpoint.mgmt_api.examples.MyLogger.severe()SEVERE]: An error occurred while logging in to the server Error: failed to get string data
[Tue Mar 20 15:51:36 BRT 2018 com.checkpoint.mgmt_api.examples.ShowPackageTool.logoutReportAndExit()INFO]: Script stopped running due to severe error!
[Tue Mar 20 15:51:36 BRT 2018 com.checkpoint.mgmt_api.examples.ShowPackageTool.logoutReportAndExit()INFO]: dirPath: /opt/CPsuite-R80/fw1/scripts/c3f05923-3cbb-4dd3-a334-17142aa2ae09
[Tue Mar 20 15:51:36 BRT 2018 com.checkpoint.mgmt_api.examples.ShowPackageTool.logoutReportAndExit()INFO]: tarGzPath: show_package-2018-03-20_03-51-32.tar.gz

- Why are you exporting the policy out of your management?

We export the policies from the management, however we can not visualize the IPs that the groups in the ".csv" file.

Thanks for answering.

0 Kudos
Highlighted
Employee++
Employee++

Re: Error web_api_show_package

Jump to solution

Hi Simon,

The tool reports that it failed to login to the management server (login as root).

Try logging in using user name and possword instead.

If it still fails, run on the management server "api status" command and paste the output here.

Robert.

Simon_Garay
Nickel

Re: Error web_api_show_package

Jump to solution

Hi Robert,

The api process was stopped.  

[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]# api restart
2018-Mar-21 11:03:07 - API already stopped.
2018-Mar-21 11:03:07 - Starting API...
. . . . . . . . . . . . . . . . . . . .
2018-Mar-21 11:04:37 - API started successfully.
[Expert@MGMT-PRI:0]# api status

API Settings:
---------------------
Accessibility: Require all granted
Automatic Start: Enabled

Processes:

Name State PID More Information
-------------------------------------------------
API Started 7142
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: Started
--------------------------------------------

I really appreciate your help.

Best regards !

Simon_Garay
Nickel

Re: Error web_api_show_package

Jump to solution

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

0 Kudos
Employee++
Employee++

Re: Error web_api_show_package

Jump to solution

your login request to the server fails due to an authentication error.

please verify that you can connect to the server using SmartConsole GUI with the same credentials.

0 Kudos