Graylog 5.1 does not load UI when HTTP_EXTERNAL_URI contains a path sufix

1. Describe your incident:

I have been using Graylog 4.x for a while now and decided to change to the 5.1 version. On this new version I get this error every time I use a path suffix on “http_external_uri” definition.
The thing is, I can access to the login screen no problem, buy once the credentials are inputted and submitted, the following error would occur:

Loading component failed: Absolute route path “/” nested under path “/log-centralizer/” is not valid. An absolute child route path must start with the combined path of all its parent routes.

2. Describe your environment:

  • OS Information: Ubuntu 22.04.2 LTS

  • Package Version: graylog/graylog:5.1.0 ( Docker image)

  • Service logs, configurations, and environment variables:

I run Graylog in a docker container (locally through docker-compose), behind a Nginx service (although the error happens the same accessing without the reverse proxy). These are the environment variables I am using:

  - GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
  - GRAYLOG_HTTP_EXTERNAL_URI=http://<my-local-ip>:9000/log-centralizer/
  - GRAYLOG_HTTP_PUBLISH_URI=http://<my-local-ip>:9000/log-centralizer/
  - GRAYLOG_MONGODB_URI=mongodb://<my-local-ip>:27017/graylog
  - GRAYLOG_ELASTICSEARCH_HOSTS=http://<my-local-ip>:9200
  - GRAYLOG_PLUGIN_DIR=/usr/share/graylog/plugin/ 
  - GRAYLOG_TRUSTED_PROXIES=127.0.0.1/32,192.168.1.0/16,0:0:0:0:0:0:0:1/128

Ports are exposed from the container to the host machine.
This configuration has worked perfectly fine for versions 4.x and 5.0.7

  • MongoDB: 5.0.2
  • OpenSearch: 2.5.0

All the test I’ve run have been with a fresh MongoDB database.

3. What steps have you already taken to try and solve the problem?

  • Leaving GRAYLOG_HTTP_EXTERNAL_URI as “http://:9000/” does not trigger the issue, although I need to be able to use a suffix for other purposes.
  • Leaving GRAYLOG_HTTP_EXTERNAL_URI as “http://:9000/log-centralizer/” works for Graylog 4.x and up to 5.0.7 (included), but triggers the error on version 5.1.0.
  • Error happends with Chrome and Firefox after signing in. Sign on screen loads fine, error occurs afterwards.

4. How can the community help?

I went trough the 5.1 version documentation about “Configuration Options” and about how to set up “Proxy web interface and API traffic under a path prefix using HTTP”, buy I don’t seem to find any difference between other prior versions (except for what I think its a typo in the example wich does not include the path prefix).
Am I skipping something? Is this a known bug for this version? I can go on with 5.0.7, but wanted to use the latest available for the time being.

I was able to replicate this by testing with Graylog 5.0.7, and then 5.1 using the same docker compose config (other than the image). I’ll file a bug report as i would consider this unexpected behavior. Will report back.

Thanks again for this report. I’ve submitted an issue here:

Great news! Looks like this will be fixed in the next “bugfix” release of graylog :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.