Tashi
(René Tashi)
May 18, 2023, 2:04pm
1
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:
opened 09:05PM - 18 May 23 UTC
bug
When adding an additional path to `http_publish_uri` and `http_external_uri` (OR… `GRAYLOG_HTTP_EXTERNAL_URI` and `GRAYLOG_HTTP_PUBLISH_URI` for docker), Graylog web interface does not load and shows an error:
> Loading component failed: Absolute route path "/" nested under path "/logs/" is not valid. An absolute child route path must start with the combined path of all its parent routes.
There are no errors in `server.log`
Browser's inspect/console log:
```
api/plugins/org.graylog.plugins.license/licenses/status/for-subject?subject=/license/enterprise/views:1 Failed to load resource: the server responded with a status of 404 (Not Found)
vendor.8a712d83b311029bb0b6.js:672 Error: Absolute route path "/" nested under path "/logs/" is not valid. An absolute child route path must start with the combined path of all its parent routes.
at o (router.js:270:11)
at Et (router.js:634:7)
at router.js:668:7
at Array.forEach (<anonymous>)
at S (router.js:663:10)
at Et (router.js:647:7)
at router.js:668:7
at Array.forEach (<anonymous>)
at S (router.js:663:10)
at y (router.js:595:18)
Xi @ vendor.8a712d83b311029bb0b6.js:672
loadAsync.tsx:28 Error: Absolute route path "/" nested under path "/logs/" is not valid. An absolute child route path must start with the combined path of all its parent routes.
at o (router.js:270:11)
at Et (router.js:634:7)
at router.js:668:7
at Array.forEach (<anonymous>)
at S (router.js:663:10)
at Et (router.js:647:7)
at router.js:668:7
at Array.forEach (<anonymous>)
at S (router.js:663:10)
at y (router.js:595:18)
(anonymous) @ loadAsync.tsx:28
```
The API endpoint appears to work without issue.
## Expected Behavior
`http_publish_uri` and `http_external_uri` (OR `GRAYLOG_HTTP_EXTERNAL_URI` and `GRAYLOG_HTTP_PUBLISH_URI` for docker) work as documented and work as they did in previous versions of graylog.
## Current Behavior
`http_publish_uri` and `http_external_uri` (OR `GRAYLOG_HTTP_EXTERNAL_URI` and `GRAYLOG_HTTP_PUBLISH_URI` for docker) no longer allow you to specify an additional path, starting in graylog 5.1.
The API endpoint appears to work without issue.
## Possible Solution
## Steps to Reproduce (for bugs)
Using the following docker compose file:
```
services:
graylog:
container_name: graydock-graylog
depends_on:
mongodb:
condition: service_started
opensearch:
condition: service_started
deploy:
resources:
limits:
memory: 2g
entrypoint: /usr/bin/tini -- wait-for-it graydock-opensearch:9200 -- /docker-entrypoint.sh
environment:
GRAYLOG_ELASTICSEARCH_HOSTS: http://graydock-opensearch:9200
GRAYLOG_HTTP_BIND_ADDRESS: 0.0.0.0:9000
GRAYLOG_HTTP_EXTERNAL_URI: http://localhost:9000/logs/
GRAYLOG_HTTP_PUBLISH_URI: http://localhost:9000/logs/
GRAYLOG_IS_MASTER: true
GRAYLOG_MONGODB_URI: mongodb://graydock-mongo:27017/graylog
GRAYLOG_PASSWORD_SECRET: ${GRAYLOG_PASSWORD_SECRET}
GRAYLOG_REPORT_DISABLE_SANDBOX: 'true'
GRAYLOG_ROOT_PASSWORD_SHA2: ${GRAYLOG_ROOT_PASSWORD_SHA2}
GRAYLOG_ROOT_TIMEZONE: America/Chicago
GRAYLOG_SERVER_JAVA_OPTS: -Xms1g -Xmx1g -Dlog4j2.formatMsgNoLookups=true -Djdk.tls.acknowledgeCloseNotify=true
-XX:+UnlockExperimentalVMOptions -XX:NewRatio=1 -XX:MaxMetaspaceSize=256m
-server -XX:+ResizeTLAB -XX:-OmitStackTraceInFastThrow
image: graylog/graylog-enterprise:5.1
ports:
- 5044:5044/tcp
- 5140:5140/tcp
- 5140:5140/udp
- 5555:5555/tcp
- 5555:5555/udp
- 9000:9000/tcp
- 12201:12201/tcp
- 12201:12201/udp
- 13301:13301/tcp
- 13302:13302/tcp
restart: unless-stopped
volumes:
- ./storage/graydock-graylog/graylog_journal:/usr/share/graylog/data/journal
- ./storage/graydock-graylog/contentpacks:/usr/share/graylog/data/contentpacks
mongodb:
container_name: graydock-mongo
deploy:
resources:
limits:
memory: 256m
image: mongo:6.0
ports:
- 27021:27017
restart: unless-stopped
volumes:
- ./storage/graydock-mongo/mongodb:/data/db
opensearch:
container_name: graydock-opensearch
environment:
DISABLE_INSTALL_DEMO_CONFIG: 'true'
DISABLE_SECURITY_PLUGIN: 'true'
OPENSEARCH_JAVA_OPTS: -Xms2g -Xmx2g -Dlog4j2.formatMsgNoLookups=true
action.auto_create_index: 'false'
bootstrap.memory_lock: 'true'
discovery.type: single-node
http.host: 0.0.0.0
image: opensearchproject/opensearch:2.5.0
ports:
- 9200:9200
- 9300:9300
restart: unless-stopped
ulimits:
memlock:
hard: -1
soft: -1
nofile:
hard: 65536
soft: 65536
volumes:
- ./storage/graydock-opensearch/opensearchdata:/usr/share/opensearch/data
version: '3.8'
```
Observe that you are unable to use the graylog web interface.
## Context
Originally reported via https://community.graylog.org/t/graylog-5-1-does-not-load-ui-when-http-external-uri-contains-a-path-sufix/28830?u=drewmiranda-gl
## Your Environment
* Graylog Version: 5.1
* Java Version: Bundled
* ~~Elasticsearch~~ OpenSearch Version: 2.5.0
* MongoDB Version: 6.0.3
* Operating System: Docker running on Mac OS
* Browser version: Google Chrome Version 113.0.5672.126 (Official Build) (arm64)
Great news! Looks like this will be fixed in the next “bugfix” release of graylog
opened 09:05PM - 18 May 23 UTC
closed 04:09PM - 23 May 23 UTC
bug
When adding an additional path to `http_publish_uri` and `http_external_uri` (OR… `GRAYLOG_HTTP_EXTERNAL_URI` and `GRAYLOG_HTTP_PUBLISH_URI` for docker), Graylog web interface does not load and shows an error:
> Loading component failed: Absolute route path "/" nested under path "/logs/" is not valid. An absolute child route path must start with the combined path of all its parent routes.
There are no errors in `server.log`
Browser's inspect/console log:
```
api/plugins/org.graylog.plugins.license/licenses/status/for-subject?subject=/license/enterprise/views:1 Failed to load resource: the server responded with a status of 404 (Not Found)
vendor.8a712d83b311029bb0b6.js:672 Error: Absolute route path "/" nested under path "/logs/" is not valid. An absolute child route path must start with the combined path of all its parent routes.
at o (router.js:270:11)
at Et (router.js:634:7)
at router.js:668:7
at Array.forEach (<anonymous>)
at S (router.js:663:10)
at Et (router.js:647:7)
at router.js:668:7
at Array.forEach (<anonymous>)
at S (router.js:663:10)
at y (router.js:595:18)
Xi @ vendor.8a712d83b311029bb0b6.js:672
loadAsync.tsx:28 Error: Absolute route path "/" nested under path "/logs/" is not valid. An absolute child route path must start with the combined path of all its parent routes.
at o (router.js:270:11)
at Et (router.js:634:7)
at router.js:668:7
at Array.forEach (<anonymous>)
at S (router.js:663:10)
at Et (router.js:647:7)
at router.js:668:7
at Array.forEach (<anonymous>)
at S (router.js:663:10)
at y (router.js:595:18)
(anonymous) @ loadAsync.tsx:28
```
The API endpoint appears to work without issue.
## Expected Behavior
`http_publish_uri` and `http_external_uri` (OR `GRAYLOG_HTTP_EXTERNAL_URI` and `GRAYLOG_HTTP_PUBLISH_URI` for docker) work as documented and work as they did in previous versions of graylog.
## Current Behavior
`http_publish_uri` and `http_external_uri` (OR `GRAYLOG_HTTP_EXTERNAL_URI` and `GRAYLOG_HTTP_PUBLISH_URI` for docker) no longer allow you to specify an additional path, starting in graylog 5.1.
The API endpoint appears to work without issue.
## Possible Solution
## Steps to Reproduce (for bugs)
Using the following docker compose file:
```
services:
graylog:
container_name: graydock-graylog
depends_on:
mongodb:
condition: service_started
opensearch:
condition: service_started
deploy:
resources:
limits:
memory: 2g
entrypoint: /usr/bin/tini -- wait-for-it graydock-opensearch:9200 -- /docker-entrypoint.sh
environment:
GRAYLOG_ELASTICSEARCH_HOSTS: http://graydock-opensearch:9200
GRAYLOG_HTTP_BIND_ADDRESS: 0.0.0.0:9000
GRAYLOG_HTTP_EXTERNAL_URI: http://localhost:9000/logs/
GRAYLOG_HTTP_PUBLISH_URI: http://localhost:9000/logs/
GRAYLOG_IS_MASTER: true
GRAYLOG_MONGODB_URI: mongodb://graydock-mongo:27017/graylog
GRAYLOG_PASSWORD_SECRET: ${GRAYLOG_PASSWORD_SECRET}
GRAYLOG_REPORT_DISABLE_SANDBOX: 'true'
GRAYLOG_ROOT_PASSWORD_SHA2: ${GRAYLOG_ROOT_PASSWORD_SHA2}
GRAYLOG_ROOT_TIMEZONE: America/Chicago
GRAYLOG_SERVER_JAVA_OPTS: -Xms1g -Xmx1g -Dlog4j2.formatMsgNoLookups=true -Djdk.tls.acknowledgeCloseNotify=true
-XX:+UnlockExperimentalVMOptions -XX:NewRatio=1 -XX:MaxMetaspaceSize=256m
-server -XX:+ResizeTLAB -XX:-OmitStackTraceInFastThrow
image: graylog/graylog-enterprise:5.1
ports:
- 5044:5044/tcp
- 5140:5140/tcp
- 5140:5140/udp
- 5555:5555/tcp
- 5555:5555/udp
- 9000:9000/tcp
- 12201:12201/tcp
- 12201:12201/udp
- 13301:13301/tcp
- 13302:13302/tcp
restart: unless-stopped
volumes:
- ./storage/graydock-graylog/graylog_journal:/usr/share/graylog/data/journal
- ./storage/graydock-graylog/contentpacks:/usr/share/graylog/data/contentpacks
mongodb:
container_name: graydock-mongo
deploy:
resources:
limits:
memory: 256m
image: mongo:6.0
ports:
- 27021:27017
restart: unless-stopped
volumes:
- ./storage/graydock-mongo/mongodb:/data/db
opensearch:
container_name: graydock-opensearch
environment:
DISABLE_INSTALL_DEMO_CONFIG: 'true'
DISABLE_SECURITY_PLUGIN: 'true'
OPENSEARCH_JAVA_OPTS: -Xms2g -Xmx2g -Dlog4j2.formatMsgNoLookups=true
action.auto_create_index: 'false'
bootstrap.memory_lock: 'true'
discovery.type: single-node
http.host: 0.0.0.0
image: opensearchproject/opensearch:2.5.0
ports:
- 9200:9200
- 9300:9300
restart: unless-stopped
ulimits:
memlock:
hard: -1
soft: -1
nofile:
hard: 65536
soft: 65536
volumes:
- ./storage/graydock-opensearch/opensearchdata:/usr/share/opensearch/data
version: '3.8'
```
Observe that you are unable to use the graylog web interface.
## Context
Originally reported via https://community.graylog.org/t/graylog-5-1-does-not-load-ui-when-http-external-uri-contains-a-path-sufix/28830?u=drewmiranda-gl
## Your Environment
* Graylog Version: 5.1
* Java Version: Bundled
* ~~Elasticsearch~~ OpenSearch Version: 2.5.0
* MongoDB Version: 6.0.3
* Operating System: Docker running on Mac OS
* Browser version: Google Chrome Version 113.0.5672.126 (Official Build) (arm64)
1 Like
system
(system)
Closed
June 6, 2023, 4:39pm
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.