Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Bob_Zimmerman
Advisor

"Null Pointer exception" when dumping objects?

I recently upgraded a system I'm using for development from R80.40 to R81.10. I'm dumping all the objects to find new types I don't yet handle with a script like this:

mgmt_cli -r true login read-only true > session.txt
for offset in $(seq 0 500 11068); do
echo "Dumping offset ${offset}..."
mgmt_cli --format json -s session.txt show objects details-level full limit 500 offset ${offset} > objects_${offset}.json
done
mgmt_cli -s session.txt logout
rm session.txt

11068 because that's the total I got from a quick 'show objects limit 1'.

Most of the batches were in the hundreds of kilobytes, but one was 77 bytes. It contains only this:

{
  "code" : "generic_error",
  "message" : "Null Pointer exception: null"
}

By adjusting my stride over that particular block of objects, I found it was caused by the object at offset 6870.

Weirdly, when I change the details-level to uid or standard, I get output. Here's the object in question:

{
  "from" : 6871,
  "to" : 6871,
  "total" : 11068,
  "objects" : [ {
    "uid" : "0aa95e19-94a7-4e94-a1c1-7115c6187c61",
    "name" : "Online Services",
    "type" : "data-center-server",
    "domain" : {
      "uid" : "a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
      "name" : "Check Point Data",
      "domain-type" : "data domain"
    },
    "icon" : "NetworkObjects/ExternalDataSource",
    "color" : "black"
  } ]
}

Does anybody know what could be wrong with this object? I didn't create it, so I assume others would have the same problem. It's the only "data-center-server" object in my config.

0 Kudos
8 Replies
PhoneBoy
Admin
Admin

@Omer_Kleinstern any idea how to troubleshoot this?
I suspect we may need a TAC case.

0 Kudos
Bob_Zimmerman
Advisor

That’s kind of what I was thinking. It’s ultimately not that important. I tried making a totally fresh R81.10 management in a VM, and the same object with the same UUID exists, but ‘details-level full’ works.

I might poke around in the database directly, or I might give up and rebuild my config from scratch. It’ll be annoying rebuilding, but would give me an excuse to write a build script to reproduce my config on a new box.

0 Kudos
Bob_Zimmerman
Advisor

Well, I built a totally clean R81.10 management and I'm hitting the same problem on the same object:

[Expert@DallasSA]# mgmt_cli -r true -f json show object uid 0aa95e19-94a7-4e94-a1c1-7115c6187c61 details-level full
{
  "code" : "generic_error",
  "message" : "Null Pointer exception: null"
}
[Expert@DallasSA]# mgmt_cli -r true -f json show generic-object uid 0aa95e19-94a7-4e94-a1c1-7115c6187c61                   
{
  "domainsPreset" : null,
  "objectValidationState" : null,
  "dynamicContent" : null,
  "color" : "BLACK",
  "cmsType" : "OnlineServices",
  "propertyFields" : [ {
    "objId" : "dd564c21-a160-4a9b-b5a5-9c4764f1fc05",
    "checkPointObjId" : null,
    "domainsPreset" : null,
    "domainId" : "a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
    "name" : "OnlineServices_Dummy",
    "displayName" : "Use Online Services",
    "value" : "1",
    "groupName" : "Online Services",
    "type" : "Bool",
    "required" : "NotRequired",
    "folderPath" : "a7a569db-cd04-4f1c-bc8d-94dbfc22b150",
    "text" : null,
    "folder" : "a7a569db-cd04-4f1c-bc8d-94dbfc22b150",
    "is_owned" : true
  } ],
  "uid" : "0aa95e19-94a7-4e94-a1c1-7115c6187c61",
  "folder" : {
    "uid" : "a7a569db-cd04-4f1c-bc8d-94dbfc22b150",
    "name" : "Check Point Settings"
  },
  "domain" : {
    "uid" : "a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
    "name" : "Check Point Data"
  },
  "meta-info" : {
    "metaOwned" : false,
    "lockStateResponse" : null,
    "validationState" : "OK",
    "deletable" : true,
    "renameable" : true,
    "newObject" : false,
    "lastModifytime" : 1625138944921,
    "lastModifier" : "System",
    "creationTime" : 1625138944921,
    "creator" : "System"
  },
  "tags" : [ ],
  "name" : "Online Services",
  "icon" : "NetworkObjects/ExternalDataSource",
  "comments" : "",
  "display-name" : "",
  "customFields" : null,
  "_original_type" : "Cms"
}

For comparison, here's the 'show generic-object' data from another management server where 'show object ... details-level full' works:

