Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Dave_Hoggan
Contributor
Jump to solution

mgmt_cli returns "Response body is empty"

Hi,

So, I know this works - I've used it in customer demos for ages. But now it doesn't work for me.

But I'm now trying a very simple command, but getting the following error:

[Expert@fmmanstation:0]# mgmt_cli -u fwadmin -p l3tm31n add host name "ho.dmz" ip-address "10.1.1.10"
message: "Command execution failed. Response body is empty"
code: "generic_error"

I've tried this with various commands and on two separate R80.10 installs (one management only and one a standalone). I've tried rebooting and stopping/starting the API.

Having a look around the knowledgebase, I can't see much that helps and api.elg does not seem to shed any light on the cause. Any ideas what may be causing this? 

Thanks,


Dave

0 Kudos
1 Solution

Accepted Solutions
Robert_Decker
Advisor

WoW!!!

Note the answer:

-------------------
JETTY Internal Port: 50277
APACHE Gaia Port: 4434 (a non-default port)
When running mgmt_cli commands add '--port 4434'
When using web-services, add port 4434 to the URL

View solution in original post

7 Replies
Robert_Decker
Advisor

Hi,

This is a very basic command and it runs on my machine with no problems...

Nevertheless, let's brake it down:

mgmt_cli login -u fwadmin -p l3tm31n > sid

mgmt_cli add host name "ho.dmz" ip-address "10.1.1.10" -s sid

mgmt_cli publish -s sid

mgmt_cli logout -s sid

Does this work?

Robert.

Dave_Hoggan
Contributor

Hi Robert,

Thanks for the reply. This is what I was originally trying, but here's the output - seems to fail at the very start!

[Expert@fmmanstation:0]# mgmt_cli login -u fwadmin -p l3tm31n > sid
[Expert@fmmanstation:0]# cat sid
message: "Command execution failed. Response body is empty"
code: "generic_error"
[Expert@fmmanstation:0]#

Dave

Robert_Decker
Advisor

This means that API server has returned response, which is not 200.

Please run "api status" command to verify that API server is up and running. Please paste here the response.

Are you running your commands on your management server or remotely?

Robert.

Dave_Hoggan
Contributor

Hi Robert,

Yes, it is running; I did also try api stop/start to bounce it, bt get the same results. All command are via SSH onto the management server.

[Expert@fmmanstation:0]# api status

API Settings:
---------------------
Accessibility: Require ip 127.0.0.1
Automatic Start: Enabled

Processes:

Name State PID More Information
-------------------------------------------------
API Started 15046
CPM Started 4033 Check Point Security Management Server is running and ready
FWM Started 3823

Port Details:
-------------------
JETTY Internal Port: 50277
APACHE Gaia Port: 4434 (a non-default port)
When running mgmt_cli commands add '--port 4434'
When using web-services, add port 4434 to the URL


--------------------------------------------
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>'

0 Kudos
Robert_Decker
Advisor

WoW!!!

Note the answer:

-------------------
JETTY Internal Port: 50277
APACHE Gaia Port: 4434 (a non-default port)
When running mgmt_cli commands add '--port 4434'
When using web-services, add port 4434 to the URL

Dave_Hoggan
Contributor

I read that and - for some unknown reason - completely dismissed it for the CLI.

Thanks for helping on this - much appreciated!

Dave

Adiel_Ashrov
Employee Alumnus
Employee Alumnus

Hello Dave,

I hope you have solved your issue.

Robert Decker‌ , Thank you for your assistance.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events