OpenIxia / IxNetwork

A central location for IxNetwork sample scripts and utilities. Please also visit http://openixia.com
MIT License
51 stars 59 forks source link

Random RestApi Failure #97

Closed kshreep closed 4 years ago

kshreep commented 4 years ago

Exceptions occurred at random RestApi call


 [ERROR]: Caught Exception : API call to configPacketHeaderField failed
 [DEBUG]: Traceback (most recent call last):
  File "/IxNetwork/RestApi/Python/Modules/IxNetRestApiTraffic.py", line 618, in addTrafficItemPacketStack
    response = self.ixnObj.get(self.ixnObj.sessionUrl+'/traffic/protocolTemplate?skip=0&take=end')
  File "/IxNetwork/RestApi/Python/Modules/IxNetRestApi.py", line 358, in get
    raise IxNetRestApiException(errMsg)
IxNetwork.RestApi.Python.Modules.IxNetRestApi.IxNetRestApiException: GET Exception error: {"method":"GET","pathAndQuery":"/api/v1/sessions/1901/ixnetwork/traffic/protocolTemplate?take=end&skip=0","errors":[{"code":10000,"detail":"Collection was modified; enumeration operation may not execute."},{"code":10000,"detail":"System.InvalidOperationException: Collection was modified; enumeration operation may not execute.\n  at System.Collections.Generic.Dictionary`2+KeyCollection+Enumerator[TKey,TValue].MoveNext () [0x00013] in <1703987eb0444925a652fbbd73c37506>:0 \n  at IxNetwork.Traffic2.Publishers.ProtocolTemplateHandler.GetInstances () [0x00033] in :0 \n  at SDMHelpers.SimplePublisher.GetChildList (SDMCsLib.GetChildListArgs args) [0x0003a] in <3d657fd98a28481ea4ae0dad8da57771>:0 \n  at SDMCsLib.SDMPeer.SANDBOX_GetChildList (SDMCsLib.GetChildListArgs args, System.Version version) [0x00067] in <3d657fd98a28481ea4ae0dad8da57771>:0 \n  at SDMCsLib.SDMSandbox.OBJECT_GetChildList (SDMCsLib.GetChildListArgs args) [0x00000] in <3d657fd98a28481ea4ae0dad8da57771>:0 \n  at SDMCsLib.RestService.SdmSandbox.GetChildren (SDMCsLib.SDMObjId sdmObjId, SDMCsLib.SDMKey child, System.Int32 skip, System.Int32 take) [0x0002d] in <07c10d65161c4de0bb3602f246fb3966>:0 \n  at SDMCsLib.RestService.SdmSandbox.GetRestIdFromSDMObjId (SDMCsLib.SDMObjId sdmObjId) [0x00048] in <07c10d65161c4de0bb3602f246fb3966>:0 \n  at SDMCsLib.RestService.SdmObjectJsonEncoder..ctor (SDMCsLib.RestService.SdmObject sdmObject, SDMCsLib.SDMObjId sdmObjId, System.Collections.Generic.List`1[T] attributeNames, System.Boolean addChildLinks, System.Boolean addMetaLink, System.Boolean addSelfLink, System.Boolean internalOverride) [0x00018] in <8faf1fb1b99943fcaae26e5c2fc5c6fb>:0 \n  at SDMCsLib.RestService.SdmObjectJsonEncoder..ctor (SDMCsLib.RestService.SdmObject sdmObject) [0x00083] in <8faf1fb1b99943fcaae26e5c2fc5c6fb>:0 \n  at SDMCsLib.RestService.SdmObject.Read () [0x000e4] in <8faf1fb1b99943fcaae26e5c2fc5c6fb>:0 \n  at SDMCsLib.RestService.V1ObjectController.Get (System.String path) [0x0001a] in <8faf1fb1b99943fcaae26e5c2fc5c6fb>:0 "}]}

In debug log,
15:44:08.475072: 
                GET: https://10.xx.xx.xx/api/v1/sessions/1901/ixnetwork/traffic/protocolTemplate?skip=0&take=end
                STATUS CODE: 400
_______________________________________________________________________________________________

IxNetRestApiException error: {"executionTimeMs":96121.0,"id":"4","state":"ERROR","progress":100,"message":null,"url":"/api/v1/sessions/1855/ixnetwork/traffic/trafficItem/operations/startstatelesstrafficblocking/4","resultUrl":"","result":"Start traffic failed\n"}
________________________________________________________________________________________________

The same code works perfectly sometimes. All parameters to the API's are correct though.
I am creating raw packet stack of 'Destination MAC Address-Source MAC Address-VLAN-IPv4'
what would be the root cause for this kind of behavior?            
therkong commented 4 years ago

What is the ixNetwork version you're using? Are you using Linux API Server? There is a similar bug opened for ixNet 9.0 Update 1.

kshreep commented 4 years ago

Yes. It's Linux API Server and version: 9.00.2.182

therkong commented 4 years ago

This bug is fixed in ixNetwork 9.0 Update 3. Please give it a try.

therkong commented 4 years ago

You have Update 2. I do have a hotfix for it on top of Update 2. Give me a bit of time to confirm if the bug is fixed in Update 3 or not.

Regards, Theresa

