opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.69k stars 893 forks source link

[BUG] Dashboards can't start #4307

Open Yury-Fridlyand opened 1 year ago

Yury-Fridlyand commented 1 year ago

Describe the bug

I tried to start OS 2.8 from a slightly parametrized docker-compose file.

To Reproduce Steps to reproduce the behavior:

  1. Put compose file into an empty dir and rename (GH doesn't allow to upload yml): docker-compose.yml.txt
  2. Open shell there
  3. Run docker-compose up
  4. See error
    2023-06-16 18:24:01 
    2023-06-16 18:24:01  FATAL  TypeError [ERR_INVALID_URL]: Invalid URL
    2023-06-16 18:24:01 
    2023-06-16 18:24:42 
    2023-06-16 18:24:42  FATAL  TypeError [ERR_INVALID_URL]: Invalid URL
    2023-06-16 18:24:42 
    2023-06-16 18:23:57 v16.20.0
    2023-06-16 18:24:00 {"type":"log","@timestamp":"2023-06-17T01:24:00Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"dataSourceManagement\" has been disabled since the following direct or transitive dependencies are missing or disabled: [dataSource]"}
    2023-06-16 18:24:00 {"type":"log","@timestamp":"2023-06-17T01:24:00Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"dataSource\" is disabled."}
    2023-06-16 18:24:00 {"type":"log","@timestamp":"2023-06-17T01:24:00Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"visTypeXy\" is disabled."}
    2023-06-16 18:24:00 {"type":"log","@timestamp":"2023-06-17T01:24:00Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"mlCommonsDashboards\" is disabled."}
    2023-06-16 18:24:00 {"type":"log","@timestamp":"2023-06-17T01:24:00Z","tags":["warning","config","deprecation"],"pid":1,"message":"\"cpu.cgroup.path.override\" is deprecated and has been replaced by \"ops.cGroupOverrides.cpuPath\""}
    2023-06-16 18:24:00 {"type":"log","@timestamp":"2023-06-17T01:24:00Z","tags":["warning","config","deprecation"],"pid":1,"message":"\"cpuacct.cgroup.path.override\" is deprecated and has been replaced by \"ops.cGroupOverrides.cpuAcctPath\""}
    2023-06-16 18:24:00 {"type":"log","@timestamp":"2023-06-17T01:24:00Z","tags":["warning","config","deprecation"],"pid":1,"message":"\"opensearch.requestHeadersWhitelist\" is deprecated and has been replaced by \"opensearch.requestHeadersAllowlist\""}
    2023-06-16 18:24:00 {"type":"log","@timestamp":"2023-06-17T01:24:00Z","tags":["fatal","root"],"pid":1,"message":"TypeError: Invalid URL\n    at new NodeError (node:internal/errors:387:5)\n    at URL.onParseError (node:internal/url:565:9)\n    at new URL (node:internal/url:641:5)\n    at convertHost (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/client_config.js:137:15)\n    at /usr/share/opensearch-dashboards/src/core/server/opensearch/client/client_config.js:87:50\n    at Array.map (<anonymous>)\n    at parseClientOptions (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/client_config.js:87:38)\n    at configureClient (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/configure_client.js:49:63)\n    at new ClusterClient (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/cluster_client.js:42:65)\n    at OpenSearchService.createClusterClient (/usr/share/opensearch-dashboards/src/core/server/opensearch/opensearch_service.js:137:12)\n    at OpenSearchService.setup (/usr/share/opensearch-dashboards/src/core/server/opensearch/opensearch_service.js:67:24)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at Server.setup (/usr/share/opensearch-dashboards/src/core/server/server.js:197:36)\n    at Root.setup (/usr/share/opensearch-dashboards/src/core/server/root/index.js:44:14)\n    at bootstrap (/usr/share/opensearch-dashboards/src/core/server/bootstrap.js:103:5)\n    at Command.<anonymous> (/usr/share/opensearch-dashboards/src/cli/serve/serve.js:193:5) {\n  input: 'https://opensearch-node1-2.8:9200',\n  code: 'ERR_INVALID_URL'\n}"}
    2023-06-16 18:24:38 v16.20.0
    2023-06-16 18:24:41 {"type":"log","@timestamp":"2023-06-17T01:24:41Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"dataSourceManagement\" has been disabled since the following direct or transitive dependencies are missing or disabled: [dataSource]"}
    2023-06-16 18:24:41 {"type":"log","@timestamp":"2023-06-17T01:24:41Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"dataSource\" is disabled."}
    2023-06-16 18:24:41 {"type":"log","@timestamp":"2023-06-17T01:24:41Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"visTypeXy\" is disabled."}
    2023-06-16 18:24:41 {"type":"log","@timestamp":"2023-06-17T01:24:41Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"mlCommonsDashboards\" is disabled."}
    2023-06-16 18:24:41 {"type":"log","@timestamp":"2023-06-17T01:24:41Z","tags":["warning","config","deprecation"],"pid":1,"message":"\"cpu.cgroup.path.override\" is deprecated and has been replaced by \"ops.cGroupOverrides.cpuPath\""}
    2023-06-16 18:24:41 {"type":"log","@timestamp":"2023-06-17T01:24:41Z","tags":["warning","config","deprecation"],"pid":1,"message":"\"cpuacct.cgroup.path.override\" is deprecated and has been replaced by \"ops.cGroupOverrides.cpuAcctPath\""}
    2023-06-16 18:24:41 {"type":"log","@timestamp":"2023-06-17T01:24:41Z","tags":["warning","config","deprecation"],"pid":1,"message":"\"opensearch.requestHeadersWhitelist\" is deprecated and has been replaced by \"opensearch.requestHeadersAllowlist\""}
    2023-06-16 18:24:41 {"type":"log","@timestamp":"2023-06-17T01:24:41Z","tags":["fatal","root"],"pid":1,"message":"TypeError: Invalid URL\n    at new NodeError (node:internal/errors:387:5)\n    at URL.onParseError (node:internal/url:565:9)\n    at new URL (node:internal/url:641:5)\n    at convertHost (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/client_config.js:137:15)\n    at /usr/share/opensearch-dashboards/src/core/server/opensearch/client/client_config.js:87:50\n    at Array.map (<anonymous>)\n    at parseClientOptions (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/client_config.js:87:38)\n    at configureClient (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/configure_client.js:49:63)\n    at new ClusterClient (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/cluster_client.js:42:65)\n    at OpenSearchService.createClusterClient (/usr/share/opensearch-dashboards/src/core/server/opensearch/opensearch_service.js:137:12)\n    at OpenSearchService.setup (/usr/share/opensearch-dashboards/src/core/server/opensearch/opensearch_service.js:67:24)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at Server.setup (/usr/share/opensearch-dashboards/src/core/server/server.js:197:36)\n    at Root.setup (/usr/share/opensearch-dashboards/src/core/server/root/index.js:44:14)\n    at bootstrap (/usr/share/opensearch-dashboards/src/core/server/bootstrap.js:103:5)\n    at Command.<anonymous> (/usr/share/opensearch-dashboards/src/cli/serve/serve.js:193:5) {\n  input: 'https://opensearch-node1-2.8:9200',\n  code: 'ERR_INVALID_URL'\n}"}
    2023-06-16 18:35:03 v16.20.0
    2023-06-16 18:35:05 {"type":"log","@timestamp":"2023-06-17T01:35:05Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"dataSourceManagement\" has been disabled since the following direct or transitive dependencies are missing or disabled: [dataSource]"}
    2023-06-16 18:35:05 {"type":"log","@timestamp":"2023-06-17T01:35:05Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"dataSource\" is disabled."}
    2023-06-16 18:35:05 {"type":"log","@timestamp":"2023-06-17T01:35:05Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"visTypeXy\" is disabled."}
    2023-06-16 18:35:05 {"type":"log","@timestamp":"2023-06-17T01:35:05Z","tags":["info","plugins-service"],"pid":1,"message":"Plugin \"mlCommonsDashboards\" is disabled."}
    2023-06-16 18:35:05 {"type":"log","@timestamp":"2023-06-17T01:35:05Z","tags":["warning","config","deprecation"],"pid":1,"message":"\"cpu.cgroup.path.override\" is deprecated and has been replaced by \"ops.cGroupOverrides.cpuPath\""}
    2023-06-16 18:35:05 {"type":"log","@timestamp":"2023-06-17T01:35:05Z","tags":["warning","config","deprecation"],"pid":1,"message":"\"cpuacct.cgroup.path.override\" is deprecated and has been replaced by \"ops.cGroupOverrides.cpuAcctPath\""}
    2023-06-16 18:35:05 {"type":"log","@timestamp":"2023-06-17T01:35:05Z","tags":["warning","config","deprecation"],"pid":1,"message":"\"opensearch.requestHeadersWhitelist\" is deprecated and has been replaced by \"opensearch.requestHeadersAllowlist\""}
    2023-06-16 18:35:05 {"type":"log","@timestamp":"2023-06-17T01:35:05Z","tags":["fatal","root"],"pid":1,"message":"TypeError: Invalid URL\n    at new NodeError (node:internal/errors:387:5)\n    at URL.onParseError (node:internal/url:565:9)\n    at new URL (node:internal/url:641:5)\n    at convertHost (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/client_config.js:137:15)\n    at /usr/share/opensearch-dashboards/src/core/server/opensearch/client/client_config.js:87:50\n    at Array.map (<anonymous>)\n    at parseClientOptions (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/client_config.js:87:38)\n    at configureClient (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/configure_client.js:49:63)\n    at new ClusterClient (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/cluster_client.js:42:65)\n    at OpenSearchService.createClusterClient (/usr/share/opensearch-dashboards/src/core/server/opensearch/opensearch_service.js:137:12)\n    at OpenSearchService.setup (/usr/share/opensearch-dashboards/src/core/server/opensearch/opensearch_service.js:67:24)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at Server.setup (/usr/share/opensearch-dashboards/src/core/server/server.js:197:36)\n    at Root.setup (/usr/share/opensearch-dashboards/src/core/server/root/index.js:44:14)\n    at bootstrap (/usr/share/opensearch-dashboards/src/core/server/bootstrap.js:103:5)\n    at Command.<anonymous> (/usr/share/opensearch-dashboards/src/cli/serve/serve.js:193:5) {\n  input: 'https://opensearch-node1-2.8:9200',\n  code: 'ERR_INVALID_URL'\n}"}
    2023-06-16 18:35:05 
    2023-06-16 18:35:05  FATAL  TypeError [ERR_INVALID_URL]: Invalid URL
    2023-06-16 18:35:05 

    Extracted:

    TypeError: Invalid URL
    at new NodeError (node:internal/errors:387:5)
    at URL.onParseError (node:internal/url:565:9)
    at new URL (node:internal/url:641:5)
    at convertHost (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/client_config.js:137:15)
    at /usr/share/opensearch-dashboards/src/core/server/opensearch/client/client_config.js:87:50
    at Array.map (<anonymous>)
    at parseClientOptions (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/client_config.js:87:38)
    at configureClient (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/configure_client.js:49:63)
    at new ClusterClient (/usr/share/opensearch-dashboards/src/core/server/opensearch/client/cluster_client.js:42:65)
    at OpenSearchService.createClusterClient (/usr/share/opensearch-dashboards/src/core/server/opensearch/opensearch_service.js:137:12)
    at OpenSearchService.setup (/usr/share/opensearch-dashboards/src/core/server/opensearch/opensearch_service.js:67:24)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Server.setup (/usr/share/opensearch-dashboards/src/core/server/server.js:197:36)
    at Root.setup (/usr/share/opensearch-dashboards/src/core/server/root/index.js:44:14)
    at bootstrap (/usr/share/opensearch-dashboards/src/core/server/bootstrap.js:103:5)
    at Command.<anonymous> (/usr/share/opensearch-dashboards/src/cli/serve/serve.js:193:5) {
    input: 'https://opensearch-node1-2.8:9200',
    code: 'ERR_INVALID_URL'
    }

    https://opensearch-node1-2.8:9200 and https://opensearch-node2-2.8:9200 are reachable from both alive nodes.

Expected behavior Entire cluster starts with 3 containers in.

OpenSearch Version 2.8

Dashboards Version 2.8

Plugins Default

Screenshots image

Host/Environment (please complete the following information):

$ docker-compose --version
docker-compose version 1.25.0, build unknown
$ docker --version
Docker version 20.10.21, build baeda1f
$ uname -a
Linux Yury-PC 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Additional context N/A

wbeckler commented 1 year ago

@Yury-Fridlyand are you still having this issue?

Yury-Fridlyand commented 1 year ago

@wbeckler I found a workaround, but issue this persist on 2.8. I didn't test this on newer versions.

ashwin-pc commented 1 year ago

@Yury-Fridlyand I ran into the same issue. I also noticed that you are running on 2.8.0. The issue does not occur on the latest containers. Can you try this again on 2.9 (the latest tag)?

Yury-Fridlyand commented 1 year ago

The issue persists on 2.9 too.

ashwin-pc commented 11 months ago

@Yury-Fridlyand what is your workaround?

Yury-Fridlyand commented 11 months ago

Stop using OpenSearch ¯_(ツ)_/¯