Kiran Koneti created CLOUDSTACK-2144:
----------------------------------------

             Summary: Java Error message regarding "IPTables" is observed while 
creating a VM in the VMware Setup.
                 Key: CLOUDSTACK-2144
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2144
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
          Components: Install and Setup
    Affects Versions: 4.2.0
         Environment: VMWare
            Reporter: Kiran Koneti
            Priority: Critical
             Fix For: 4.2.0


When Trying to create a VM in the Advanced zone of the VMware Setup there is a 
java error message as shown below.

"2013-04-23 16:16:29,948 INFO  [vmware.resource.VmwareResource] 
(DirectAgent-305:10.147.40.9) Executing resource NetworkUsageCommand
2013-04-23 16:16:30,145 DEBUG [cloud.api.ApiServlet] (catalina-exec-1:null) 
===START===  10.252.249.86 -- GET  
command=queryAsyncJobResult&jobId=ff5ed3d9-9192-4840-a897-0fece80d3df4&response=json&sessionkey=nom%2B4JcwMt7B9VAOgvdcXHk2iXk%3D&_=1366694423535
2013-04-23 16:16:30,179 DEBUG 
[cloud.network.ExternalLoadBalancerUsageManagerImpl] 
(ExternalNetworkMonitor-1:null) External devices stats collector is running...
2013-04-23 16:16:30,208 DEBUG [cloud.api.ApiServlet] (catalina-exec-1:null) 
===END===  10.252.249.86 -- GET  
command=queryAsyncJobResult&jobId=ff5ed3d9-9192-4840-a897-0fece80d3df4&response=json&sessionkey=nom%2B4JcwMt7B9VAOgvdcXHk2iXk%3D&_=1366694423535
2013-04-23 16:16:30,214 DEBUG 
[cloud.network.ExternalLoadBalancerUsageManagerImpl] 
(ExternalNetworkMonitor-1:null) Network 204 is not configured for external 
networking, so skipping usage check.
2013-04-23 16:16:30,216 DEBUG 
[cloud.network.ExternalLoadBalancerUsageManagerImpl] 
(ExternalNetworkMonitor-1:null) Network 205 is not configured for external 
networking, so skipping usage check.
2013-04-23 16:16:30,357 DEBUG [storage.snapshot.SnapshotSchedulerImpl] 
(SnapshotPollTask:null) Snapshot scheduler.poll is being called at 2013-04-23 
10:46:30 GMT
2013-04-23 16:16:30,359 DEBUG [storage.snapshot.SnapshotSchedulerImpl] 
(SnapshotPollTask:null) Got 0 snapshots to be executed at 2013-04-23 10:46:30 
GMT
2013-04-23 16:16:31,098 WARN  [vmware.resource.VmwareResource] 
(DirectAgent-186:10.147.40.9) Unable to parse return from script return of 
network usage command: java.lang.NumberFormatException: For input string: 
"iptables"
java.lang.NumberFormatException: For input string: "iptables"
        at 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Long.parseLong(Long.java:438)
        at java.lang.Long.<init>(Long.java:690)
        at 
com.cloud.hypervisor.vmware.resource.VmwareResource.getNetworkStats(VmwareResource.java:4812)
        at 
com.cloud.hypervisor.vmware.resource.VmwareResource.execute(VmwareResource.java:585)
        at 
com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:431)
        at 
com.cloud.agent.manager.DirectAgentAttache$Task.run(DirectAgentAttache.java:186)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:679)
2013-04-23 16:16:31,110 DEBUG [agent.manager.DirectAgentAttache] 
(DirectAgent-186:null) Seq 1-1592144322: Response Received:
2013-04-23 16:16:31,111 DEBUG [agent.transport.Request] (DirectAgent-186:null) 
Seq 1-1592144322: Processing:  { Ans: , MgmtId: 6703101771911, via: 1, Ver: v1, 
Flags: 10, 
[{"NetworkUsageAnswer":{"routerName":"r-4-VM","bytesSent":0,"bytesReceived":0,"result":true,"details":"","wait":0}}]
 }
