You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Indra Pramana <in...@sg.or.id> on 2013/09/25 13:12:34 UTC

Failed to deserialize json object

Dear all,

During my upgrade attempt from CloudStack 4.1.1 to 4.2.0 earlier this week,
I failed on the step when I need to run the cloudstack-sysvmadm script to
restart the system VMs.

nohup cloudstack-sysvmadm -d IP address -u cloud -p -a > sysvm.log 2>&1 &

When I scrutinize the management server's logs, I saw these error messages
related to the console proxy system VM:

====
2013-09-24 02:35:37,722 ERROR [agent.transport.Request]
(AgentManager-Handler-4:null) Caught problem with
[{"ConsoleProxyLoadReportCommand":{"_proxyVmId":1903,"_loadInfo":"{\n
\"connections\": []\n}","contextMap":{},"wait":0}}]
com.google.gson.JsonParseException: The JsonDeserializer
com.cloud.agent.transport.ArrayTypeAdaptor@1c74f356 failed to deserialize
json object
[{"ConsoleProxyLoadReportCommand":{"_proxyVmId":1903,"_loadInfo":"{\n
\"connections\": []\n}","contextMap":{},"wait":0}}] given the type class
[Lcom.cloud.agent.api.Command;
====

More detailed logs can be found on pastebin: http://pastebin.com/EmPF8EMp

Could it be the reason why the cloudstack-sysvmadm script is unable to
restart the system VM?

Looking forward to your reply, thank you.

Cheers.

Re: Failed to deserialize json object

Posted by Dean Kamali <de...@gmail.com>.
in my case, I'm getting the same exception, and I couldn't restart
systemVms simply because all of my hypervisors are in disconnected state,
and I'm unable to remove or reconnect them.

I have downloaded new systemvm and registered it as a template, yet, that
didn't make any difference.


On Sat, Sep 28, 2013 at 2:25 PM, Kirk Kosinski <ki...@gmail.com>wrote:

> Hi, those errors are more of a symptom that system VMs weren't restarted
> rather than something that would prevent them from being restarted (via
> script or manually).  If the script is not working, did you try
> restarting the system VMs manually?  If not, try doing so using the
> CloudStack UI or API.
>
> If the system VMs have already been restarted and you are still seeing
> these errors, it may be this bug:
>
> https://issues.apache.org/jira/browse/CLOUDSTACK-3377
>
> If you're using XenServer, follow the solution in the bug comments.  For
> vSphere and KVM, verify that the MD5 of systemvm-4.2.0.iso on secondary
> storage matches the one on the management server at
> /usr/share/cloudstack-common/vms/systemvm.iso.
>
> Once the ISO is consistent on the management server, XenServer hosts and
> secondary storage, destroy the system VMs and wait for them to recreate,
> this time with the correct systemvm.iso.
>
> Best regards,
> Kirk
>
> On 09/25/2013 04:12 AM, Indra Pramana wrote:
> > Dear all,
> >
> > During my upgrade attempt from CloudStack 4.1.1 to 4.2.0 earlier this
> week,
> > I failed on the step when I need to run the cloudstack-sysvmadm script to
> > restart the system VMs.
> >
> > nohup cloudstack-sysvmadm -d IP address -u cloud -p -a > sysvm.log 2>&1 &
> >
> > When I scrutinize the management server's logs, I saw these error
> messages
> > related to the console proxy system VM:
> >
> > ====
> > 2013-09-24 02:35:37,722 ERROR [agent.transport.Request]
> > (AgentManager-Handler-4:null) Caught problem with
> > [{"ConsoleProxyLoadReportCommand":{"_proxyVmId":1903,"_loadInfo":"{\n
> > \"connections\": []\n}","contextMap":{},"wait":0}}]
> > com.google.gson.JsonParseException: The JsonDeserializer
> > com.cloud.agent.transport.ArrayTypeAdaptor@1c74f356 failed to
> deserialize
> > json object
> > [{"ConsoleProxyLoadReportCommand":{"_proxyVmId":1903,"_loadInfo":"{\n
> > \"connections\": []\n}","contextMap":{},"wait":0}}] given the type class
> > [Lcom.cloud.agent.api.Command;
> > ====
> >
> > More detailed logs can be found on pastebin:
> http://pastebin.com/EmPF8EMp
> >
> > Could it be the reason why the cloudstack-sysvmadm script is unable to
> > restart the system VM?
> >
> > Looking forward to your reply, thank you.
> >
> > Cheers.
> >
>

Re: Failed to deserialize json object

Posted by Kirk Kosinski <ki...@gmail.com>.
Hi, those errors are more of a symptom that system VMs weren't restarted
rather than something that would prevent them from being restarted (via
script or manually).  If the script is not working, did you try
restarting the system VMs manually?  If not, try doing so using the
CloudStack UI or API.

If the system VMs have already been restarted and you are still seeing
these errors, it may be this bug:

https://issues.apache.org/jira/browse/CLOUDSTACK-3377

If you're using XenServer, follow the solution in the bug comments.  For
vSphere and KVM, verify that the MD5 of systemvm-4.2.0.iso on secondary
storage matches the one on the management server at
/usr/share/cloudstack-common/vms/systemvm.iso.

Once the ISO is consistent on the management server, XenServer hosts and
secondary storage, destroy the system VMs and wait for them to recreate,
this time with the correct systemvm.iso.

Best regards,
Kirk

On 09/25/2013 04:12 AM, Indra Pramana wrote:
> Dear all,
> 
> During my upgrade attempt from CloudStack 4.1.1 to 4.2.0 earlier this week,
> I failed on the step when I need to run the cloudstack-sysvmadm script to
> restart the system VMs.
> 
> nohup cloudstack-sysvmadm -d IP address -u cloud -p -a > sysvm.log 2>&1 &
> 
> When I scrutinize the management server's logs, I saw these error messages
> related to the console proxy system VM:
> 
> ====
> 2013-09-24 02:35:37,722 ERROR [agent.transport.Request]
> (AgentManager-Handler-4:null) Caught problem with
> [{"ConsoleProxyLoadReportCommand":{"_proxyVmId":1903,"_loadInfo":"{\n
> \"connections\": []\n}","contextMap":{},"wait":0}}]
> com.google.gson.JsonParseException: The JsonDeserializer
> com.cloud.agent.transport.ArrayTypeAdaptor@1c74f356 failed to deserialize
> json object
> [{"ConsoleProxyLoadReportCommand":{"_proxyVmId":1903,"_loadInfo":"{\n
> \"connections\": []\n}","contextMap":{},"wait":0}}] given the type class
> [Lcom.cloud.agent.api.Command;
> ====
> 
> More detailed logs can be found on pastebin: http://pastebin.com/EmPF8EMp
> 
> Could it be the reason why the cloudstack-sysvmadm script is unable to
> restart the system VM?
> 
> Looking forward to your reply, thank you.
> 
> Cheers.
> 

Re: Failed to deserialize json object

Posted by Wido den Hollander <wi...@widodh.nl>.

On 09/25/2013 01:12 PM, Indra Pramana wrote:
> Dear all,
>
> During my upgrade attempt from CloudStack 4.1.1 to 4.2.0 earlier this week,
> I failed on the step when I need to run the cloudstack-sysvmadm script to
> restart the system VMs.
>
> nohup cloudstack-sysvmadm -d IP address -u cloud -p -a > sysvm.log 2>&1 &
>
> When I scrutinize the management server's logs, I saw these error messages
> related to the console proxy system VM:
>
> ====
> 2013-09-24 02:35:37,722 ERROR [agent.transport.Request]
> (AgentManager-Handler-4:null) Caught problem with
> [{"ConsoleProxyLoadReportCommand":{"_proxyVmId":1903,"_loadInfo":"{\n
> \"connections\": []\n}","contextMap":{},"wait":0}}]
> com.google.gson.JsonParseException: The JsonDeserializer
> com.cloud.agent.transport.ArrayTypeAdaptor@1c74f356 failed to deserialize
> json object
> [{"ConsoleProxyLoadReportCommand":{"_proxyVmId":1903,"_loadInfo":"{\n
> \"connections\": []\n}","contextMap":{},"wait":0}}] given the type class
> [Lcom.cloud.agent.api.Command;
> ====
>
> More detailed logs can be found on pastebin: http://pastebin.com/EmPF8EMp
>
> Could it be the reason why the cloudstack-sysvmadm script is unable to
> restart the system VM?
>

It is a old SystemVM talking to the management server which isn't 
working due to a protocol change between 4.1 and 4.2

Not sure if that is the reason of you problem, but it could be.

The root cause is however the API change.

Wido

> Looking forward to your reply, thank you.
>
> Cheers.
>