Layer7 API Management

  • 1.  demo-with-live-api-creator - SSG status unhealthy

    Posted Dec 13, 2017 12:49 PM

    So I'm trying out the microgateway demo from github

    I was able to run and start it and but it eventually times out when waiting for the docker containers to be ready. 

    running the status command I see

    $ docker ps --format "table {{.Names}}\t{{.Status}}"
    NAMES STATUS
    demo_lac-node_1 Up 35 minutes (healthy)
    demo_lac_mysql_1 Up 37 minutes
    demo_lac-admin_1 Up 37 minutes (healthy)
    demo_edge-ssg_1 Up 37 minutes (unhealthy)
    demo_edge-ssg_db_1 Up 38 minutes
    demo_lb_1 Up 38 minutes
    demo_ssg_1 Up 37 minutes (unhealthy)
    demo_consul_1 Up 37 minutes
    demo_otk_1 Up 37 minutes (healthy)
    demo_otk_mysqldb_1 Up 37 minutes
    demo_recommendation-db_1 Up 37 minutes
    demo_orders-db_1 Up 37 minutes

    so edge-ssg and ssg logs this repeatedly:

    demo_edge-ssg_1:

    Dec 13, 2017 5:41:01 PM com.l7tech.server
    WARNING: Executing background policy for scheduled task PolicySDK Initialization
    Dec 13, 2017 5:41:30 PM com.l7tech.external.assertions.gatewaymanagement.server.rest.exceptions.ExceptionMapper a
    INFO: Error processing management request:Resource not found {id=1f6fc6bbda53713a25eda0784958f090}
    Dec 13, 2017 5:41:30 PM com.l7tech.external.assertions.gatewaymanagement.server.rest.exceptions.ExceptionMapper a
    INFO: Error processing management request:Resource not found {id=1f6fc6bbda53713a25eda0784958f090}
    Dec 13, 2017 5:41:30 PM com.l7tech.server.admin
    INFO: KeystoreFile #00000000000000000000000000000002 (Software DB) updated (changed databytes)
    Dec 13, 2017 5:41:31 PM com.l7tech.server.admin
    INFO: KeystoreFile #00000000000000000000000000000002 (Software DB) updated (changed databytes)
    Dec 13, 2017 5:41:32 PM com.l7tech.server.message
    INFO: Processing request for service: maac/initialize [/maac/initialize]
    Dec 13, 2017 5:41:32 PM com.l7tech.external.assertions.gatewaymanagement.server.ServerRESTGatewayManagementAssertion
    WARNING: 9050: 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>ResourceNotFound</l7:Type>
    <l7:TimeStamp>2017-12-13T17:41:30.065Z</l7:TimeStamp>
    <l7:Link rel="self" uri="/1.0/genericEntities/1f6fc6bbda53713a25eda0784958f090"/>
    <l7:Detail>Resource not found {id=1f6fc6bbda53713a25eda0784958f090}</l7:Detail>
    </l7:Error>
    2017-12-13T17:41:32.010209000Z
    Dec 13, 2017 5:41:32 PM com.l7tech.server.policy.assertion.ServerResponseXpathAssertion
    INFO: 4716: XPath pattern didn't match response or target message; assertion therefore fails; XPath is '/l7:Item/l7:Resource/l7:GenericEntity/l7:ValueXml/text()'.
    Dec 13, 2017 5:41:32 PM com.l7tech.external.assertions.gatewaymanagement.server.ServerRESTGatewayManagementAssertion
    WARNING: 9050: 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>ResourceNotFound</l7:Type>
    <l7:TimeStamp>2017-12-13T17:41:30.033Z</l7:TimeStamp>
    <l7:Link rel="self" uri="/1.0/genericEntities/1f6fc6bbda53713a25eda0784958f090"/>
    <l7:Detail>Resource not found {id=1f6fc6bbda53713a25eda0784958f090}</l7:Detail>
    </l7:Error>
    2017-12-13T17:41:32.014843400Z
    Dec 13, 2017 5:41:32 PM com.l7tech.server.policy.assertion.ServerResponseXpathAssertion
    INFO: 4716: XPath pattern didn't match response or target message; assertion therefore fails; XPath is '/l7:Item/l7:Resource/l7:GenericEntity/l7:ValueXml/text()'.
    Dec 13, 2017 5:41:32 PM com.l7tech.server.task.ScheduledPolicyRunner
    WARNING: 2520: Error in PolicySDK Initialization scheduled task policy execution: Assertion Falsified
    Dec 13, 2017 5:41:32 PM com.l7tech.server
    WARNING: Executing background policy for scheduled task PolicySDK Initialization
    Dec 13, 2017 5:41:32 PM com.l7tech.server.policy.assertion.ServerAuditDetailAssertion
    INFO: -4: An unknown or empty error code was given: Given: API-Prefix: '', erro code: '104'. Setting it to '000'
    Dec 13, 2017 5:41:32 PM com.l7tech.server.policy.assertion.composite.ServerHandleErrorsAssertion
    WARNING: 11000: Policy processing caught an exception: RaiseErrorAssertion is stopping execution.
    Dec 13, 2017 5:41:32 PM com.l7tech.server.MessageProcessor
    INFO: 3017: Policy evaluation for service maac/initialize [9a617bb4f0c53e7b45a16f1ae04ab4bb] resulted in status 600 (Assertion Falsified)
    Dec 13, 2017 5:41:32 PM com.l7tech.server.message
    WARNING: Message was not processed: Assertion Falsified (600)


    demo_ssg_1:

    Dec 13, 2017 5:43:00 PM com.l7tech.external.assertions.gatewaymanagement.server.rest.exceptions.ExceptionMapper a
    INFO: Error processing management request:Resource not found {id=319873e0680ec88a4c8aa8e1b5f404ce}
    Dec 13, 2017 5:43:00 PM com.l7tech.external.assertions.gatewaymanagement.server.rest.exceptions.ExceptionMapper a
    INFO: Error processing management request:Resource not found {id=319873e0680ec88a4c8aa8e1b5f404ce}
    Dec 13, 2017 5:43:00 PM com.l7tech.server.admin
    INFO: KeystoreFile #00000000000000000000000000000002 (Software DB) updated (changed databytes)
    Dec 13, 2017 5:43:01 PM com.l7tech.server.admin
    INFO: KeystoreFile #00000000000000000000000000000002 (Software DB) updated (changed databytes)
    Dec 13, 2017 5:43:01 PM com.l7tech.server.message
    INFO: Processing request for service: maac/initialize [/maac/initialize]
    Dec 13, 2017 5:43:01 PM com.l7tech.external.assertions.gatewaymanagement.server.ServerRESTGatewayManagementAssertion
    WARNING: 9050: 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>ResourceNotFound</l7:Type>
    <l7:TimeStamp>2017-12-13T17:43:00.036Z</l7:TimeStamp>
    <l7:Link rel="self" uri="/1.0/genericEntities/319873e0680ec88a4c8aa8e1b5f404ce"/>
    <l7:Detail>Resource not found {id=319873e0680ec88a4c8aa8e1b5f404ce}</l7:Detail>
    </l7:Error>
    2017-12-13T17:43:01.404270000Z
    Dec 13, 2017 5:43:01 PM com.l7tech.server.policy.assertion.ServerResponseXpathAssertion
    INFO: 4716: XPath pattern didn't match response or target message; assertion therefore fails; XPath is '/l7:Item/l7:Resource/l7:GenericEntity/l7:ValueXml/text()'.
    Dec 13, 2017 5:43:01 PM com.l7tech.server.policy.assertion.ServerAuditDetailAssertion
    INFO: -4: An unknown or empty error code was given: Given: API-Prefix: '', erro code: '104'. Setting it to '000'
    Dec 13, 2017 5:43:01 PM com.l7tech.server.policy.assertion.composite.ServerHandleErrorsAssertion
    WARNING: 11000: Policy processing caught an exception: RaiseErrorAssertion is stopping execution.
    Dec 13, 2017 5:43:01 PM com.l7tech.server.MessageProcessor
    INFO: 3017: Policy evaluation for service maac/initialize [9a617bb4f0c53e7b45a16f1ae04ab4bb] resulted in status 600 (Assertion Falsified)
    Dec 13, 2017 5:43:01 PM com.l7tech.server.message
    WARNING: Message was not processed: Assertion Falsified (600)
    Dec 13, 2017 5:43:01 PM com.l7tech.external.assertions.gatewaymanagement.server.ServerRESTGatewayManagementAssertion
    WARNING: 9050: 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>ResourceNotFound</l7:Type>
    <l7:TimeStamp>2017-12-13T17:43:00.004Z</l7:TimeStamp>
    <l7:Link rel="self" uri="/1.0/genericEntities/319873e0680ec88a4c8aa8e1b5f404ce"/>
    <l7:Detail>Resource not found {id=319873e0680ec88a4c8aa8e1b5f404ce}</l7:Detail>
    </l7:Error>
    2017-12-13T17:43:01.406179900Z
    Dec 13, 2017 5:43:01 PM com.l7tech.server.policy.assertion.ServerResponseXpathAssertion
    INFO: 4716: XPath pattern didn't match response or target message; assertion therefore fails; XPath is '/l7:Item/l7:Resource/l7:GenericEntity/l7:ValueXml/text()'.
    Dec 13, 2017 5:43:01 PM com.l7tech.server.task.ScheduledPolicyRunner
    WARNING: 2520: Error in PolicySDK Initialization scheduled task policy execution: Assertion Falsified
    Dec 13, 2017 5:43:01 PM com.l7tech.server
    WARNING: Executing background policy for scheduled task PolicySDK Initialization

     

     

    Any suggestions on what I should do to complete start up?



  • 2.  Re: demo-with-live-api-creator - SSG status unhealthy

    Posted Dec 13, 2017 04:31 PM

    HI Paolo,

     

    Try to add more memory to your docker environment.  I’ve had a similar problem when resources were in contention.



  • 3.  Re: demo-with-live-api-creator - SSG status unhealthy

    Posted Dec 14, 2017 04:23 PM

    Hello Darrin,

    First I tried with 8GB as recommended by the github page. Then 10GB but still the same.



  • 4.  Re: demo-with-live-api-creator - SSG status unhealthy

    Posted Dec 14, 2017 06:39 PM

    Maybe try to do a “./demo stop” and then double check that all of the containers are removed.  Something doesn’t look right – what it seems to look like is the policysdk isn’t loading and therefore the health check is failing.  I am going to be that everything is working even though it’s unhealthy except for the mtls stuff.

     

    If you can purge the volumes and containers, at least we can isolate some remnants of anything else.  Failing that, change the config.sh and turn debug mode to true, and capture stdout and send that along.



  • 5.  Re: demo-with-live-api-creator - SSG status unhealthy

    Posted Dec 15, 2017 02:26 PM

    Thanks for your response Darrin.

    I've pasted the result of debug mode here https://pastebin.com/raw/tDKuTPbh 

    You are correct that the it seems the containers are somewhat ready.

    I followed thru the steps but failed when doing the  edge ssg call

    $ curl --insecure \
    > --header "User-Agent: Mozilla/5.0" \
    > --header "Authorization: Bearer c9addae6-d4b1-486a-b9f7-9644df61d1e3" \
    > 'https://localhost:9443/recommendator?customer=129'
    {
    "error message" : "auth error"
    }

    I tried debugging the OTK endpoint and it is showing a "The client certificate is not valid" error. screenshot here.

    The manage certificates window on the OTK only shows one trusted certificate.



  • 6.  Re: demo-with-live-api-creator - SSG status unhealthy

    Posted Jan 03, 2018 08:26 PM

    This error may be related to the usage of the early version of "PolicySDK". Please search for the variable "SOLUTION_KIT_POLICYSDK_ENABLED" in docker-compose file and set it to "false" to check if that makes a difference.



  • 7.  Re: demo-with-live-api-creator - SSG status unhealthy

    Broadcom Employee
    Posted Nov 23, 2018 07:22 PM

    Was your question answered with the posts that there sent through? If not please let us know what else we can do to assist you.

     

    Sincerely,

     

    Stephen Hughes

    Broadcom Support