2013-04-23 16:16:31,111 DEBUG [agent.transport.Request] (RouterMonitor-1:null) 
Seq 1-1592144322: Received:  { Ans: , MgmtId: 6703101771911, via: 1, Ver: v1, 
Flags: 10, { NetworkUsageAnswer } }
2013-04-23 16:16:31,111 DEBUG [agent.manager.AgentManagerImpl] 
(RouterMonitor-1:null) Details from executing class 
com.cloud.agent.api.NetworkUsageCommand:
2013-04-23 16:16:31,111 DEBUG 
[network.router.VirtualNetworkApplianceManagerImpl] (RouterMonitor-1:null) 
Recieved and Sent bytes are both 0. Not updating user_statistics
2013-04-23 16:16:31,290 WARN  [vmware.resource.VmwareResource] 
(DirectAgent-305:10.147.40.9) Unable to parse return from script return of 
network usage command: java.lang.NumberFormatException: For input string: 
"iptables"
java.lang.NumberFormatException: For input string: "iptables"
        at 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Long.parseLong(Long.java:438)
        at java.lang.Long.<init>(Long.java:690)
        at 
com.cloud.hypervisor.vmware.resource.VmwareResource.getNetworkStats(VmwareResource.java:4812)
        at 
com.cloud.hypervisor.vmware.resource.VmwareResource.execute(VmwareResource.java:585)
        at 
com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:431)
        at 
com.cloud.agent.manager.DirectAgentAttache$Task.run(DirectAgentAttache.java:186)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:679)
2013-04-23 16:16:31,295 DEBUG [agent.manager.DirectAgentAttache] 
(DirectAgent-305:null) Seq 1-1592144323: Response Received:
2013-04-23 16:16:31,296 DEBUG [agent.transport.Request] (DirectAgent-305:null) 
Seq 1-1592144323: Processing:  { Ans: , MgmtId: 6703101771911, via: 1, Ver: v1, 
Flags: 10, 
[{"NetworkUsageAnswer":{"routerName":"r-4-VM","bytesSent":0,"bytesReceived":0,"result":true,"details":"","wait":0}}]
 }
2013-04-23 16:16:31,297 DEBUG [agent.transport.Request] (RouterMonitor-1:null) 
Seq 1-1592144323: Received:  { Ans: , MgmtId: 6703101771911, via: 1, Ver: v1, 
Flags: 10, { NetworkUsageAnswer } }"

When debugged into the issue observed that the iptable rules are not configured 
in the router vm and this is causing the error message.

The iptable rules configured in the routerVM is as below.

"root@r-13-VM:~# iptables -L -nv
Chain INPUT (policy ACCEPT 336 packets, 31214 bytes)
 pkts bytes target     prot opt in     out     source               destination
  454 44554 NETWORK_STATS  all  --  *      *       0.0.0.0/0            
0.0.0.0/0

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 NETWORK_STATS  all  --  *      *       0.0.0.0/0            
0.0.0.0/0
    0     0 ACCEPT     all  --  eth2   eth0    0.0.0.0/0            0.0.0.0/0   
         state RELATED,ESTABLISHED

Chain OUTPUT (policy ACCEPT 508 packets, 95644 bytes)
 pkts bytes target     prot opt in     out     source               destination
  613  112K NETWORK_STATS  all  --  *      *       0.0.0.0/0            
0.0.0.0/0

Chain NETWORK_STATS (3 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0            all  --  eth0   eth2    0.0.0.0/0            0.0.0.0/0
    0     0            all  --  eth2   eth0    0.0.0.0/0            0.0.0.0/0
    0     0            tcp  --  !eth0  eth2    0.0.0.0/0            0.0.0.0/0
    0     0            tcp  --  eth2   !eth0   0.0.0.0/0            0.0.0.0/0"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to