From: kshreep notifications@github.com Sent: Tuesday, May 5, 2020 6:51 AM To: OpenIxia/IxNetwork IxNetwork@noreply.github.com Cc: Theresa Kong theresa.kong@keysight.com; Assign assign@noreply.github.com Subject: Re: [OpenIxia/IxNetwork] Random RestApi Failure (#97)

[EXTERNAL]

Yes. It's Linux API Server and version: 9.00.2.182

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/OpenIxia/IxNetwork/issues/97*issuecomment-624067904__;Iw!!I5pVk4LIGAfnvw!3MXbx2ACm6_NSyDPg-SbXlsjNn1M4nfhpkoTgdnsVKLCZNBxehsi4_vPhdaoswa9bg8B$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AIRRUUNV6EJVKLX4ZJ2S5LDRQAKVJANCNFSM4MVYCF4A__;!!I5pVk4LIGAfnvw!3MXbx2ACm6_NSyDPg-SbXlsjNn1M4nfhpkoTgdnsVKLCZNBxehsi4_vPhdaos-V4FLVx$.

therkong commented 4 years ago

I can send you the hotfix file for the 9.0 Update 2 via ftp. Please send me your email address.

kshreep commented 4 years ago

Thanks @therkong , email is kshreep@gmail.com what's the better way, should I apply hotfix or update IxNetwork? we will be using IxNetwork intensively in our testing.

therkong commented 4 years ago

I’m waiting for engineering team’s reply on whether or not this bug is fixed in Update 3. If it’s fixed, then use Update 3, if not, use the hotfix. This hotfix is verified in the field.

Regards, Theresa

From: kshreep notifications@github.com Sent: Tuesday, May 5, 2020 10:28 AM To: OpenIxia/IxNetwork IxNetwork@noreply.github.com Cc: Theresa Kong theresa.kong@keysight.com; Mention mention@noreply.github.com Subject: Re: [OpenIxia/IxNetwork] Random RestApi Failure (#97)

[EXTERNAL]

Thanks @therkonghttps://urldefense.com/v3/__https:/github.com/therkong__;!!I5pVk4LIGAfnvw!z7Y-N1PULPvJEPVcyhPYTuaHYdoApCi2K_w4wEfAu4nSHzrpJZaX9gvJtmBe757qZWeJ$ , email is kshreep@gmail.commailto:kshreep@gmail.com what's the better way, should I apply hotfix or update IxNetwork? we will be using IxNetwork intensively in our testing.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/OpenIxia/IxNetwork/issues/97*issuecomment-624196954__;Iw!!I5pVk4LIGAfnvw!z7Y-N1PULPvJEPVcyhPYTuaHYdoApCi2K_w4wEfAu4nSHzrpJZaX9gvJtmBe78NhJ20e$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AIRRUUPWRDYCKCYTV6PDAKLRQBECDANCNFSM4MVYCF4A__;!!I5pVk4LIGAfnvw!z7Y-N1PULPvJEPVcyhPYTuaHYdoApCi2K_w4wEfAu4nSHzrpJZaX9gvJtmBe7x_y1Zfz$.

kshreep commented 4 years ago

Sure, sounds good. Thanks.

therkong commented 4 years ago

Just confirmed that the fix is in IxNetwork 9.0 Update 3.

Regards, Theresa

From: kshreep notifications@github.com Sent: Tuesday, May 5, 2020 11:53 AM To: OpenIxia/IxNetwork IxNetwork@noreply.github.com Cc: Theresa Kong theresa.kong@keysight.com; Mention mention@noreply.github.com Subject: Re: [OpenIxia/IxNetwork] Random RestApi Failure (#97)

[EXTERNAL]

Sure, sounds good. Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/OpenIxia/IxNetwork/issues/97*issuecomment-624241221__;Iw!!I5pVk4LIGAfnvw!3lgIRGP_gcEqTOhhP9nj7qpI6fBZ8ndCiduEpkB5VHLlTvzgD9-xImZDMvQzVLlP7oug$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AIRRUUPFE3JTG2VFQYPVXYDRQBOBTANCNFSM4MVYCF4A__;!!I5pVk4LIGAfnvw!3lgIRGP_gcEqTOhhP9nj7qpI6fBZ8ndCiduEpkB5VHLlTvzgD9-xImZDMvQzVFM1NshJ$.

kshreep commented 4 years ago

Thanks @therkong. updating to the latest version will take some time since it's not yet out. Hence I would like to get the hotfix for this, please share, I didn't get any email yet.

therkong commented 4 years ago

Update 3 is already out. Here’s the download link: https://support.ixiacom.com/support-overview/product-support/downloads-updates/versions/68

Please scrolled down to Update 3.

[cid:image001.jpg@01D62453.6C0AF030]

Regards, Theresa

From: kshreep notifications@github.com Sent: Thursday, May 7, 2020 8:50 AM To: OpenIxia/IxNetwork IxNetwork@noreply.github.com Cc: Theresa Kong theresa.kong@keysight.com; Mention mention@noreply.github.com Subject: Re: [OpenIxia/IxNetwork] Random RestApi Failure (#97)

[EXTERNAL]

Thanks @therkonghttps://urldefense.com/v3/__https:/github.com/therkong__;!!I5pVk4LIGAfnvw!0Hnn9kcTgONgHj2qjz3ehJZ84rwOk6FxJJMx7zEP6XayEXQUhnxP815P0x6d1PndjFYx$. updating to the latest version will take some time since it's not yet out. Hence I would like to get the hotfix for this, please share, I didn't get any email yet.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/OpenIxia/IxNetwork/issues/97*issuecomment-625337954__;Iw!!I5pVk4LIGAfnvw!0Hnn9kcTgONgHj2qjz3ehJZ84rwOk6FxJJMx7zEP6XayEXQUhnxP815P0x6d1AV74-D4$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AIRRUUJ4GL6QMC4PGPE332TRQLKCTANCNFSM4MVYCF4A__;!!I5pVk4LIGAfnvw!0Hnn9kcTgONgHj2qjz3ehJZ84rwOk6FxJJMx7zEP6XayEXQUhnxP815P0x6d1EBHVZAE$.