Service Virtualization

Expand all | Collapse all

Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

Jump to Best Answer
  • 1.  Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

    Posted 09-04-2020 07:30 AM
    Hi,

    We are trying to insert new R-R pairs (new transactions) to the exising virtual service image using V3 api (/lisa-virtualize-invoke/api/v3/vses/) which was originally created using DevTest workstation. We are getting the below error when we call this api.

     msg:: {"error":"Virtual Service failed to be deployed, already deployed?"}
     createVseEndpoint call failed !!! HTTP status code: HTTP/1.1 500 Server Error

    I will explain the steps below.
    1. Created a simple http stub using json R-R pair in DevTest workstation
    2. Deployed it directly from DevTest workstation. It is working successfully.
    3. Add new R-R pairs (new transactions) to the same virtual service using V3 api. It is throwing error.

    We want to check whether this approach will work to add new transactions or not and design an automation project based on this outcome.

    Could anyone help on this please.


  • 2.  RE: Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

    Broadcom Employee
    Posted 09-04-2020 07:38 AM
    HI Parthiban
                 Yes the approach is correct. Please kindly share registry.log file for a quick check,

    --
    regards
    Sankar Natarajan





  • 3.  RE: Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

    Posted 09-04-2020 08:10 AM
    Hi Parthiban,

    Try updating the version number in your POST request and try once.

    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 4.  RE: Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

    Posted 09-04-2020 08:59 AM
      |   view attached
    @Sankar Natarajan

    PFA for log file.

    @Vaibhav Jain​​​

    You mean i should add any headers or something like version number ?

    Attachment(s)

    log
    registry.log   1.50MB 1 version


  • 5.  RE: Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

    Posted 09-04-2020 09:06 AM
    Hi Parthiban,

    I meant in the message body.

    Can you share the message body which you are trying to trigger. There are different call for creating a service and updating the service via V3 APIs. Please check

    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 6.  RE: Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

    Posted 09-04-2020 09:33 AM
    Hi Vaibhav,

    PFB the request details for update service.

    https://sd-b184-e9f1.nam.nsroot.net:1505/lisa-virtualize-invoke/api/v3/vses/e9f1_VSE2/services/simple_http
    curl -X POST "https://sd-b184-e9f1.nam.nsroot.net:1505/lisa-virtualize-invoke/api/v3/vses/e9f1_VSE2/services/simple_http" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "config={"transportProtocol":{"overwriteTxns":true}}" -F "deploy=true" -F "inputFile1=@1-req.xml;type=text/xml" -F "inputFile2=@1-rsp.xml;type=text/xml"

    We are replicating the same above curl command in java also.


  • 7.  RE: Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

    Posted 09-04-2020 10:03 AM
    Hi Parthiban,

    In previous messages, you mentioned that a JSON service is created but your file names as .xml. Could you check once.

    Also, the files should be kept in a single zip folder and that folder should be passed as inputFile1.

    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 8.  RE: Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

    Posted 09-07-2020 04:28 AM
    @Sankar Natarajan Could you please help on this. Attached the registry logs. ​

    As per registry logs "2020-09-04 11:52:48,276Z (07:52) [qtp104782072-373968] ERROR System.err - java.lang.IllegalArgumentException: There is already a service with the name simple_http", but i'm calling update api only.


  • 9.  RE: Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

    Broadcom Employee
    Posted 09-10-2020 03:36 PM
    Hi Parthiban,

    I validated the issue in DevTest 10.6 and it worked fine from Swagger UI. Here are the steps followed.

    . Created VS (VSwithRRJSON.vsm) using 2 RR pairs from the DevTest_Home/Projects/Bankv6/Data/rrpairs folder in Workstation.. rrpairs folder has 3 pairs and I used the 3rd pair for updating VS.
    . Deployed the VS VSwithRRJSON.vsm to VSE.
    . Logged into Swagger UI http://localhost:1505/lisa-virtualize-invoke/api/v3/swagger-ui
    . Validated the Update Virtual Service call POST /vses/{vseName}/services/{virtualServiceName} as in the below screenshot


    . Then executed the call and got the valid response. See the below screenshot which shows the Curl command and response.

    The Curl command in the above screenshot is:
    curl -X POST "http://localhost:1505/lisa-virtualize-invoke/api/v3/vses/VSE/services/VSwithRRJSON" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "config={"transportProtocol":{"overwriteTxns":true}}" -F "deploy=true" -F "inputFile1=@operation-10-req.txt;type=text/plain" -F "inputFile2=@operation-10-rsp.txt;type=text/plain"

    I downloaded the MAR file after the update and see the new transaction.

    Satish from Citi opened a support ticket 32216669 and I am going to share this information.



  • 10.  RE: Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

    Posted 09-10-2020 11:25 PM
    Hi Prema,

    Could you please try the same in 10.5.2 version as we are yet to upgrade our systems to 10.6


  • 11.  RE: Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

    Broadcom Employee
    Posted 09-14-2020 09:25 AM

    Hi Parthiban,

    Validated the issue in DevTest 10.5 at http://localhost:1505/lisa-virtualize-invoke/api/v3/swagger-ui and it worked. 

    Below is the Curl command it generated in 10.5 which is same as in 10.6.

    curl -X POST "http://localhost:1505/lisa-virtualize-invoke/api/v3/vses/VSE/services/VSwithRRJSON" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "deploy=true" -F "inputFile1=@operation-10-req.txt;type=text/plain" -F "inputFile2=@operation-10-rsp.txt;type=text/plain"

    Please try the above Curl command at your end.

    Regards,
    Prema




  • 12.  RE: Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api
    Best Answer

    Broadcom Employee
    Posted 27 days ago
    Today support did a WebEx and looked into the issue. Parthiban is changing the VS name when deploying. Support recommended the below which resolved the issue:
    . When create a VS make sure VSM is created or placed in the Project/VirtualServices folder, VSI is in Project/VirtualServices/Images folder and VTS file is in Project/Data folder.
    . Make sure VSM/VSI/VTS file names are same. For example, Test.vsm/Test.vsi/Test.vts.
    . When deployed the VS, don't change the name. For example, leave the VS name as Test for Test.vsm.




  • 13.  RE: Virtual Service failed to be deployed, already deployed? exception while adding new RR pair using V3 api

    Posted 22 days ago
    Thanks Prema. It is working now.