Open Source API Gateway

500 Internal Server Error: Error in Admin Console Request

Membrane API Gateway returns 500 Internal Server Error with the detail Error in dynamic administration request! when a request to the dynamic pages of the web admin console (adminConsole, paths under /admin/) fails with an unexpected exception. Usually the request has missing or invalid parameters. Sometimes the cause is a bug in Membrane.

The Error Response

The response contains the status 500 Internal Server Error, the detail Error in dynamic administration request!, the problem type https://membrane-api.io/problems/internal and a link to this page. The type internal means that the gateway failed while processing the exchange.

Common Causes

A Parameter Appears Twice

The query string contains the same parameter more than once. The parameter parser rejects duplicate keys.

A Port Parameter Is Missing or Invalid

A port parameter is missing or not a number, for example on the node, cluster or proxy pages.

An Unknown Proxy Is Named

A start request names a proxy that does not exist.

The Port of a New Proxy Cannot Be Opened

A new proxy is saved on a port that is already occupied or that Membrane cannot open.

An Unexpected Exception in the Admin Console Plugin

The same link is also used when the adminConsole plugin throws an exception that it does not handle itself. The detail then starts with Aborting! Exception caused in ... and names the flow. Membrane logs such exceptions at warn level with the stack trace. If the plugin is nested in request, response or abort, the exception message and stack trace are sent to the client even in production mode. Unless the exception points to your configuration or to the message content, this usually indicates a bug in Membrane.

How to Fix It

  1. Use the links and forms of the admin console instead of hand-written URLs, and send each parameter once with a valid value.
  2. Check the gateway log. Membrane logs the full exception at error level.
  3. If the request was valid, report the problem with the stack trace on GitHub Issues.

To prevent changes through the console, make it read-only:

api:
port: 9000
flow:
- adminConsole:
readOnly: true
api:
  port: 9000
  flow:
    - adminConsole:
        readOnly: true

Hide Details in Production

By default, Membrane runs in development mode and adds details to error responses that help you find the problem, including the link to this page. These details may reveal information about your setup. In production, turn them off:

configuration:
production: true
configuration:
  production: true

Add the configuration document to your apis.yaml and separate it from the APIs with ---.

In production mode, the title of this error is replaced by Internal Server Error, and the response only says Internal details are hidden. See server log (key: ...). Search the gateway log for that key to find the full error message.

Related Documentation

Configuration reference:

Tutorials with runnable examples:

← All Membrane error messages

Still stuck? See the troubleshooting guide or ask on GitHub Issues. For commercial support, contact info@predic8.de.