Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Jesus_Cano
Collaborator

Failed to run gateways-and-servers command

Hi,

Im running the api_show_package to export all config but im getting this error:

[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.MyLogger.severe()SEVERE]: Failed to run gateways-and-servers command. Message: '[55.255.255.240] Is not a valid IPv4 netmask'. Status Code: '400'

Anyone knows how can change that mask? or where can i locate it? 

3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: The parameters that were received:  domain:(-d)=MDS folderPath:(-o)=/tmp/ww_policies.tar.gz username:(-u)=admin password:(-p)=*****
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Limit number of object per page: 10
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Login As root: false
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Login with 'read-only' flag. 
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.ShowPackageTool.writeTheVersionsToTheLogger()INFO]: Management API running version: 1.8.1
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.ShowPackageTool.writeTheVersionsToTheLogger()INFO]: show_package v2.0.6
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.ShowPackageTool.writeTheVersionsToTheLogger()INFO]: Chosen port: 443
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Chosen server IP: 127.0.0.1
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Login response: {"session-timeout":600,"api-server-version":"1.8.1","user-uid":"50ba22d2-70bd-4e98-8c51-b9af715a71e7","last-login-was-at":{"iso-8601":"2026-03-17T16:53+0100","posix":1773762822303},"user-name":"admin","read-only":true,"url":"https:\/\/127.0.0.1:443\/web_api","sid":"_3g3z4AHAdhGdxkN3Bb8q-Wt7ABoHFjH9Cp4KCEXUBI"}
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.MyLogger.debug()DEBUG]: Run command: 'show-gateways-and-servers' with details level 'full'
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.MyLogger.severe()SEVERE]: Failed to run gateways-and-servers command. Message: '[55.255.255.240] Is not a valid IPv4 netmask'. Status Code: '400'
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.ShowPackageTool.logoutReportAndExit()INFO]: Script stopped running due to severe error!
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.ShowPackageTool.logoutReportAndExit()INFO]: dirPath: /tmp/1f0766f0-0801-40d4-bf1a-e8920822e0b3
[3/18/26 8:29 AM com.checkpoint.mgmt_api.examples.ShowPackageTool.logoutReportAndExit()INFO]: tarGzPath: /tmp/ww_policies.tar.gz

0 Kudos
2 Replies
simonemantovani

What happens if you try to run directly from an SSH shell on the management the command: mgmt_cli show gateways-and-servers details-level full" ?

0 Kudos
Bob_Zimmerman
MVP Gold
MVP Gold

See if you can find which object it's complaining about. Use 'limit 1 offset 0', then increase the offset until you get the error. Once you have the problem object's offset, set 'details-level uid' to get the problem object's UUID.

From there, 'show object uid <UUID>' will tell you the name of the object.

Once you have that, look at the object in SmartConsole. I bet one of the interfaces in the topology table has a weird netmask specified.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events