[ovirt-users] REST API - Problem when trying to retrieve vms list

Alexander Wels awels at redhat.com
Thu Feb 18 16:23:24 UTC 2016


On Thursday, February 18, 2016 03:58:03 PM jaumotte, styve wrote:
> Hi everybody,
> 
> Since fews days I can't get vms list from rest api. I always have the same
> return when I try https://myengine.mydomain/api/vms :
> 
> <fault>
> <reason>Operation Failed</reason>
> </fault>
> 
> I suspect that for new vm, some properties are malformed, but I can't
> identify them. If I ask https://myengine.mydomain/api/vms?search=dev , vms
> including dev in their name are return. If I ask
> https://myengine.mydomain/api/vms?search=xtypo , Operation Failed returns !
> 
> I look at the log on the engine, but I don't find any answers.
> 
> If someone have any ideas ... thank you !!
> 

Looking at the exception and the code it appears you have something strange in 
guestos_kernel_version in vm_dynamic for that VM. In particular the revision 
part of that string. Its giving an index out of bounds, and the array it is 
looking at is split from that string on '-' so I am guessing the string in the 
database ends with - instead of -nn where nn is some number.

Now I don't know how that string is populated, but it must broken somehow.

> Here the log :
> 
> 2016-02-18 16:43:03,591 ERROR
> [org.ovirt.engine.api.restapi.resource.validation.MappingExceptionMapper]
> (default task-23) [] Mapping exception while processing "GET" request for
> path "/vms" 2016-02-18 16:43:03,591 ERROR
> [org.ovirt.engine.api.restapi.resource.validation.MappingExceptionMapper]
> (default task-23) [] Exception:
> org.ovirt.engine.api.restapi.utils.MappingException:
> java.lang.reflect.InvocationTargetException at
> org.ovirt.engine.api.restapi.types.MappingLocator$MethodInvokerMapper.map(M
> appingLocator.java:155) [restapi-types.jar:] at
> org.ovirt.engine.api.restapi.resource.AbstractBackendResource.map(AbstractB
> ackendResource.java:65) [restapi-jaxrs.jar:] at
> org.ovirt.engine.api.restapi.resource.AbstractBackendResource.map(AbstractB
> ackendResource.java:61) [restapi-jaxrs.jar:] at
> org.ovirt.engine.api.restapi.resource.BackendVmsResource.mapCollection(Back
> endVmsResource.java:570) [restapi-jaxrs.jar:] at
> org.ovirt.engine.api.restapi.resource.BackendVmsResource.list(BackendVmsRes
> ource.java:94) [restapi-jaxrs.jar:] at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [rt.jar:1.8.0_71] at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:6
> 2) [rt.jar:1.8.0_71] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> l.java:43) [rt.jar:1.8.0_71] at
> java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_71] at
> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:1
> 37) [resteasy-jaxrs-3.0.10.Final.jar:] at
> org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethod
> Invoker.java:296) [resteasy-jaxrs-3.0.10.Final.jar:] at
> org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.
> java:250) [resteasy-jaxrs-3.0.10.Final.jar:] at
> org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.
> java:237) [resteasy-jaxrs-3.0.10.Final.jar:] at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.
> java:356) [resteasy-jaxrs-3.0.10.Final.jar:] at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.
> java:179) [resteasy-jaxrs-3.0.10.Final.jar:] at
> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.servic
> e(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.10.Final.jar:] at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(Htt
> pServletDispatcher.java:56) [resteasy-jaxrs-3.0.10.Final.jar:] at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(Htt
> pServletDispatcher.java:51) [resteasy-jaxrs-3.0.10.Final.jar:] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final] at
> io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.ja
> va:86) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterH
> andler.java:130) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> org.ovirt.engine.api.common.invocation.CurrentFilter.doFilter(CurrentFilter
> .java:66) [interface-common-jaxrs.jar:] at
> org.ovirt.engine.api.common.invocation.CurrentFilter.doFilter(CurrentFilter
> .java:48) [interface-common-jaxrs.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterH
> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> org.ovirt.engine.core.aaa.filters.RestApiSessionMgmtFilter.doFilter(RestApi
> SessionMgmtFilter.java:81) [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterH
> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> org.ovirt.engine.core.aaa.filters.EnforceAuthFilter.doFilter(EnforceAuthFil
> ter.java:39) [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterH
> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> org.ovirt.engine.core.aaa.filters.LoginFilter.doFilter(LoginFilter.java:75)
> [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterH
> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> org.ovirt.engine.core.aaa.filters.NegotiationFilter.doFilter(NegotiationFil
> ter.java:113) [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterH
> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> org.ovirt.engine.core.aaa.filters.BasicAuthenticationFilter.doFilter(BasicA
> uthenticationFilter.java:90) [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterH
> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> org.ovirt.engine.core.aaa.filters.SessionValidationFilter.doFilter(SessionV
> alidationFilter.java:77) [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterH
> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> org.ovirt.engine.core.aaa.filters.EngineSessionTokenAuthenticationFilter.do
> Filter(EngineSessionTokenAuthenticationFilter.java:31) [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterH
> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> org.ovirt.engine.core.aaa.filters.RestApiSessionValidationFilter.doFilter(R
> estApiSessionValidationFilter.java:35) [aaa.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterH
> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> org.ovirt.engine.api.common.security.CSRFProtectionFilter.doFilter(CSRFProt
> ectionFilter.java:111) [interface-common-jaxrs.jar:] at
> org.ovirt.engine.api.common.security.CSRFProtectionFilter.doFilter(CSRFProt
> ectionFilter.java:102) [interface-common-jaxrs.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterH
> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> org.ovirt.engine.api.common.security.CORSSupportFilter.doFilter(CORSSupport
> Filter.java:183) [interface-common-jaxrs.jar:] at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterH
> andler.java:132) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java
> :85) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequ
> est(ServletSecurityRoleHandler.java:62)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(Servle
> tDispatchingHandler.java:36) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final]
> at
> org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.h
> andleRequest(SecurityContextAssociationHandler.java:78) at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler
> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.hand
> leRequest(SSLInformationAssociationHandler.java:131)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.hand
> leRequest(ServletAuthenticationCallHandler.java:57)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler
> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest
> (AuthenticationConstraintHandler.java:51)
> [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(
> AbstractConfidentialityHandler.java:46)
> [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandl
> er.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.hand
> leRequest(ServletSecurityConstraintHandler.java:56)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest
> (AuthenticationMechanismsHandler.java:58)
> [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.han
> dleRequest(CachedAuthenticatedSessionHandler.java:70)
> [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.security.handlers.SecurityInitialHandler.handleRequest(Security
> InitialHandler.java:76) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler
> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
> org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleReq
> uest(JACCContextIdHandler.java:61) at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler
> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler
> .java:43) [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(Servl
> etInitialHandler.java:261) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletI
> nitialHandler.java:248) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitia
> lHandler.java:77) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletI
> nitialHandler.java:167) [undertow-servlet-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
> [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
> io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:761)
> [undertow-core-1.1.8.Final.jar:1.1.8.Final] at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1
> 142) [rt.jar:1.8.0_71] at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
> 617) [rt.jar:1.8.0_71] at java.lang.Thread.run(Thread.java:745)
> [rt.jar:1.8.0_71] Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)
> [:1.8.0_71] at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> l.java:43) [rt.jar:1.8.0_71] at
> java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_71] at
> org.ovirt.engine.api.restapi.types.MappingLocator$MethodInvokerMapper.map(M
> appingLocator.java:150) [restapi-types.jar:] ... 83 more
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
>         at
> org.ovirt.engine.api.restapi.types.VersionMapper.fromKernelVersionString(Ve
> rsionMapper.java:52) [restapi-types.jar:] at
> org.ovirt.engine.api.restapi.types.VmMapper.map(VmMapper.java:446)
> [restapi-types.jar:] at
> org.ovirt.engine.api.restapi.types.VmMapper.map(VmMapper.java:330)
> [restapi-types.jar:] ... 87 more
> 
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users




More information about the Users mailing list