cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post
Highlighted
Nickel

mgmt_cli returns "Response body is empty"

Jump to solution

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
Highlighted
Employee++
Employee++

Re: mgmt_cli returns "Response body is empty"

Jump to solution

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
Highlighted
Employee++
Employee++

Re: mgmt_cli returns "Response body is empty"

Jump to solution

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.

Highlighted
Nickel

Re: mgmt_cli returns "Response body is empty"

Jump to solution

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

Highlighted
Employee++
Employee++

Re: mgmt_cli returns "Response body is empty"

Jump to solution

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.

Highlighted
Nickel

Re: mgmt_cli returns "Response body is empty"

Jump to solution

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
Highlighted
Employee++
Employee++

Re: mgmt_cli returns "Response body is empty"

Jump to solution

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

Highlighted
Nickel

Re: mgmt_cli returns "Response body is empty"

Jump to solution

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

Thanks for helping on this - much appreciated!

Dave

Highlighted
Employee+
Employee+

Re: mgmt_cli returns "Response body is empty"

Jump to solution

Hello Dave,

I hope you have solved your issue.

Robert Decker‌ , Thank you for your assistance.

0 Kudos