Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-8237

add nic with instance throw java.lang.NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.4.3
    • None
    • None
    • Security Level: Public (Anyone can view this level - this is the default.)
    • None
    • CentOS 7 which Java 1.7.0_75, Running simulator/

    Description

      In simulator env, I create a serviceoffering with cpu&mem custom , and deploy an instance with this serviceoffering. After that, I add nic on this instance and throw this issus:

      ========================================================
      WARN [c.c.u.d.Merovingian2] (API-Job-Executor-2:ctx-abcb085b job-26 ctx-c85611f5) Was unable to find lock for the key vm_instance6 and thread id 2089552368
      INFO [o.a.c.f.j.i.AsyncJobMonitor] (Work-Job-Executor-2:ctx-754aeed8 job-26/job-27) Add job-27 into job monitoring
      ERROR [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-2:ctx-754aeed8 job-26/job-27 ctx-26199438) Invocation exception, caused by: java.lang.NullPointerException
      INFO [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-2:ctx-754aeed8 job-26/job-27 ctx-26199438) Rethrow exception java.lang.NullPointerException
      ERROR [c.c.v.VmWorkJobDispatcher] (Work-Job-Executor-2:ctx-754aeed8 job-26/job-27) Unable to complete AsyncJobVO

      {id:27, userId: 2, accountId: 2, instanceType: null, instanceId: null, cmd: com.cloud.vm.VmWorkAddVmToNetwork, cmdInfo: rO0ABXNyACFjb20uY2xvdWQudm0uVm1Xb3JrQWRkVm1Ub05ldHdvcmt6-m3bkApgrQIAAkwACW5ldHdvcmtJZHQAEExqYXZhL2xhbmcvTG9uZztMABJyZXF1c3RlZE5pY1Byb2ZpbGV0ABlMY29tL2Nsb3VkL3ZtL05pY1Byb2ZpbGU7eHIAE2NvbS5jbG91ZC52bS5WbVdvcmufmbZW8CVnawIABEoACWFjY291bnRJZEoABnVzZXJJZEoABHZtSWRMAAtoYW5kbGVyTmFtZXQAEkxqYXZhL2xhbmcvU3RyaW5nO3hwAAAA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AoTGNvbS9jbG91ZC9uZXR3b3JrL05ldHdvcmtzJFRyYWZmaWNUeXBlO0wABHV1aWRxAH4ABHhwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBw, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 8796758677527, completeMsid: null, lastUpdated: null, lastPolled: null, created: Tue Feb 10 07:20:35 EST 2015}

      , job origin:26
      java.lang.NullPointerException
      at com.cloud.hypervisor.HypervisorGuruBase.toVirtualMachineTO(HypervisorGuruBase.java:125)
      at com.cloud.simulator.SimulatorGuru.implement(SimulatorGuru.java:46)
      at com.cloud.vm.VirtualMachineManagerImpl.orchestrateAddVmToNetwork(VirtualMachineManagerImpl.java:3467)
      at com.cloud.vm.VirtualMachineManagerImpl.orchestrateAddVmToNetwork(VirtualMachineManagerImpl.java:5288)
      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 com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
      at com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:5346)
      at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
      at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:501)
      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 org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:458)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      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)
      INFO [o.a.c.f.j.i.AsyncJobMonitor] (Work-Job-Executor-2:ctx-754aeed8 job-26/job-27) Remove job-27 from job monitoring
      ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-2:ctx-abcb085b job-26) Unexpected exception while executing org.apache.cloudstack.api.command.admin.vm.AddNicToVMCmdByAdmin
      java.lang.RuntimeException: Job failed due to exception null
      at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:114)
      at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:501)
      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 org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:458)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      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)
      INFO [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-2:ctx-abcb085b job-26) Remove job-26 from job monitoring
      ========================================================
      Is it the wrong variable type?

      Attachments

        Activity

          People

            Unassigned Unassigned
            starg Star Guo
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: