Layer 7 API Management

Expand all | Collapse all

GatewayMigrationUtility.sh migrateOut Data access error

Jump to Best Answer
  • 1.  GatewayMigrationUtility.sh migrateOut Data access error

    Posted 05-04-2017 10:38 AM

    Hi

    I get an exception when using the GatewayMigrationUtility.

     

    Browse is working:

    ./GatewayMigrationUtility.sh browse --argFile sourceSSGcommon.properties -u ****** -x XXXXX 

     

    But migrate out thorws an exception when I try to export the whole gateway.

    ./GatewayMigrationUtility.sh migrateOut --all --argFile sourceSSGcommon.properties --encryptionPassphrase @file:encrypt.txt --dest bundles/OTK-all.xml -u ****** -x XXXXXXX
    Warning: TLS hostname verification has been disabled
    Warning: TLS server certificate check has been disabled
    Running...
    Execution failed. Reason: Internal Server Error. Detail: Data access error . Caused by: id to load is required for loading

     

    gmu.log:

    WARNING: Error executing command
    javax.ws.rs.WebApplicationException: 500 Internal Server Error
    at com.ca.gateway.rest.api.GatewayManagementGatewayClient$IP10Bundle.getAsItemReferenceType(Unknown Source)
    at com.ca.gateway.rest.api.resource.impl.BundleResource.getBundle(Unknown Source)
    at com.ca.gateway.rest.commandline.command.MigrateOutCommand.a(Unknown Source)
    at com.ca.gateway.rest.commandline.command.MigrateOutCommand.run(Unknown Source)
    at com.ca.gateway.rest.commandline.command.GatewayCommand.run(Unknown Source)
    at com.ca.gateway.rest.commandline.command.Command.runCommand(Unknown Source)
    at com.ca.gateway.rest.commandline.Main.main(Unknown Source)

     

     

    Audit Log on the gateway:

    Error processing management request: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <l7:Error xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
    <l7:Type>Find</l7:Type>
    <l7:TimeStamp>2017-05-04T16:35:00.111+02:00</l7:TimeStamp>
    <l7:Link rel="self" uri="https://ssg2.cluster:8443/restman/1.0/bundle?includeDependencies=false&exportGatewayRestManagementService=false&encryptUsingClusterPassphrase=false&all=true&encryptSecrets=true"/>
    <l7:Detail>Data access error . Caused by: id to load is required for loading</l7:Detail>
    </l7:Error>

     

    Any ideas ?



  • 2.  Re: GatewayMigrationUtility.sh migrateOut Data access error

    Posted 05-04-2017 12:19 PM

    That is not an error message I am familiar with, or that comes up in a quick search. What do you have defined in the sourceSSGcommon.properties arguments file? Also, are you passing an encoded password in the -x parameter?



  • 3.  Re: GatewayMigrationUtility.sh migrateOut Data access error

    Posted 05-05-2017 02:59 AM

    In the meantime I moved the user and password also to sourceSSGcommon.properties.

    "GatewayMigrationUtility.sh browse ..." is working with this properties file.
    "GatewayMigrationUtility.sh migrateOut ..." still throws the exception.

     

    On the gateway audit log I can see the rest requests.

    https://ssg2.cluster:8443/restman/1.0/bundle?includeDependencies=false&amp;exportGatewayRestManagementService=false&amp;… 

     

    Then I tried directly with the rest comand via SOAPUI.
    .../restman/1.0/bundle

     

    Parameters are:
    includeDependencies=true&exportGatewayRestManagementService=false&encryptUsingClusterPassphrase=false&all=true&encryptSecrets=true&defaultAction=NewOrUpdate

     

    Header:

    L7-key-passphrase -> Base64 encoded passphrase


    But also there I got the same error message:

    <l7:Error xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
    <l7:Type>Find</l7:Type>
    <l7:TimeStamp>2017-05-05T08:47:16.238+02:00</l7:TimeStamp>
    <l7:Link rel="self" uri="https://myhostname:8443/restman/1.0/bundle?includeDependencies=true&exportGatewayRestManagementService=false&encryptUsingClusterPassphrase=false&all=true&encryptSecrets=true&defaultAction=NewOrUpdate"/>
    <l7:Detail>Data access error . Caused by: id to load is required for loading</l7:Detail>
    </l7:Error>



  • 4.  Re: GatewayMigrationUtility.sh migrateOut Data access error

    Posted 05-05-2017 03:27 AM

    Hi,

     

    As per the error,

    "Internal Server Error. Detail: Data access error . Caused by: id to load is required for loading"

    this might be an issue with accessing data.

    Can you try to access below url in the browser

    https://ssg2.cluster:8443/restman/1.0/bundle?includeDependencies=false&exportGatewayRestManagementService=false&encryptUsingClusterPassphrase=false&all=true&encryptSecrets=true



  • 5.  Re: GatewayMigrationUtility.sh migrateOut Data access error

    Posted 05-05-2017 03:58 AM

    Hi

    I can use successfully restman/GMU with many other operations.
    Only the bundle ressource throws back an exception/error.



  • 6.  Re: GatewayMigrationUtility.sh migrateOut Data access error

    Posted 05-05-2017 04:03 AM


  • 7.  Re: GatewayMigrationUtility.sh migrateOut Data access error

    Posted 05-05-2017 05:03 AM

    Hi

     

    same error for both:

    <l7:Error xmlns:l7="http://ns.l7tech.com/2010/04/gateway-management">
    <l7:Type>Find</l7:Type>
    <l7:TimeStamp>2017-05-05T10:59:06.388+02:00</l7:TimeStamp>
    <l7:Link rel="self" uri="https://{host_hided}:8443/restman/1.0/bundle?includeDependencies=false&amp;exportGatewayRestManagementService=false&amp;encryptUsingClusterPassphrase=true&amp;all=true&amp;encryptSecrets=true"/>
    <l7:Detail>Data access error . Caused by: id to load is required for loading</l7:Detail>
    </l7:Error>

     

    Could it have something to do with mysql grants ?

     

    regards

    Remo



  • 8.  Re: GatewayMigrationUtility.sh migrateOut Data access error

    Posted 05-05-2017 05:31 AM

    Hi Remo,

     

    I suspect this might be caused by unable to access data or the content of policies and other data . Verify whether the user has administrator privileges and does the common arguments file includes arguments as per the documentation link:

    Get Started and Run GMU - CA API Gateway - 9.2 - CA Technologies Documentation 

    If so, migration will succeed. If you still encounter same error, please log a case with us for further troubleshooting.



  • 9.  Re: GatewayMigrationUtility.sh migrateOut Data access error
    Best Answer

    Posted 05-05-2017 08:46 AM

    Hi

    User has the required privileges.

    Common arguments are in the request. Just one thing, the gateway is version 8.3.

    I guess I have to open a case.

    Thanks for trying to help ...

    regards

    Remo



  • 10.  Re: GatewayMigrationUtility.sh migrateOut Data access error

    Posted 11-22-2018 02:40 PM

    Outcome of the case:

     

    The machines have to be a cluster to sync settings, policies. Suggestion to raise an idea (feature request) if they need a script that syncs policies and settings outside of a cluster.

     

    At this stage, the customer is backing up and restoring the db.