You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "anjanahkarthic (via GitHub)" <gi...@apache.org> on 2024/05/31 11:07:03 UTC
[I] java.lang.NullPointerException while volume list [cloudstack]
anjanahkarthic opened a new issue, #9160:
URL: https://github.com/apache/cloudstack/issues/9160
<!--
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release and main branch are affected too.
Always add information AFTER of these HTML comments, but no need to delete the comments.
-->
##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
* Bug Report
##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
~~~
UI
~~~
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main branch.
-->
~~~
4.19.0.1
~~~
##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network, advanced networking, etc. N/A otherwise
-->
Cloudstack advance networking without security group/ hypervisor XCP-NG
##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
Ubuntu 20.04
##### SUMMARY
<!-- Explain the problem/feature briefly -->
After logging into CloudStack and attempting to access volume, I was unable to view the Volume page. Instead, it generated a 500 error. When we looked at the management server log, we discovered the following.
2024-05-31 14:07:41,562 ERROR [c.c.a.ApiServer] (qtp931675031-552426:ctx-6dbad892 ctx-71659d9e) (logid:601b70d5) unhandled exception executing api command: [Ljava.lang.String;@2dce6eb3
java.lang.NullPointerException
##### STEPS TO REPRODUCE
<!--
For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.
For new features, show how the feature would be used.
-->
1.cloudstack UI
2. login cloudstack with username and password
3. select storage
4. select volume
<!-- Paste example playbooks or commands between quotes below -->
~~~
~~~
<!-- You can also paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->
~~~
I should be able to view the volume page and list volumes.
~~~
##### ACTUAL RESULTS
<!-- What actually happened? -->
500 error

<!-- Paste verbatim command output between quotes below -->
~~~
~~~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] java.lang.NullPointerException while volume list [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #9160:
URL: https://github.com/apache/cloudstack/issues/9160#issuecomment-2160935791
thanks @anjanahkarthic , I'll have a looksee if I can reproduce it, glad you have a workaround (though admittedly you shouldn't need it)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] java.lang.NullPointerException while volume list [cloudstack]
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #9160:
URL: https://github.com/apache/cloudstack/issues/9160#issuecomment-2141790214
Thanks for opening your first issue here! Be sure to follow the issue template!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] java.lang.NullPointerException while volume list [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on issue #9160:
URL: https://github.com/apache/cloudstack/issues/9160#issuecomment-2167680994
Hi @anjanahkarthic Fix PR merged, can you test/confirm the fix?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] java.lang.NullPointerException while volume list [cloudstack]
Posted by "anjanahkarthic (via GitHub)" <gi...@apache.org>.
anjanahkarthic commented on issue #9160:
URL: https://github.com/apache/cloudstack/issues/9160#issuecomment-2159808023
@DaanHoogland @sureshanaparti After further checking I was able to isolate the issue. One specific ROOT disk list was causing issue. On searching the specific disk in volume list page Below exception is generated.
Please find below log:
2024-06-07 14:13:25,031 DEBUG [c.c.a.ApiServlet] (qtp931675031-157169:ctx-7b785d71) (logid:d953fd3f) ===START=== 10.1.1.18 -- GET listall=true&keyword=ROOT-9481&page=1&pagesize=20&command=listVolumesMetrics&response=json
2024-06-07 14:13:25,031 DEBUG [c.c.a.ApiServlet] (qtp931675031-157169:ctx-7b785d71) (logid:d953fd3f) Two factor authentication is already verified for the user 2, so skipping
2024-06-07 14:13:25,037 DEBUG [c.c.a.ApiServer] (qtp931675031-157169:ctx-7b785d71 ctx-619c2faf) (logid:d953fd3f) CIDRs from which account 'Account [{"accountName":"admin","id":2,"uuid":"c06d0817-3df7-11ee-922f-824cadec4823"}]' is allowed to perform API calls: 0.0.0.0/0,::/0
2024-06-07 14:13:25,039 INFO [o.a.c.a.DynamicRoleBasedAPIAccessChecker] (qtp931675031-157169:ctx-7b785d71 ctx-619c2faf) (logid:d953fd3f) Account [Account [{"accountName":"admin","id":2,"uuid":"c06d0817-3df7-11ee-922f-824cadec4823"}]] is Root Admin or Domain Admin, all APIs are allowed.
2024-06-07 14:13:25,040 WARN [o.a.c.a.ProjectRoleBasedApiAccessChecker] (qtp931675031-157169:ctx-7b785d71 ctx-619c2faf) (logid:d953fd3f) Project is null, ProjectRoleBasedApiAccessChecker only applies to projects, returning API [listVolumesMetrics] for user [User {"username":"admin","uuid":"c06e4c2b-3df7-11ee-922f-824cadec4823"}.] as allowed.
2024-06-07 14:13:25,040 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] (qtp931675031-157169:ctx-7b785d71 ctx-619c2faf) (logid:d953fd3f) RoleService is enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
2024-06-07 14:13:25,041 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] (qtp931675031-157169:ctx-7b785d71 ctx-619c2faf) (logid:d953fd3f) API rate limiting is disabled. We will not use ApiRateLimitService.
2024-06-07 14:13:25,049 ERROR [c.c.a.ApiServer] (qtp931675031-157169:ctx-7b785d71 ctx-619c2faf) (logid:d953fd3f) unhandled exception executing api command: [Ljava.lang.String;@28146e54
java.lang.NullPointerException
at com.cloud.api.query.dao.VolumeJoinDaoImpl.newVolumeResponse(VolumeJoinDaoImpl.java:192)
at jdk.internal.reflect.GeneratedMethodAccessor494.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
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:97)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
at com.sun.proxy.$Proxy361.newVolumeResponse(Unknown Source)
at com.cloud.api.ApiDBUtils.newVolumeResponse(ApiDBUtils.java:2016)
at com.cloud.api.query.ViewResponseHelper.createVolumeResponse(ViewResponseHelper.java:280)
at com.cloud.api.query.QueryManagerImpl.searchForVolumes(QueryManagerImpl.java:2302)
at org.apache.cloudstack.api.ListVolumesMetricsCmd.execute(ListVolumesMetricsCmd.java:45)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:172)
at com.cloud.api.ApiServer.queueCommand(ApiServer.java:803)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:624)
at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:342)
at com.cloud.api.ApiServlet$1.run(ApiServlet.java:149)
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:146)
at com.cloud.api.ApiServlet.doGet(ApiServlet.java:100)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1450)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:600)
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:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1440)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:505)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1355)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:772)
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:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:487)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:732)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:479)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:409)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
at java.base/java.lang.Thread.run(Thread.java:829)
2024-06-07 14:13:25,051 DEBUG [c.c.a.ApiServlet] (qtp931675031-157169:ctx-7b785d71 ctx-619c2faf) (logid:d953fd3f) ===END=== 10.1.1.18 -- GET listall=true&keyword=ROOT-9481&page=1&pagesize=20&command=listVolumesMetrics&response=json
PS: After Marking the volume as 'removed' directly in Database, Volume list is loading fine
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] java.lang.NullPointerException while volume list [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #9160:
URL: https://github.com/apache/cloudstack/issues/9160#issuecomment-2164697035
@anjanahkarthic I did not reproduce but analused tjhe code and build in some protection against the NPE. Could you reproduce the issue and can you test the PR #9235 ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] java.lang.NullPointerException while volume list [cloudstack]
Posted by "anjanahkarthic (via GitHub)" <gi...@apache.org>.
anjanahkarthic commented on issue #9160:
URL: https://github.com/apache/cloudstack/issues/9160#issuecomment-2143305344
@DaanHoogland NO stacktrace was generated in the error log . adding the full log snippets for your reference
~~~
2024-05-31 14:07:41,528 DEBUG [c.c.a.ApiServlet] (qtp931675031-552426:ctx-6dbad892) (logid:601b70d5) ===START=== 10.1.1.6 -- GET listall=true&page=1&pagesize=20&command=listVolumesMetrics&response=json
2024-05-31 14:07:41,528 DEBUG [c.c.a.ApiServlet] (qtp931675031-552426:ctx-6dbad892) (logid:601b70d5) Two factor authentication is already verified for the user 2, so skipping
2024-05-31 14:07:41,534 DEBUG [c.c.a.ApiServer] (qtp931675031-552426:ctx-6dbad892 ctx-71659d9e) (logid:601b70d5) CIDRs from which account 'Account [{"accountName":"admin","id":2,"uuid":"c06d0817-3df7-11ee-922f-824cadec4823"}]' is allowed to perform API calls: 0.0.0.0/0,::/0
2024-05-31 14:07:41,536 INFO [o.a.c.a.DynamicRoleBasedAPIAccessChecker] (qtp931675031-552426:ctx-6dbad892 ctx-71659d9e) (logid:601b70d5) Account [Account [{"accountName":"admin","id":2,"uuid":"c06d0817-3df7-11ee-922f-824cadec4823"}]] is Root Admin or Domain Admin, all APIs are allowed.
2024-05-31 14:07:41,537 WARN [o.a.c.a.ProjectRoleBasedApiAccessChecker] (qtp931675031-552426:ctx-6dbad892 ctx-71659d9e) (logid:601b70d5) Project is null, ProjectRoleBasedApiAccessChecker only applies to projects, returning API [listVolumesMetrics] for user [User {"username":"admin","uuid":"c06e4c2b-3df7-11ee-922f-824cadec4823"}.] as allowed.
2024-05-31 14:07:41,537 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] (qtp931675031-552426:ctx-6dbad892 ctx-71659d9e) (logid:601b70d5) RoleService is enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
2024-05-31 14:07:41,538 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] (qtp931675031-552426:ctx-6dbad892 ctx-71659d9e) (logid:601b70d5) API rate limiting is disabled. We will not use ApiRateLimitService.
2024-05-31 14:07:41,562 ERROR [c.c.a.ApiServer] (qtp931675031-552426:ctx-6dbad892 ctx-71659d9e) (logid:601b70d5) unhandled exception executing api command: [Ljava.lang.String;@2dce6eb3
java.lang.NullPointerException
2024-05-31 14:07:41,563 DEBUG [c.c.a.ApiServlet] (qtp931675031-552426:ctx-6dbad892 ctx-71659d9e) (logid:601b70d5) ===END=== 10.1.1.6 -- GET listall=true&page=1&pagesize=20&command=listVolumesMetrics&response=json
~~~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] java.lang.NullPointerException while volume list [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #9160:
URL: https://github.com/apache/cloudstack/issues/9160#issuecomment-2144656875
@anjanahkarthic , I just tried to reproduce in a alma9/xcpng82 env but the volumes list is available without problems. Can you investigate your DB of try the API to see what would be expected and troubleshoot what is hindering your UI? By the looks of your log the API will fail as well, but you never know.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] java.lang.NullPointerException while volume list [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #9160:
URL: https://github.com/apache/cloudstack/issues/9160#issuecomment-2142431187
@anjanahkarthic do you have a stacktrace to come with that ERROR log? or any debug/warn logging related to logid:601b70d5 ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] java.lang.NullPointerException while volume list [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #9160:
URL: https://github.com/apache/cloudstack/issues/9160#issuecomment-2167724675
fixed in #9235
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] java.lang.NullPointerException while volume list [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed issue #9160: java.lang.NullPointerException while volume list
URL: https://github.com/apache/cloudstack/issues/9160
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org