[
https://issues.apache.org/jira/browse/CLOUDSTACK-8708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14970882#comment-14970882
]
ASF GitHub Bot commented on CLOUDSTACK-8708:
--------------------------------------------
Github user borisroman commented on the pull request:
https://github.com/apache/cloudstack/pull/932#issuecomment-150553777
@DaanHoogland Could you please have a look again?
```
WARN [c.c.a.m.AgentManagerImpl] (StatsCollector-1:ctx-94b6fe0e) Exception
while sending
java.lang.ArrayIndexOutOfBoundsException: 0
at
com.cloud.agent.manager.AgentManagerImpl.send(AgentManagerImpl.java:365)
at
com.cloud.agent.manager.AgentManagerImpl.easySend(AgentManagerImpl.java:938)
at
com.cloud.resource.ResourceManagerImpl.getHostStatistics(ResourceManagerImpl.java:2485)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy159.getHostStatistics(Unknown Source)
at
com.cloud.server.StatsCollector$HostCollector.runInContext(StatsCollector.java:380)
at
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
WARN [c.c.r.ResourceManagerImpl] (StatsCollector-1:ctx-94b6fe0e) Unable to
obtain host 7 statistics.
WARN [c.c.s.StatsCollector] (StatsCollector-1:ctx-94b6fe0e) Received
invalid host stats for host: 7
WARN [c.c.a.m.AgentManagerImpl] (StatsCollector-1:ctx-d81486fe) Exception
while sending
java.lang.ArrayIndexOutOfBoundsException: 0
at
com.cloud.agent.manager.AgentManagerImpl.send(AgentManagerImpl.java:365)
at
com.cloud.agent.manager.AgentManagerImpl.easySend(AgentManagerImpl.java:938)
at
com.cloud.resource.ResourceManagerImpl.getHostStatistics(ResourceManagerImpl.java:2485)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy159.getHostStatistics(Unknown Source)
at
com.cloud.server.StatsCollector$HostCollector.runInContext(StatsCollector.java:380)
at
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
WARN [c.c.r.ResourceManagerImpl] (StatsCollector-1:ctx-d81486fe) Unable to
obtain host 7 statistics.
WARN [c.c.s.StatsCollector] (StatsCollector-1:ctx-d81486fe) Received
invalid host stats for host: 7
WARN [o.a.c.s.d.l.CloudStackPrimaryDataStoreLifeCycleImpl]
(1660072634@qtp-1397971223-12:ctx-2c1dc089 ctx-28ffad24 ctx-73d05ad9) Unable to
establish a connection between Host[-7-Routing] and
org.apache.cloudstack.storage.datastore.PrimaryDataStoreImpl@4b8ae89a
java.lang.NullPointerException
at
org.apache.cloudstack.storage.datastore.provider.DefaultHostListener.hostConnect(DefaultHostListener.java:91)
at
com.cloud.storage.StorageManagerImpl.connectHostToSharedPool(StorageManagerImpl.java:954)
at
org.apache.cloudstack.storage.datastore.lifecycle.CloudStackPrimaryDataStoreLifeCycleImpl.attachCluster(CloudStackPrimaryDataStoreLifeCycleImpl.java:414)
at
com.cloud.storage.StorageManagerImpl.createPool(StorageManagerImpl.java:708)
at
com.cloud.storage.StorageManagerImpl.createPool(StorageManagerImpl.java:191)
at
org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd.execute(CreateStoragePoolCmd.java:163)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
at com.cloud.api.ApiServer.queueCommand(ApiServer.java:703)
at com.cloud.api.ApiServer.handleRequest(ApiServer.java:528)
at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:296)
at com.cloud.api.ApiServlet$1.run(ApiServlet.java:127)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:124)
at com.cloud.api.ApiServlet.doGet(ApiServlet.java:86)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
WARN [o.a.c.s.d.l.CloudStackPrimaryDataStoreLifeCycleImpl]
(1660072634@qtp-1397971223-12:ctx-2c1dc089 ctx-28ffad24 ctx-73d05ad9) No host
can access storage pool
org.apache.cloudstack.storage.datastore.PrimaryDataStoreImpl@4b8ae89a on
cluster 7
INFO [c.c.a.ApiServer] (1660072634@qtp-1397971223-12:ctx-2c1dc089
ctx-28ffad24 ctx-73d05ad9) Failed to add data store: Failed to access storage
pool
```
> Use Google Gson 2.3.1
> ---------------------
>
> Key: CLOUDSTACK-8708
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8708
> Project: CloudStack
> Issue Type: Improvement
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Affects Versions: 4.6.0
> Reporter: Wido den Hollander
> Assignee: Daan Hoogland
> Priority: Critical
> Labels: gson, reflection
>
> Currently CloudStack uses Google GSON 1.7.2 which is from 30-Sep-2011.
> This is a outdated version. CLOUDSTACK-8677 (Call-Home feature) uses GSON
> 2.3.1 (20-Nov-2014) which is not compatible with the current code.
> The roadmap of Gson shows that since 2.0 there is a change in casting:
> https://sites.google.com/site/gson/gson-roadmap
> "Gson 2.0 doesn’t support type adapters for primitive types."
> The "com.cloud.agent.transport.RequestTest" test in "core" fails with the new
> Gson version and this leads back to "ArrayTypeAdaptor" which does the
> serializing and de-serializing of JSON to Objects and back.
> Class<?> type = ((Class<?>)typeOfT).getComponentType();
> Fails, since getComponentType() doesn't return com.cloud.api.Command.
> This seems to be a Java Reflection issue.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)