question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] can't login in dashboard running locally on docker

See original GitHub issue

Hi there, I am trying to login into dashboards from localhost, my docker-compose.yml is pretty vanilla like:

 opensearch:
   image: opensearchproject/opensearch:1.1.0
   container_name: opensearch
   environment:
     - cluster.name=opensearch-cluster
     - node.name=opensearch
     - discovery.seed_hosts=opensearch
     - cluster.initial_master_nodes=opensearch
     - bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
     - plugins.security.disabled=true
     - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
   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-data:/usr/share/opensearch/data
   ports:
     - 9200:9200
     - 9600:9600 # required for Performance Analyzer
   networks:
     - opensearch-net
 opensearch-dashboards:
   image: opensearchproject/opensearch-dashboards:1.1.0
   container_name: opensearch-dashboards
   ports:
     - 5601:5601
   expose:
     - "5601"
   environment:
     - 'OPENSEARCH_HOSTS=["http://opensearch:9200"]'
     - opensearch.username="admin"
     - opensearch.password="admin"
   networks:
     - opensearch-net
     
 volumes:
   opensearch-data:  

networks:
 opensearch-net:
   driver: bridge   

I checked on the container running the dashboards,

cat /usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
server.host: "0"
opensearch.hosts: ["https://localhost:9200"]
opensearch.ssl.verificationMode: none
opensearch.username: "kibanaserver"
opensearch.password: "kibanaserver"
opensearch.requestHeadersWhitelist: [ authorization,securitytenant ]

opensearch_security.multitenancy.enabled: true
opensearch_security.multitenancy.tenants.preferred: ["Private", "Global"]
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
# Use this setting if you are running opensearch-dashboards without https
opensearch_security.cookie.secure: false

but on http://localhost:5601/app/login

entering kibanaserver:kibanaserver won’t work, giving me back a 401

please note I am running opensearch with plugins.security.disabled=true, if it’s any related at all.

thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
lregaladohdezcommented, Mar 28, 2022

You can pass the environment variable DISABLE_SECURITY_DASHBOARDS_PLUGIN=true to the Opensearch-Dashboard docker image without needing to rebuild.

1reaction
ghostyushengcommented, Apr 21, 2022

DISABLE_SECURITY_DASHBOARDS_PLUGIN Thanks! ps: If export to env , and restart docker won’t work. best solution it’s to inject env when you create container. DEMO:

docker run -itd --name=kibana -e DISABLE_SECURITY_DASHBOARDS_PLUGIN=true -p 0.0.0.0:5601:5601 opensearchproject/opensearch-dashboards
Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] can't login in dashboard running locally on docker
Hi there, I am trying to login into dashboards from localhost, my docker-compose.yml is pretty vanilla like: opensearch: image: ...
Read more >
Troubleshoot Docker Engine installation
Diagnose and resolve error messages related to the Docker Engine installation. ... client is set to connect to the Docker daemon running on...
Read more >
Known issues for Docker Desktop on Mac
Docker does not auto-start on login even when it is enabled in Preferences. This is related to a set of issues with Docker...
Read more >
Overview | Docker Documentation
Make sure you are signed in to Docker Desktop and your Docker Hub account. From Troubleshoot, select Get support. This opens the in-app...
Read more >
Quick Start Guide and sign in | Docker Documentation
Two-factor authentication · Go to the Docker Desktop menu and then select Sign in / Create Docker ID. · Enter your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found