stephanediondev / elasticsearch-admin

Web administration for Elasticsearch (2.x to 8.x): cluster, nodes, indices, shards, index templates, repositories, snapshots ...
https://stephanediondev.github.io/elasticsearch-admin/
MIT License
90 stars 10 forks source link

Exceptasticsearch_credentials_error #57

Closed henry8082 closed 1 year ago

henry8082 commented 2 years ago

I get credentials_error see the information below elasticsearch-admin | {"message":"Exception thrown when handling an exception (Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException: errw/html/src/Controller/AbstractAppController.php line 103)","context":{"exception":{"class":"Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpExceials_error","code":0,"file":"/var/www/html/src/Controller/AbstractAppController.php:103"}},"level":500,"level_name":"CRITICAL","channel":"request","datetime":"20 elasticsearch-admin | {"message":"Uncaught Exception: error503.elasticsearch_credentials_error","context":{"exception":{"class":"Symfony\\Component\\HttpKernemessage":"error503.elasticsearch_credentials_error","code":0,"file":"/var/www/html/src/Controller/AbstractAppController.php:103","previous":{"class":"App\\Exceptasticsearch_credentials_error","code":0,"file":"/var/www/html/src/Manager/CallManager.php:168"}}},"level":500,"level_name":"CRITICAL","channel":"php","datetime": elasticsearch-admin | {"message":"Uncaught PHP Exception Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException: \"error503.elasticsearch_ler/AbstractAppController.php line 103","context":{"exception":{"class":"Symfony\\Component\\HttpKernel\\Exception\\ServiceUnavailableHttpException","message":"e0,"file":"/var/www/html/src/Controller/AbstractAppController.php:103","previous":{"class":"App\\Exception\\ConnectionException","message":"error503.elasticsearchml/src/Manager/CallManager.php:168"}}},"level":500,"level_name":"CRITICAL","channel":"request","datetime":"2022-07-01T09:28:35.822700+00:00","extra":{}}

my docker-compose.yml configuration is as follows

services:
  elasticsearch-admin:
    container_name: elasticsearch-admin
    image: stephanediondev/elasticsearch-admin
    environment:
      ELASTICSEARCH_URL: "https://ELASTICSEARCH_URL"
      ELASTICSEARCH_USERNAME: "ELASTICSEARCH_USERNAME"
      ELASTICSEARCH_PASSWORD: "ELASTICSEARCH_PASSWORD"
      SECRET_REGISTER: "test"
      SSL_VERIFY_PEER: "false"
      SSL_VERIFY_HOST: "false"
    #volumes:
    #- ./cert/key.pem:/etc/nginx/key.pem
    #- ./cert/rootca-cert.pem:/etc/nginx/rootca-cert.pem
    ports:
    - 80:8080
    - 443:4443
version: '3'

how do i fix the error?

stephanediondev commented 1 year ago

Hi

It seems to be an error due to credentials (error503.elasticsearch_credentials_error => 401 error from ES)

Are you sure username and password are correct in your configuration?

henry8082 commented 1 year ago

Thanks for your response

After I re-check it was already working fine

It's a potent management tool; the information is obvious and helps me a lot