Skip to content

[BUG] Incorrect URL Redirection in OpenSearch Dashboards > Dashboard Management > Saved Objects #9727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SuRyaMane389 opened this issue Apr 25, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@SuRyaMane389
Copy link

SuRyaMane389 commented Apr 25, 2025

When clicking on the Inspect option for a visualization, dashboard, or any type with the inspect option in Dashboard Management > Saved Objects, the URL redirects incorrectly.

The URL redirects to:
/management/opensearch-dashboards/objects/savedDashboards/<object-id>

instead of
/app/management/opensearch-dashboards/objects/savedDashboards/<object-id>

This results in a 404 Not Found error with the following response:

{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Not Found"
}

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'OpenSearch Dashboards > Dashboard Management > Saved Objects'
  2. Click on 'Inspect of any existing saved object'
  3. See error

Expected behavior
Should be able to inspect the saved object

OpenSearch Version
2.18.0

Dashboards Version
2.18.0

Environment

Opensearch cluster is deployed with Opensearch Operator on an AKS with security plugin enabled. Same error occurred with Opensearch running on docker as well.

Operator sample config:
https://github.com/opensearch-project/opensearch-k8s-operator/blob/main/opensearch-operator/examples/2.x/opensearch-cluster-custom-admin-user.yaml

Docker Compose config:

version: '3'
services:
  opensearch-node1:
    image: opensearchproject/opensearch:2.18.0
    container_name: opensearch-node1
    environment:
      - cluster.name=opensearch-cluster
      - node.name=opensearch-node1
      - discovery.seed_hosts=opensearch-node1,opensearch-node2
      - cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2
      - bootstrap.memory_lock=true  # along with the memlock settings below, disables swapping
      - OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m  # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
      - OPENSEARCH_INITIAL_ADMIN_PASSWORD=admin123   # Sets the demo admin user password when using demo configuration, required for OpenSearch 2.12 and higher
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536  # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
        hard: 65536
    volumes:
      - opensearch-data1:/usr/share/opensearch/data
    ports:
      - 9200:9200
      - 9600:9600  # required for Performance Analyzer
    networks:
      - opensearch-net
  opensearch-node2:
    image: opensearchproject/opensearch:2.18.0
    container_name: opensearch-node2
    environment:
      - cluster.name=opensearch-cluster
      - node.name=opensearch-node2
      - discovery.seed_hosts=opensearch-node1,opensearch-node2
      - cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2
      - bootstrap.memory_lock=true
      - OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m
      - OPENSEARCH_INITIAL_ADMIN_PASSWORD=admin123

    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
    volumes:
      - opensearch-data2:/usr/share/opensearch/data
    networks:
      - opensearch-net
  opensearch-dashboards:
    image: opensearchproject/opensearch-dashboards:2.18.0
    container_name: opensearch-dashboards
    ports:
      - 5601:5601
    expose:
      - '5601'
    volumes:
      - ./opensearch-dashboards/config/opensearch_dashboards.yml:/usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
    networks:
      - opensearch-net
volumes:
  opensearch-data1:
  opensearch-data2:

networks:
  opensearch-net:

Tried reverse proxy to route the request from /management/opensearch-dashboards/{**any} to add prefix of /app end up with the empty page and network calls shows Opensearch Dashboards did not load properly. Check the server output for more information.

@SuRyaMane389 SuRyaMane389 added bug Something isn't working untriaged labels Apr 25, 2025
@yubonluo
Copy link
Contributor

yubonluo commented May 8, 2025

Thanks for your issue, this bug had been solved in this PR: #8857 but it was not merged into 2.18.0 branch. Maybe you can use the 2.19.0 image version.

@ruanyl ruanyl removed the untriaged label May 8, 2025
@SuRyaMane389
Copy link
Author

I can migrate to 2.19.0, but I rely on custom plugins that are on 2.18.0 . so, I will wait for those plugins upgrade then I will do the migration myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants