countly-server icon indicating copy to clipboard operation
countly-server copied to clipboard

Docker-Compose install problems

Open danusch opened this issue 4 years ago • 4 comments

I tried installing using the docker compose approach. But I'm facing some error messages and when I log in the dashboard looks like it's missing style.

Expected Behavior

I expect no errors to show up during up phase. I expect the dashboard to show up properly.

Current Behavior

During up'ing the server I get the following error messages:

countly-api_1 | Starting master countly-api_1 | Error: Cannot find module './consolidate/api/api' countly-api_1 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) countly-api_1 | at Function.Module._load (internal/modules/cjs/loader.js:562:25) countly-api_1 | at Module.require (internal/modules/cjs/loader.js:692:17) countly-api_1 | at require (internal/modules/cjs/helpers.js:25:18) countly-api_1 | at pluginManager.init (/opt/countly/plugins/pluginManager.js:66:43) countly-api_1 | at Object. (/opt/countly/api/api.js:112:9) countly-api_1 | at Module._compile (internal/modules/cjs/loader.js:778:30) countly-api_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) countly-api_1 | at Module.load (internal/modules/cjs/loader.js:653:32) countly-api_1 | at tryModuleLoad (internal/modules/cjs/loader.js:593:12) countly-api_1 | at Function.Module._load (internal/modules/cjs/loader.js:585:3) countly-api_1 | at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) countly-api_1 | at startup (internal/bootstrap/node.js:283:19) countly-api_1 | at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

countly-frontend_1 | Error: Cannot find module './consolidate/frontend/app' countly-frontend_1 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) countly-frontend_1 | at Function.Module._load (internal/modules/cjs/loader.js:562:25) countly-frontend_1 | at Module.require (internal/modules/cjs/loader.js:692:17) countly-frontend_1 | at require (internal/modules/cjs/helpers.js:25:18) countly-frontend_1 | at pluginManager.loadAppStatic (/opt/countly/plugins/pluginManager.js:507:30) countly-frontend_1 | at Object. (/opt/countly/frontend/express/app.js:415:9) countly-frontend_1 | at Module._compile (internal/modules/cjs/loader.js:778:30) countly-frontend_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) countly-frontend_1 | at Module.load (internal/modules/cjs/loader.js:653:32) countly-frontend_1 | at tryModuleLoad (internal/modules/cjs/loader.js:593:12) countly-frontend_1 | at Function.Module._load (internal/modules/cjs/loader.js:585:3) countly-frontend_1 | at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) countly-frontend_1 | at startup (internal/bootstrap/node.js:283:19) countly-frontend_1 | at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

countly-api_1 | Error: Cannot find module './consolidate/api/api' countly-api_1 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) countly-api_1 | at Function.Module._load (internal/modules/cjs/loader.js:562:25) countly-api_1 | at Module.require (internal/modules/cjs/loader.js:692:17) countly-api_1 | at require (internal/modules/cjs/helpers.js:25:18) countly-api_1 | at pluginManager.init (/opt/countly/plugins/pluginManager.js:66:43) countly-api_1 | at Object. (/opt/countly/api/api.js:112:9) countly-api_1 | at Module._compile (internal/modules/cjs/loader.js:778:30) countly-api_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) countly-api_1 | at Module.load (internal/modules/cjs/loader.js:653:32) countly-api_1 | at tryModuleLoad (internal/modules/cjs/loader.js:593:12) countly-api_1 | at Function.Module._load (internal/modules/cjs/loader.js:585:3) countly-api_1 | at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) countly-api_1 | at startup (internal/bootstrap/node.js:283:19) countly-api_1 | at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

countly-api_1 | Error: Cannot find module './consolidate/api/api' countly-api_1 | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) countly-api_1 | at Function.Module._load (internal/modules/cjs/loader.js:562:25) countly-api_1 | at Module.require (internal/modules/cjs/loader.js:692:17) countly-api_1 | at require (internal/modules/cjs/helpers.js:25:18) countly-api_1 | at pluginManager.init (/opt/countly/plugins/pluginManager.js:66:43) countly-api_1 | at Object. (/opt/countly/api/api.js:112:9) countly-api_1 | at Module._compile (internal/modules/cjs/loader.js:778:30) countly-api_1 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) countly-api_1 | at Module.load (internal/modules/cjs/loader.js:653:32) countly-api_1 | at tryModuleLoad (internal/modules/cjs/loader.js:593:12) countly-api_1 | at Function.Module._load (internal/modules/cjs/loader.js:585:3) countly-api_1 | at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) countly-api_1 | at startup (internal/bootstrap/node.js:283:19) countly-api_1 | at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

Then after login I get a weird screen (see screenshot) and the following errors on the server console:

countly-frontend_1 | Error while reading folder of plugin consolidate: "Error: ENOENT: no such file or directory, scandir '/opt/countly/frontend/express/../../plugins/consolidate/frontend/public/javascripts'\n at Object.readdirSync (fs.js:790:3)\n at plgns.forEach.plugin (/opt/countly/frontend/express/app.js:905:35)\n at Array.forEach ()\n at /opt/countly/frontend/express/app.js:903:15\n at Function.app.loadThemeFiles (/opt/countly/frontend/express/app.js:349:13)\n at renderDashboard (/opt/countly/frontend/express/app.js:807:9)\n at /opt/countly/frontend/express/app.js:949:25\n at /opt/countly/plugins/pluginManager.js:1529:29\n at /opt/countly/node_modules/mongodb/lib/utils.js:731:5\n at handleCallback (/opt/countly/node_modules/mongodb/lib/utils.js:128:55)\n at cursor.close (/opt/countly/node_modules/mongodb/lib/cursor.js:841:66)\n at handleCallback (/opt/countly/node_modules/mongodb/lib/utils.js:128:55)\n at completeClose (/opt/countly/node_modules/mongodb/lib/cursor.js:929:16)\n at Cursor.close (/opt/countly/node_modules/mongodb/lib/cursor.js:948:12)\n at cursor._next (/opt/countly/node_modules/mongodb/lib/cursor.js:841:27)\n at self._initializeCursor (/opt/countly/node_modules/mongodb/lib/core/cursor.js:741:9)" countly-frontend_1 | Error while reading folder of plugin consolidate: "Error: ENOENT: no such file or directory, scandir '/opt/countly/frontend/express/../../plugins/consolidate/frontend/public/javascripts'\n at Object.readdirSync (fs.js:790:3)\n at plgns.forEach.plugin (/opt/countly/frontend/express/app.js:905:35)\n at Array.forEach ()\n at /opt/countly/frontend/express/app.js:903:15\n at Function.app.loadThemeFiles (/opt/countly/frontend/express/app.js:349:13)\n at renderDashboard (/opt/countly/frontend/express/app.js:807:9)\n at /opt/countly/frontend/express/app.js:949:25\n at /opt/countly/plugins/pluginManager.js:1529:29\n at /opt/countly/node_modules/mongodb/lib/utils.js:731:5\n at handleCallback (/opt/countly/node_modules/mongodb/lib/utils.js:128:55)\n at cursor.close (/opt/countly/node_modules/mongodb/lib/cursor.js:841:66)\n at handleCallback (/opt/countly/node_modules/mongodb/lib/utils.js:128:55)\n at completeClose (/opt/countly/node_modules/mongodb/lib/cursor.js:929:16)\n at Cursor.close (/opt/countly/node_modules/mongodb/lib/cursor.js:948:12)\n at cursor._next (/opt/countly/node_modules/mongodb/lib/cursor.js:841:27)\n at self._initializeCursor (/opt/countly/node_modules/mongodb/lib/core/cursor.js:741:9)"

Browser console reports errors loading: plugins.min.css, country.visualization.js, countly.dom.js, countly.utils.js, main.main.css, countly.plugins.js, countly.lib.js which explains the unusable UI.

Screenshots (if appropriate):

Screen Shot 2021-02-21 at 19 18 58

Steps to Reproduce (for bugs)

  1. curl -O https://raw.githubusercontent.com/Countly/countly-server/master/docker-compose.yml
  2. curl -O https://raw.githubusercontent.com/Countly/countly-server/master/bin/docker/nginx.server.conf
  3. modify docker-compose.yml to replace 'bin/docker/nginx.server.conf' with 'nginx.server.conf' and add COUNTLY_CONFIG_HOSTNAME with hostname to both environments.
  4. docker-compose up
  5. Access host at selected port.

More Description

Not able to use count.ly

Your Environment

  • Operating System and version: Debian 10 with docker-ce 20.10

danusch avatar Feb 21 '21 18:02 danusch

Hi danusch,

You would update image version to the latest such as countly/api:20.11.1, countly/frontend:20.11.1

paristsai avatar Apr 29 '21 00:04 paristsai

Whoa, thanks @paristsai missed that one. Does the issue still persist @danusch ?

iartem avatar Apr 29 '21 08:04 iartem

Can confirm, the docker-compose method still has issues @iartem -- I tried it today on a fresh Ubuntu 20 instance using https://raw.githubusercontent.com/Countly/countly-server/master/docker-compose.yml as referenced in the docs.

The end result after building and trying to login is the same as the above screenshot -- no javascript or css loads.

I exec'd into the frontend container and the minimized css doesn't exist.

I created a new instance and instead used the bash script one-liner and it worked first try.

nymd avatar Jul 09 '21 17:07 nymd

I've just hit the same error. Any updates?

vorotech avatar May 16 '22 20:05 vorotech

This should be fixed

ar2rsawseen avatar Sep 03 '22 12:09 ar2rsawseen