[jira] [Commented] (CLOUDSTACK-7540) S2SVpnConnections:CheckRouterTask is fails with NullPointer exception
[ https://issues.apache.org/jira/browse/CLOUDSTACK-7540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14133769#comment-14133769 ] Jayapal Reddy commented on CLOUDSTACK-7540: --- Problem: --- S2S vpn connection status check is failed with NPE Root Cause Analysis: -- When checking the connection status called CheckS2SVpnConnectionsAnswer.java.isConnected() method on the ip. With that ip there are no connections returned. This method tried to return 'null'. The return type is boolean caused the NPE. Proposed solution: --- Getting connected ips into Bollean and returning only if it is null. Verification steps: -- 1. Create VPCs 2. Add Network->'VPN customer gateway' (select from Select View: drop down) 3. Create vpn connection. VPC->"Site-To-Site VPN' ->Create VPN connection 4. Observe the logs for CheckS2SVpnConnections command. There should not be any exception. > S2SVpnConnections:CheckRouterTask is fails with NullPointer exception > - > > Key: CLOUDSTACK-7540 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7540 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Network Controller >Affects Versions: 4.2.0 >Reporter: Jayapal Reddy >Assignee: Jayapal Reddy > Fix For: 4.5.0 > > > CheckRouterTask is failing with NullPointer exception and log is filling with > with this messages continuously > 1. Create two VPCs > 2. Create VPN customer gateway > 3. Create VPN connection > When router is checking for vpn status getting NPE. > MS log: > Content of management log: > [c.c.a.t.Request] (StatsCollector-2:ctx-30b6f162) Seq 1-2611524833921479961: > Received: { Ans: , MgmtId: 7175246184473, via: 1, Ver: v1, Flags: 10, > { GetStorageStatsAnswer } } > 2014-07-01 15:10:31,002 DEBUG [c.c.a.m.DirectAgentAttache] > (DirectAgent-287:ctx-67faca60) Seq 5-6290684254506525415: Executing request > 2014-07-01 15:10:31,299 DEBUG [c.c.a.m.DirectAgentAttache] > (DirectAgent-287:ctx-67faca60) Seq 5-6290684254506525415: Response Received: > 2014-07-01 15:10:31,300 DEBUG [c.c.a.t.Request] > (StatsCollector-2:ctx-30b6f162) Seq 5-6290684254506525415: Received: { Ans: , > MgmtId: 7175246184473, via: 5, Ver: v1, Flags: 10, { GetStorageStatsAnswer } > } > 2014-07-01 15:10:49,681 DEBUG [c.c.n.r.VirtualNetworkApplianceManagerImpl] > (RouterStatusMonitor-1:ctx-b706b798) Found 9 routers to update status. > 2014-07-01 15:10:49,692 DEBUG [c.c.a.t.Request] > (RouterStatusMonitor-1:ctx-b706b798) Seq 5-6290684254506525416: Sending { Cmd > , MgmtId: 7175246184473, via: 5(Rack1Pod1Host9), Ver: v1, Flags: 100111, > [{"com.cloud.agent.api.CheckS2SVpnConnectionsCommand":{"vpnIps":["10.147.49.120"],"accessDetails": > {"router.name":"r-238-VM","router.ip":"169.254.3.241"} > ,"wait":30}}] } > 2014-07-01 15:10:49,693 DEBUG [c.c.a.t.Request] > (RouterStatusMonitor-1:ctx-b706b798) Seq 5-6290684254506525416: Executing: { > Cmd , MgmtId: 7175246184473, via: 5(Rack1Pod1Host9), Ver: v1, Flags: 100111, > [{"com.cloud.agent.api.CheckS2SVpnConnectionsCommand":{"vpnIps":["10.147.49.120"],"accessDetails": > {"router.name":"r-238-VM","router.ip":"169.254.3.241"} > ,"wait":30}}] } > 2014-07-01 15:10:49,693 DEBUG [c.c.a.m.DirectAgentAttache] > (DirectAgent-288:ctx-328fc667) Seq 5-6290684254506525416: Executing request > 2014-07-01 15:10:49,693 DEBUG [c.c.h.x.r.CitrixResourceBase] > (DirectAgent-288:ctx-328fc667) Executing command in VR: > /opt/cloud/bin/router_proxy.sh checkbatchs2svpn.sh 169.254.3.241 10.147.49.120 > 2014-07-01 15:10:50,080 DEBUG [c.c.a.m.DirectAgentAttache] > (DirectAgent-288:ctx-328fc667) Seq 5-6290684254506525416: Response Received: > 2014-07-01 15:10:50,081 DEBUG [c.c.a.t.Request] > (DirectAgent-288:ctx-328fc667) Seq 5-6290684254506525416: Processing: { Ans: > , MgmtId: 7175246184473, via: 5, Ver: v1, Flags: 110, > [{"com.cloud.agent.api.CheckS2SVpnConnectionsAnswer":{"ipToConnected":{},"ipToDetail":{},"details":"whack: > Pluto is not running (no > \"/var/run/pluto/pluto.ctl\")\n10.147.49.120:11:ISAKMP SA NOT found but > checking IPsec;IPsec SA not found;Site-to-site VPN have not > connected&","result":true,"wait":0}}] } > 2014-07-01 15:10:50,081 DEBUG [c.c.a.t.Request] > (RouterStatusMonitor-1:ctx-b706b798) Seq 5-6290684254506525416: Received: { > Ans: , MgmtId: 7175246184473, via: 5, Ver: v1, Flags: 110, > { CheckS2SVpnConnectionsAnswer } > } > 2014-07-01 15:10:50,081 DEBUG [c.c.a.m.AgentManagerImpl] > (RouterStatusMonitor-1:ctx-b706b798) Details from executing class > com.cloud.agent.api.CheckS2SVpnConnectionsCommand: whack: Pluto is not > running (no "/var/run/pluto/pluto.ctl") > 10.147.49.1
[jira] [Commented] (CLOUDSTACK-7540) S2SVpnConnections:CheckRouterTask is fails with NullPointer exception
[ https://issues.apache.org/jira/browse/CLOUDSTACK-7540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14133729#comment-14133729 ] ASF subversion and git services commented on CLOUDSTACK-7540: - Commit 86bf33bfabfeb84ce08dda3a3b0f8f313404db4c in cloudstack's branch refs/heads/master from Jayapal [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=86bf33b ] CLOUDSTACK-7540: Fixed NPE in check s2svpn connection status > S2SVpnConnections:CheckRouterTask is fails with NullPointer exception > - > > Key: CLOUDSTACK-7540 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7540 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Network Controller >Affects Versions: 4.2.0 >Reporter: Jayapal Reddy >Assignee: Jayapal Reddy > Fix For: 4.5.0 > > > CheckRouterTask is failing with NullPointer exception and log is filling with > with this messages continuously > 1. Create two VPCs > 2. Create VPN customer gateway > 3. Create VPN connection > When router is checking for vpn status getting NPE. > MS log: > Content of management log: > [c.c.a.t.Request] (StatsCollector-2:ctx-30b6f162) Seq 1-2611524833921479961: > Received: { Ans: , MgmtId: 7175246184473, via: 1, Ver: v1, Flags: 10, > { GetStorageStatsAnswer } } > 2014-07-01 15:10:31,002 DEBUG [c.c.a.m.DirectAgentAttache] > (DirectAgent-287:ctx-67faca60) Seq 5-6290684254506525415: Executing request > 2014-07-01 15:10:31,299 DEBUG [c.c.a.m.DirectAgentAttache] > (DirectAgent-287:ctx-67faca60) Seq 5-6290684254506525415: Response Received: > 2014-07-01 15:10:31,300 DEBUG [c.c.a.t.Request] > (StatsCollector-2:ctx-30b6f162) Seq 5-6290684254506525415: Received: { Ans: , > MgmtId: 7175246184473, via: 5, Ver: v1, Flags: 10, { GetStorageStatsAnswer } > } > 2014-07-01 15:10:49,681 DEBUG [c.c.n.r.VirtualNetworkApplianceManagerImpl] > (RouterStatusMonitor-1:ctx-b706b798) Found 9 routers to update status. > 2014-07-01 15:10:49,692 DEBUG [c.c.a.t.Request] > (RouterStatusMonitor-1:ctx-b706b798) Seq 5-6290684254506525416: Sending { Cmd > , MgmtId: 7175246184473, via: 5(Rack1Pod1Host9), Ver: v1, Flags: 100111, > [{"com.cloud.agent.api.CheckS2SVpnConnectionsCommand":{"vpnIps":["10.147.49.120"],"accessDetails": > {"router.name":"r-238-VM","router.ip":"169.254.3.241"} > ,"wait":30}}] } > 2014-07-01 15:10:49,693 DEBUG [c.c.a.t.Request] > (RouterStatusMonitor-1:ctx-b706b798) Seq 5-6290684254506525416: Executing: { > Cmd , MgmtId: 7175246184473, via: 5(Rack1Pod1Host9), Ver: v1, Flags: 100111, > [{"com.cloud.agent.api.CheckS2SVpnConnectionsCommand":{"vpnIps":["10.147.49.120"],"accessDetails": > {"router.name":"r-238-VM","router.ip":"169.254.3.241"} > ,"wait":30}}] } > 2014-07-01 15:10:49,693 DEBUG [c.c.a.m.DirectAgentAttache] > (DirectAgent-288:ctx-328fc667) Seq 5-6290684254506525416: Executing request > 2014-07-01 15:10:49,693 DEBUG [c.c.h.x.r.CitrixResourceBase] > (DirectAgent-288:ctx-328fc667) Executing command in VR: > /opt/cloud/bin/router_proxy.sh checkbatchs2svpn.sh 169.254.3.241 10.147.49.120 > 2014-07-01 15:10:50,080 DEBUG [c.c.a.m.DirectAgentAttache] > (DirectAgent-288:ctx-328fc667) Seq 5-6290684254506525416: Response Received: > 2014-07-01 15:10:50,081 DEBUG [c.c.a.t.Request] > (DirectAgent-288:ctx-328fc667) Seq 5-6290684254506525416: Processing: { Ans: > , MgmtId: 7175246184473, via: 5, Ver: v1, Flags: 110, > [{"com.cloud.agent.api.CheckS2SVpnConnectionsAnswer":{"ipToConnected":{},"ipToDetail":{},"details":"whack: > Pluto is not running (no > \"/var/run/pluto/pluto.ctl\")\n10.147.49.120:11:ISAKMP SA NOT found but > checking IPsec;IPsec SA not found;Site-to-site VPN have not > connected&","result":true,"wait":0}}] } > 2014-07-01 15:10:50,081 DEBUG [c.c.a.t.Request] > (RouterStatusMonitor-1:ctx-b706b798) Seq 5-6290684254506525416: Received: { > Ans: , MgmtId: 7175246184473, via: 5, Ver: v1, Flags: 110, > { CheckS2SVpnConnectionsAnswer } > } > 2014-07-01 15:10:50,081 DEBUG [c.c.a.m.AgentManagerImpl] > (RouterStatusMonitor-1:ctx-b706b798) Details from executing class > com.cloud.agent.api.CheckS2SVpnConnectionsCommand: whack: Pluto is not > running (no "/var/run/pluto/pluto.ctl") > 10.147.49.120:11:ISAKMP SA NOT found but checking IPsec;IPsec SA not > found;Site-to-site VPN have not connected& > 2014-07-01 15:10:50,084 DEBUG [c.c.a.m.AgentAttache] > (DirectAgent-288:ctx-328fc667) Seq 5-6290684254506525416: No more commands > found > 2014-07-01 15:10:50,091 ERROR [c.c.n.r.VirtualNetworkApplianceManagerImpl] > (RouterStatusMonitor-1:ctx-b706b798) Fail to complete the CheckRouterTask! > java.lang.NullPointerException > at > com.cloud.agent.api.CheckS2SVpnConnectionsAnswer.isConnecte