When trying to use "vcd vapp add-vm-scratch" a 500 error is thrown no matter the settings. The error from the CLI:
$ vcd vapp add-vm-scratch Bootstrap_LNX -vm vmname -cn vmname -d description -os rhel7_64Guest -cpu 2 -cps 2 -crm 2 -m 1024 -aae -deploy -power-on
Usage: vcd vapp add-vm-scratch [OPTIONS] <target-vapp>
Try "vcd vapp add-vm-scratch -h" for help.
Error: Status code: 500/INTERNAL_SERVER_ERROR, [ b21e312e-a2c1-4be4-aefc-81ed7598fea3 ] Unable to perform this action. Contact your cloud administrator. (request id: b21e312e-a2c1-4be4-aefc-81ed7598fea3)
"vcd vapp add-vm" works just fine.
This is the error on the server side:
2020-04-17 16:50:39,157 | ERROR | pool-jetty-30566535 | DefaultExceptionMapper | Internal server exception | requestId=969265b8-6d12-4cd3-9360-15c4b26ca4a9,request=POST https://[redacted]/api/vApp/vapp-5ac20698-894f-4aef-aae0-55d572c5c904/action/recomposeVApp,requestTime=1587142238059,remoteAddress=[redacted]:49748,userAgent=python-requests/2.23.0,accept=application/*+xml;version 32.0
java.lang.NullPointerException
at com.vmware.vcloud.api.rest.handlers.utils.VAppUtils.populateAllVappNetworks(VAppUtils.java:2224)
at com.vmware.vcloud.api.rest.handlers.VAppHandler.recomposeVApp(VAppHandler.java:1406)
at sun.reflect.GeneratedMethodAccessor40617.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:191)
at com.vmware.vcloud.api.rest.jaxrs.ContextClassLoaderInvoker.invoke(ContextClassLoaderInvoker.java:27)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:101)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:309)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:189)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:303)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:222)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:278)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1780)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
at com.vmware.vcloud.api.rest.diagnostics.DiagnosticFilter.doFilter(DiagnosticFilter.java:33)
at com.vmware.vcloud.api.rest.diagnostics.RestApiDiagnosticsInterceptor.doFilter(RestApiDiagnosticsInterceptor.java:129)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at com.vmware.vcloud.api.framework.web.ExtensibilityFilter.doFilter(ExtensibilityFilter.java:132)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at com.vmware.vcloud.security.filters.ValidityExceptionFilter.doFilterHttp(ValidityExceptionFilter.java:47)
at com.vmware.vcloud.security.filters.HttpFilterBean.doFilter(HttpFilterBean.java:35)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at com.vmware.vcloud.security.web.RestSessionFilter.doFilter(RestSessionFilter.java:244)
at com.vmware.vcloud.api.rest.diagnostics.RestApiDiagnosticsInterceptor.doFilter(RestApiDiagnosticsInterceptor.java:129)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at com.vmware.vcloud.security.web.CellLivenessCheckFilter.doFilter(CellLivenessCheckFilter.java:54)
at com.vmware.vcloud.api.rest.diagnostics.RestApiDiagnosticsInterceptor.doFilter(RestApiDiagnosticsInterceptor.java:129)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at com.vmware.vcloud.security.web.SecurityContextCleanerFilter.doFilter(SecurityContextCleanerFilter.java:32)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at com.vmware.vcloud.api.rest.versioning.AcceptHeaderFilter.doFilter(AcceptHeaderFilter.java:111)
at com.vmware.vcloud.api.rest.diagnostics.RestApiDiagnosticsInterceptor.doFilter(RestApiDiagnosticsInterceptor.java:129)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at com.vmware.vcloud.security.filters.ConversationFilter$1.run(ConversationFilter.java:39)
at com.vmware.vcloud.security.filters.ConversationFilter$1.run(ConversationFilter.java:37)
at com.vmware.vcloud.common.persist.ConversationContextExecutor.execute(ConversationContextExecutor.java:89)
at com.vmware.vcloud.security.filters.ConversationFilter.doFilter(ConversationFilter.java:45)
at com.vmware.vcloud.api.rest.diagnostics.RestApiDiagnosticsInterceptor.doFilter(RestApiDiagnosticsInterceptor.java:129)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
at com.vmware.vcloud.common.web.deployment.impl.RequestDiagnosticFilter.doFilter(RequestDiagnosticFilter.java:144)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1767)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:513)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:493)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:539)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:259)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at com.vmware.vcloud.common.threading.ExtendedJettyQueuedThreadPool.runJob(ExtendedJettyQueuedThreadPool.java:33)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:748)
When trying to use "vcd vapp add-vm-scratch" a 500 error is thrown no matter the settings. The error from the CLI:
"vcd vapp add-vm" works just fine.
This is the error on the server side:
There is a similar issue in pyvcloud here:
https://github.com/vmware/pyvcloud/issues/639
That looks related.