Managing Edge Gateway from vCloud director portal return error - java.lang.NullPointerException



java.lang.NullPointerException is generic error message on the vCloud director.






Cause :

If the error in the vCloud director logs contains the below highlighted messages, then this is because of the inconsistency between the vCloud director database and vCenter/NSX database for the problematic edge.

This could happen if the edge interface was directly modified on the vCenter.

Error in the logs :

2019-03-28 11:27:59,796 | INFO     | metadataRefreshTimer      | AbstractReloadingMetadataProvider | Next refresh cycle for metadata provider 'nhvr' will occur on '2019-03-28T04:27:59.796Z' ('2019-03-28T14:27:59.796+10:00' local time) |
2019-03-28 11:28:00,007 | WARN     | pool-jetty-82             | Edge                           |  feature SimpleProxiedFeatures already registered before  | requestId=ab06045e-2cbe-4cb6-a7e3-cb8e68272fc2,request=POST https://director.cloud.com/cloud/amfsecure,requestTime=1553736479769,remoteAddress=10.10.2.209:53564,userAgent=Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (...,accept=*/* method=networkService.retrieveGateway
2019-03-28 11:28:00,007 | WARN     | pool-jetty-82             | Edge                           |  feature SimpleProxiedFeatures already registered before  | requestId=ab06045e-2cbe-4cb6-a7e3-cb8e68272fc2,request=POST https://director.cloud.com/cloud/amfsecure,requestTime=1553736479769,remoteAddress=10.10.2.209:53564,userAgent=Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (...,accept=*/* method=networkService.retrieveGateway
2019-03-28 11:28:00,142 | WARN     | pool-jetty-82             | BatchTask                      | Error executing backend call. | requestId=ab06045e-2cbe-4cb6-a7e3-cb8e68272fc2,request=POST https://director.cloud.com/cloud/amfs
ecure,requestTime=1553736479769,remoteAddress=10.10.2.209:53564,userAgent=Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (...,accept=*/* method=networkService.retrieveGateway
java.lang.NullPointerException
        at java.util.UUID.fromString(UUID.java:192)
        at com.vmware.vcloud.networking.model.edge.specconverter.InterfaceSpecToDtoConverter.convertInterface(InterfaceSpecToDtoConverter.java:180)
        at com.vmware.vcloud.networking.model.edge.specconverter.InterfaceSpecToDtoConverter.convertNetwork(InterfaceSpecToDtoConverter.java:148)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

How to fix :

Redeploy of the edge does not address the issue. You will need to compare the interfaces for the edge as seen by the vCloud director with the interface seen on the vCenter web client


Since the error does not allow you to pull the interface information from UI, the only way is to get it from the vCloud director database.

Select * from gateway where name = 'NAME_OF_THE_GATEWAY';
#Note the ID in the first column

Select * from gateway_interface where gateway_id = PASTE_THE_ID_NOTED;
#The ID is pasted without single quotes

The above query will list the interface of the gateway as seen by the vCloud director. Match the interfaces as seen in the vCloud director database on the vCenter web client.

THIS WILL RESOLVE THE ISSUE


Hope it helps :) Cheers!!






Comments

Popular posts from this blog

vCloud director 9.7 appliance deployment step by step guide

How to Install and Uninstall Guest agent for vRA Windows machines

Unable to change Provider VDC virtual hardware support beyond version 10