[Expert@TestSC:0]# mgmt_cli -r true -f json show object uid 0aa95e19-94a7-4e94-a1c1-7115c6187c61 details-level full
{
  "object" : {
    "uid" : "0aa95e19-94a7-4e94-a1c1-7115c6187c61",
    "name" : "Online Services",
    "type" : "data-center-server",
    "domain" : {
      "uid" : "a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
      "name" : "Check Point Data",
      "domain-type" : "data domain"
    },
    "data-center-type" : "OnlineServices",
    "properties" : [ {
      "name" : "OnlineServices_Dummy",
      "value" : "1"
    } ],
    "comments" : "",
    "color" : "black",
    "icon" : "NetworkObjects/ExternalDataSource",
    "tags" : [ ],
    "meta-info" : {
      "lock" : "unlocked",
      "validation-state" : "ok",
      "last-modify-time" : {
        "posix" : 1603004208808,
        "iso-8601" : "2020-10-18T06:56+0000"
      },
      "last-modifier" : "System",
      "creation-time" : {
        "posix" : 1603004208808,
        "iso-8601" : "2020-10-18T06:56+0000"
      },
      "creator" : "System"
    },
    "read-only" : true
  }
}
[Expert@TestSC:0]# mgmt_cli -r true -f json show generic-object uid 0aa95e19-94a7-4e94-a1c1-7115c6187c61
{
  "domainsPreset" : null,
  "objectValidationState" : null,
  "dynamicContent" : null,
  "color" : "BLACK",
  "cmsType" : "OnlineServices",
  "propertyFields" : [ {
    "objId" : "675b0f05-57a9-48bf-b8d0-af276ff5cb60",
    "checkPointObjId" : null,
    "domainsPreset" : null,
    "domainId" : "a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
    "name" : "OnlineServices_Dummy",
    "displayName" : "Use Online Services",
    "value" : "1",
    "groupName" : "Online Services",
    "type" : "Bool",
    "required" : "NotRequired",
    "folderPath" : "a7a569db-cd04-4f1c-bc8d-94dbfc22b150",
    "text" : null,
    "folder" : "a7a569db-cd04-4f1c-bc8d-94dbfc22b150",
    "is_owned" : true
  } ],
  "uid" : "0aa95e19-94a7-4e94-a1c1-7115c6187c61",
  "folder" : {
    "uid" : "a7a569db-cd04-4f1c-bc8d-94dbfc22b150",
    "name" : "Check Point Settings"
  },
  "domain" : {
    "uid" : "a0bbbc99-adef-4ef8-bb6d-defdefdefdef",
    "name" : "Check Point Data"
  },
  "meta-info" : {
    "metaOwned" : false,
    "lockStateResponse" : null,
    "validationState" : "OK",
    "deletable" : true,
    "renameable" : true,
    "newObject" : false,
    "lastModifytime" : 1603004208808,
    "lastModifier" : "System",
    "creationTime" : 1603004208808,
    "creator" : "System"
  },
  "tags" : [ ],
  "name" : "Online Services",
  "icon" : "NetworkObjects/ExternalDataSource",
  "comments" : "",
  "display-name" : "",
  "customFields" : null,
  "_original_type" : "Cms"
}

 

The generic-object output only differs in three places: meta-info.creationTime, meta-info.lastModifytime, and propertyFields.objId. The UUID in the propertyFields.objId does not correspond to an object's UUID on either management server (I checked both values on both managements via 'show object uid ...' and 'show generic-object uid ...').

0 Kudos
Bob_Zimmerman
Advisor

Over the weekend, I have built several completely clean R81.10 VMs and it's consistently broken on them. I'll be opening a ticket Monday.

Starting to think the instances above where it worked were on R81.

0 Kudos
Tal_Paz-Fridman
Employee
Employee

Hi Bob,

I also managed to reproduce the issue and it happened on new installations. 

However when I tried the same on working environments the issue did not happen (perhaps the object was already created or initialized?).

I opened an issue for the relevant development team. 

 

 

0 Kudos
Bob_Zimmerman
Advisor

Thanks for the confirmation! I opened a ticket just in case that can justify more attention than a purely-internal task.

0 Kudos
Tal_Paz-Fridman
Employee
Employee

Update:

Fix for issue for delivered to our next Major Release and is also targeted to R81.10 JHF (still do not know exact build that will include it)

 

Bob_Zimmerman
Advisor

Just checked with a clean installation and the current ongoing jumbo (R81.10 jumbo 55), and the issue is still present. Not a big deal for me, which is why I haven't been testing more frequently. Still, thought I'd update.