Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-278

Creating OAuth service breaks the gateway

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 2.1 ER2
    • 2.1 ER1
    • Gateway
    • Hide
      1. Clean instance of 3scale
      2. Create new OAuth service with an application plan and the application
      3. On the integration page use defaults - just click on an update button
      4. Create request on already existing API e.g. "Api" (default)
      5. It will return 500 Error code
      6. Promote the configuration to the production
      7. Redeploy the production GW
      8. Redeploy will fail
      Show
      Clean instance of 3scale Create new OAuth service with an application plan and the application On the integration page use defaults - just click on an update button Create request on already existing API e.g. "Api" (default) It will return 500 Error code Promote the configuration to the production Redeploy the production GW Redeploy will fail

      Creating OAuth service will break the Gateway – the gateway stops responding to any request. It just returns 404.

      We suspect that there is some problem with the configuration, that will be downloaded by GW from the system.

      Configuration: apicast-config-oauth-test-sandbox-1.json

      Log from the Staging Gateway:

      2017/08/08 10:33:26 [error] 23#23: *44 lua entry thread aborted: runtime error: /opt/app-root/src/src/resty/http_ng.lua:59: invalid endpoint
      stack traceback:
      coroutine 0:
      	[C]: in function 'assert'
      	/opt/app-root/src/src/resty/http_ng.lua:59: in function 'get_request_params'
      	/opt/app-root/src/src/resty/http_ng.lua:90: in function 'get'
      	/opt/app-root/src/src/configuration_loader/remote_v2.lua:245: in function 'oidc_issuer_configuration'
      	/opt/app-root/src/src/configuration_loader/remote_v2.lua:310: in function 'config'
      	/opt/app-root/src/src/configuration_loader/remote_v2.lua:165: in function 'call'
      	/opt/app-root/src/src/configuration_loader.lua:43: in function 'load'
      	/opt/app-root/src/src/configuration_loader.lua:199: in function 'rewrite'
      	/opt/app-root/src/src/apicast.lua:63: in function 'rewrite'
      	rewrite_by_lua(apicast.conf:76):1: in function <rewrite_by_lua(apicast.conf:76):1>, client: 10.129.0.1, server: _, request: "GET /?user_key=ace86c9e52b3dc676e357ec030b9448b HTTP/1.1", host: "api-3scale-apicast-staging.3scale3.cloudapps.api-qe.eng.rdu2.redhat.com"
      [08/Aug/2017:10:33:26 +0000] api-3scale-apicast-staging.3scale3.cloudapps.api-qe.eng.rdu2.redhat.com:8080 10.129.0.1:35280 "GET /?user_key=ace86c9e52b3dc676e357ec030b9448b HTTP/1.1" 500 199 (0.062) 0
      2017/08/08 10:33:41 [warn] 23#23: *52 [lua] configuration_loader.lua:207: rewrite(): failed to acquire lock to lazy load: api-3scale-apicast-staging.3scale3.cloudapps.api-qe.eng.rdu2.redhat.com error: timeout, client: 10.129.0.1, server: _, request: "GET /favicon.ico HTTP/1.1", host: "api-3scale-apicast-staging.3scale3.cloudapps.api-qe.eng.rdu2.redhat.com"
      2017/08/08 10:33:41 [warn] 23#23: *52 [lua] proxy.lua:101: find_service(): service not found for host api-3scale-apicast-staging.3scale3.cloudapps.api-qe.eng.rdu2.redhat.com, client: 10.129.0.1, server: _, request: "GET /favicon.ico HTTP/1.1", host: "api-3scale-apicast-staging.3scale3.cloudapps.api-qe.eng.rdu2.redhat.com"
      

      Log from production after redeploy:

      2017/08/08 10:42:49 [emerg] 1#1: [lua] configuration_loader.lua:122: init(): failed to load configuration, exiting (code 1)
      ./src/resty/http_ng.lua:59: invalid endpoint
      stack traceback:
      	./src/resty/http_ng.lua:59: in function 'get_request_params'
      	./src/resty/http_ng.lua:90: in function 'get'
      	./src/configuration_loader/remote_v2.lua:245: in function 'oidc_issuer_configuration'
      	./src/configuration_loader/remote_v2.lua:310: in function 'config'
      	./src/configuration_loader/remote_v2.lua:165: in function 'call'
      	./src/configuration_loader.lua:43: in function 'load'
      	./src/configuration_loader.lua:47: in function 'boot'
      	libexec/boot.lua:6: in function 'file_gen'
      	init_worker_by_lua:38: in function <init_worker_by_lua:36>
      	[C]: in function 'xpcall'
      	init_worker_by_lua:45: in function <init_worker_by_lua:43>
      

              mcichra Michal Cichra (Inactive)
              pstanko@redhat.com Peter Stanko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: