Skip to content
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

[Bug]: OS-dashboards Docker image 3.0.0 does not work "Cannot find module 'performance-now'" #334

Closed
stephen-crawford opened this issue Mar 23, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@stephen-crawford
Copy link

Describe the bug

When trying to spin up a cluster with Docker, swapping all the images to image: opensearchstaging/opensearch:3.0.0 should work. Unfortunately, the dashboards image image: opensearchstaging/opensearch-dashboards:3.0.0 fails. See below for the log output. Looks, like a module is missing that was expected from observabability dashboards.

To reproduce

Take sample docker-compose from website then swap in image: opensearchstaging/opensearch:3.0.0 and image: opensearchstaging/opensearch-dashboards:3.0.0 for the node and dashboards images.

Expected behavior

The cluster should spin up when the version is valid.

Screenshots

If applicable, add screenshots to help explain your problem.

Host / Environment

No response

Additional context

This issue does not happen on 2.5.0 or 2.6.0, just when trying to use an image of main.

Relevant log output

{"type":"log","@timestamp":"2023-03-23T15:19:16Z","tags":["fatal","root"],"pid":1,"message":"Error: Cannot find module 'performance-now'\nRequire stack:\n- /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/adaptors/notebooks/default_backend.js\n- /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/adaptors/notebooks/index.js\n- /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/routes/notebooks/paraRouter.js\n- /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/routes/index.js\n- /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/plugin.js\n- /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/index.js\n- /usr/share/opensearch-dashboards/src/core/server/plugins/plugin.js\n- /usr/share/opensearch-dashboards/src/core/server/plugins/discovery/plugins_discovery.js\n- /usr/share/opensearch-dashboards/src/core/server/plugins/discovery/index.js\n- /usr/share/opensearch-dashboards/src/core/server/plugins/plugins_service.js\n- /usr/share/opensearch-dashboards/src/core/server/plugins/index.js\n- /usr/share/opensearch-dashboards/src/core/server/index.js\n- /usr/share/opensearch-dashboards/src/cli/serve/serve.js\n- /usr/share/opensearch-dashboards/src/cli/cli.js\n- /usr/share/opensearch-dashboards/src/cli/dist.js\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)\n    at Module.Hook._require.Module.require (/usr/share/opensearch-dashboards/node_modules/require-in-the-middle/index.js:61:29)\n    at require (internal/modules/cjs/helpers.js:101:18)\n    at Object.<anonymous> (/usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/adaptors/notebooks/default_backend.ts:6:1)\n    at Module._compile (internal/modules/cjs/loader.js:1085:14)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)\n    at Module.load (internal/modules/cjs/loader.js:950:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:790:12)\n    at Module.require (internal/modules/cjs/loader.js:974:19)\n    at Module.Hook._require.Module.require (/usr/share/opensearch-dashboards/node_modules/require-in-the-middle/index.js:80:39)\n    at Module.Hook._require.Module.require (/usr/share/opensearch-dashboards/node_modules/require-in-the-middle/index.js:80:39)\n    at Module.Hook._require.Module.require (/usr/share/opensearch-dashboards/node_modules/require-in-the-middle/index.js:80:39)\n    at Module.Hook._require.Module.require (/usr/share/opensearch-dashboards/node_modules/require-in-the-middle/index.js:80:39)\n    at Module.Hook._require.Module.require (/usr/share/opensearch-dashboards/node_modules/require-in-the-middle/index.js:80:39)\n    at require (internal/modules/cjs/helpers.js:101:18)\n    at Object.<anonymous> (/usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/adaptors/notebooks/index.ts:7:1) {\n  code: 'MODULE_NOT_FOUND',\n  requireStack: [\n    '/usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/adaptors/notebooks/default_backend.js',\n    '/usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/adaptors/notebooks/index.js',\n    '/usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/routes/notebooks/paraRouter.js',\n    '/usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/routes/index.js',\n    '/usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/plugin.js',\n    '/usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/index.js',\n    '/usr/share/opensearch-dashboards/src/core/server/plugins/plugin.js',\n    '/usr/share/opensearch-dashboards/src/core/server/plugins/discovery/plugins_discovery.js',\n    '/usr/share/opensearch-dashboards/src/core/server/plugins/discovery/index.js',\n    '/usr/share/opensearch-dashboards/src/core/server/plugins/plugins_service.js',\n    '/usr/share/opensearch-dashboards/src/core/server/plugins/index.js',\n    '/usr/share/opensearch-dashboards/src/core/server/index.js',\n    '/usr/share/opensearch-dashboards/src/cli/serve/serve.js',\n    '/usr/share/opensearch-dashboards/src/cli/cli.js',\n    '/usr/share/opensearch-dashboards/src/cli/dist.js'\n  ]\n}"}

 FATAL  Error: Cannot find module 'performance-now'
Require stack:
- /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/adaptors/notebooks/default_backend.js
- /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/adaptors/notebooks/index.js
- /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/routes/notebooks/paraRouter.js
- /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/routes/index.js
- /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/plugin.js
- /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/index.js
- /usr/share/opensearch-dashboards/src/core/server/plugins/plugin.js
- /usr/share/opensearch-dashboards/src/core/server/plugins/discovery/plugins_discovery.js
- /usr/share/opensearch-dashboards/src/core/server/plugins/discovery/index.js
- /usr/share/opensearch-dashboards/src/core/server/plugins/plugins_service.js
- /usr/share/opensearch-dashboards/src/core/server/plugins/index.js
- /usr/share/opensearch-dashboards/src/core/server/index.js
- /usr/share/opensearch-dashboards/src/cli/serve/serve.js
- /usr/share/opensearch-dashboards/src/cli/cli.js
- /usr/share/opensearch-dashboards/src/cli/dist.js
@stephen-crawford stephen-crawford added bug Something isn't working untriaged labels Mar 23, 2023
@bbarani bbarani transferred this issue from opensearch-project/opensearch-build Mar 27, 2023
@bbarani
Copy link
Member

bbarani commented Mar 27, 2023

Moving it to observability dashboards repo. Can someone from @opensearch-project/observability @anirudha take a look at this issue?

@derek-ho
Copy link
Collaborator

This will be fixed by #311 @ps48 can you fix up the PR and get it merged?

@vmmusings
Copy link
Member

@scrawfor99 could you please test it now. we have merged the fix yesterday.

@bbarani How can we know the timestamp of last published staging docker build?

@stephen-crawford
Copy link
Author

Hi @vamsi-amazon, I just checked and this is the current output:

os-docker-opensearch-dashboards-1  | 
os-docker-opensearch-dashboards-1  |  FATAL  Error: Cannot find module 'performance-now'
os-docker-opensearch-dashboards-1  | Require stack:
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/adaptors/notebooks/default_backend.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/adaptors/notebooks/index.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/routes/notebooks/paraRouter.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/routes/index.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/plugin.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/plugins/observabilityDashboards/server/index.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/src/core/server/plugins/plugin.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/src/core/server/plugins/discovery/plugins_discovery.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/src/core/server/plugins/discovery/index.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/src/core/server/plugins/plugins_service.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/src/core/server/plugins/index.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/src/core/server/index.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/src/cli/serve/serve.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/src/cli/cli.js
os-docker-opensearch-dashboards-1  | - /usr/share/opensearch-dashboards/src/cli/dist.js
os-docker-opensearch-dashboards-1  | 
os-docker-opensearch-dashboards-1 exited with code 1

Looks like there is still something missing from the distribution on staging. You can check this by using the default docker setup on the documentation page. You will just need to swap the plain docker-compose with one which reads opensearchstaging/opensearch:3.0.0 or opensearchstaging/opensearch-dashboards:3.0.0` where appropriate.

@ps48
Copy link
Member

ps48 commented Apr 4, 2023

@scrawfor99 The staging docker image for opensearch-dashboards:3.0.0 seems to be an old one. It was published 2 months back.

Need some input from @bbarani here to see when will the next staging publish happen.

@derek-ho
Copy link
Collaborator

Done

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

5 participants