http 500 when calling api through APICast in 3scale

Solution Verified - Updated -


  • Following error gets thrown in APICast logs, each time we call the API service.

    2050/01/01 00:00:01 [error] 32#32: *1234567 lua entry thread aborted: runtime error: /opt/app-root/src/src/apicast/policy/headers/headers.lua:91: attempt to index field 'template_string' (a nil value)
    stack traceback:
    coroutine 0:
        /opt/app-root/src/src/apicast/policy/headers/headers.lua: in function 'run_commands'
        /opt/app-root/src/src/apicast/policy/headers/headers.lua:151: in function </opt/app-root/src/src/apicast/policy/headers/headers.lua:147>
        /opt/app-root/src/src/apicast/policy_chain.lua:200: in function 'rewrite'
        ...-root/src/src/apicast/policy/local_chain/local_chain.lua:59: in function <...-root/src/src/apicast/policy/local_chain/local_chain.lua:54>
        /opt/app-root/src/src/apicast/policy_chain.lua:200: in function 'rewrite'
  • We try to remove the rewrite policy and republish with no success and try both with the 1.16-41 version of apicast and the 1.18-0 more recent version => same error.

  • A direct curl to the private backend from the server that runs the APICast docker images works.
  • How to resolve this issue?


  • Red Hat 3scale API Management 2.9.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In