Hi Nicolas, thanks for your reply. I did what you suggested but the set was empty. I found the issue anyway though. The Table has shown, that there were templates assigned to image store with ID "2" but there is no store with that ID. I only have one and it has ID 1. So I deleted every template entry with that ID and voila, Template Menu works again.
Thanks for your help! Best regards Vincent On 2021/02/09 02:48:12, Nicolas Vazquez <nicolas.vazq...@shapeblue.com> wrote: > Hi Vincent, > > I've checked the codebase for that NPE and it seems like there is a reference > on the 'template_store_ref' table for a removed data store. Can you please > check if the following query retrieves some data? In case it does, you can > remove the records from the template_store_ref and retry the listing > operation: > > select t.id, t.store_id, t.template_id, i.name, i.removed from > template_store_ref t join image_store i on (t.store_id = i.id) where > i.removed is not null; > > > Regards, > > Nicolas Vazquez > > ________________________________ > From: Vincent Hermes <vincenthermes2...@gmail.com> > Sent: Monday, February 8, 2021 10:06 AM > To: users@cloudstack.apache.org <users@cloudstack.apache.org> > Subject: ListTemplates - Internal Server Error > > Hi Guys, > > so we upgraded from 4.14 to 4.15 and our template menu on Primate opens the > /client/#/exception/500 Page now. > > MGMT Log in this case: > ----------------------------------------------------------------------------------------------------------------------- > 2021-02-08 13:58:50,442 DEBUG [c.c.a.ApiServlet] > (qtp996796369-408:ctx-7c2a7827) (logid:82723f2b) ===START=== 172.~.~.~ -- > GET > listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json > 2021-02-08 13:58:50,448 DEBUG [c.c.a.ApiServer] > (qtp996796369-408:ctx-7c2a7827 ctx-dc56388c) (logid:82723f2b) CIDRs from > which account 'Acct[94b8e309-734d-11ea-bb62-005056972d0a-admin]' is allowed > to perform API calls: 0.0.0.0/0,::/0 > 2021-02-08 13:58:50,461 ERROR [c.c.a.ApiServer] > (qtp996796369-408:ctx-7c2a7827 ctx-dc56388c) (logid:82723f2b) unhandled > exception executing api command: [Ljava.lang.String;@30ecb2b6 > java.lang.NullPointerException > at > com.cloud.api.query.dao.TemplateJoinDaoImpl.newTemplateResponse(TemplateJoinDaoImpl.java:164) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.base/java.lang.reflect.Method.invoke(Method.java:567) > at > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) > at > com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175) > at > org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) > at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) > at com.sun.proxy.$Proxy301.newTemplateResponse(Unknown Source) > at com.cloud.api.ApiDBUtils.newTemplateResponse(ApiDBUtils.java:2012) > at > com.cloud.api.query.ViewResponseHelper.createTemplateResponse(ViewResponseHelper.java:590) > at > com.cloud.api.query.QueryManagerImpl.listTemplates(QueryManagerImpl.java:3339) > at > org.apache.cloudstack.api.command.user.template.ListTemplatesCmd.execute(ListTemplatesCmd.java:180) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156) > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:764) > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:588) > at > com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:321) > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:134) > at > org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55) > at > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102) > at > org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52) > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:131) > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:93) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:645) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:750) > at > org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1386) > at > org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755) > at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:547) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) > at > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) > at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1300) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) > at > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580) > at > org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1215) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:767) > at > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) > at org.eclipse.jetty.server.Server.handle(Server.java:500) > at > org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) > at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547) > at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) > at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) > at > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) > at > org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:543) > at > org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:398) > at > org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161) > at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) > at > org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) > at > org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) > at > org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) > at java.base/java.lang.Thread.run(Thread.java:835) > 2021-02-08 13:58:50,467 DEBUG [c.c.a.ApiServlet] > (qtp996796369-408:ctx-7c2a7827 ctx-dc56388c) (logid:82723f2b) ===END=== > 172.~.~.~ -- GET > listall=true&templatefilter=all&showunique=true&page=1&pagesize=20&command=listTemplates&response=json > ------------------------------------------------------------------------------------------------------------------- > > "https://172.~.~.~:8443/client/api?command=listTemplates" (Very true and > normal behaviour) : > ------------------------------------------------------------------------------------------------------------------- > <listtemplatesresponse cloud-stack-version="4.15.0.0"> > <errorcode>431</errorcode> > <cserrorcode>9999</cserrorcode> > <errortext> > Unable to execute API command listtemplates due to missing parameter > templatefilter > </errortext> > </listtemplatesresponse> > ------------------------------------------------------------------------------------------------------------------- > > But: > https://172.~.~.~:8443/client/api?command=listTemplates&templatefilter=all > (Unhandled exception / Unknown API Command) : > ------------------------------------------------------------------------------------------------------------------- > <listtemplatesresponse cloud-stack-version="4.15.0.0"> > <errorcode>530</errorcode> > <cserrorcode>9999</cserrorcode> > </listtemplatesresponse> > ------------------------------------------------------------------------------------------------------------------- > > Our console is not working as well but that should be a different problem. Do > you guys know anything bout dat? > > Thanks in advance > Vincent > > nicolas.vazq...@shapeblue.comĀ > www.shapeblue.com > 3 London Bridge Street, 3rd floor, News Building, London SE1 9SGUK > @shapeblue > > > >