meshcentral-docker icon indicating copy to clipboard operation
meshcentral-docker copied to clipboard

"Installing [email protected]..."

Open ra3ggi opened this issue 1 year ago • 8 comments

Meshcentral was installed from https://hub.docker.com/r/typhonragewind/meshcentral on TrueNAS Scale Everything has been working for over three months. After a recent update, there is an endless error - "Installing [email protected]..." https://i.imgur.com/GgiXyxa.png Specifying "preloadlibs-latest" does not solve the problem. Please help

ra3ggi avatar Oct 10 '23 08:10 ra3ggi

I also experienced this issue after updating to typhonragewind/meshcentral:latest (I think this is 1.1.11) a couple of days before. From the FAQ of this github: "Unable to install required module "[email protected]" -> I haven't been able to find the source of this error and can't replicate it locally. Use one of the tags that contains "preloadlibs"." So i've changed the tag from latest to preloadlibs-latest but I'm getting the same results.

After the error as stated by ra3ggi in the description of this issue, I connected to the shell of this container (docker-compose run meshcentral bash) and tried the manually proposed commands. This is however also failing:

npm ERR! code EINVAL
npm ERR! syscall rename
npm ERR! path /opt/meshcentral/node_modules/ua-parser-js/license.md
npm ERR! dest /opt/meshcentral/node_modules/.ua-parser-js-9xX4e5om/license.md
npm ERR! errno -22
npm ERR! EINVAL: invalid argument, rename '/opt/meshcentral/node_modules/ua-parser-js/license.md' -> '/opt/meshcentral/node_modules/.ua-parser-js-9xX4e5om/license.md'

So the main error seems to be "invalid argument, rename '/opt/meshcentral/node_modules/ua-parser-js/license.md' -> '/opt/meshcentral/node_modules/.ua-parser-js-9xX4e5om/license.md'"

This created log (removed the timing rows) during this manual command:

0 verbose cli /usr/local/bin/node /usr/local/bin/npm
1 info using [email protected]
2 info using [email protected]
21 verbose title npm install [email protected]
22 verbose argv "install" "[email protected]"
25 verbose logfile logs-max:10 dir:/root/.npm/_logs/2023-10-10T15_11_55_126Z-
26 verbose logfile /root/.npm/_logs/2023-10-10T15_11_55_126Z-debug-0.log
38 http fetch GET 200 https://registry.npmjs.org/ua-parser-js 161ms (cache revalidated)
39 silly placeDep ROOT [email protected] REPLACE for:  want: 1.0.35
47 silly reify mark retired [ '/opt/meshcentral/node_modules/ua-parser-js' ]
48 silly reify moves {
48 silly reify   '/opt/meshcentral/node_modules/ua-parser-js': '/opt/meshcentral/node_modules/.ua-parser-js-9xX4e5om'
48 silly reify }
51 verbose stack Error: EINVAL: invalid argument, rename '/opt/meshcentral/node_modules/ua-parser-js/package.json' -> '/opt/meshcentral/node_modules/.ua-parser-js-9xX4e5om/package.json'
52 verbose cwd /opt/meshcentral
53 verbose Linux 3.10.0-1160.95.1.el7.x86_64
54 verbose node v18.18.0
55 verbose npm  v9.8.1
56 error code EINVAL
57 error syscall rename
58 error path /opt/meshcentral/node_modules/ua-parser-js/package.json
59 error dest /opt/meshcentral/node_modules/.ua-parser-js-9xX4e5om/package.json
60 error errno -22
61 error EINVAL: invalid argument, rename '/opt/meshcentral/node_modules/ua-parser-js/package.json' -> '/opt/meshcentral/node_modules/.ua-parser-js-9xX4e5om/package.json'
62 verbose exit -22

Within the container the directory /opt/meshcentral/node_modules/.ua-parser-js-9xX4e5om does exist (only containing a subdir dist with properties "drwxr-xr-x 1 root root 8 Oct 10 15:11"

RoBo-OnGitHub avatar Oct 10 '23 15:10 RoBo-OnGitHub

Oh, problem solved, thank you!

ra3ggi avatar Oct 16 '23 06:10 ra3ggi

I'll look into this, thanks for all the debugging!

Typhonragewind avatar Oct 16 '23 10:10 Typhonragewind

At the moment everything is working !

ra3ggi avatar Oct 16 '23 10:10 ra3ggi

Hmm, I took the whole docker-compose down and restarted it trying to give a simple reproducible procedure for others. Strangely I didn't face the same issue, but an issue I seem to have encountered previously.

docker-compose up resulted into

Installing [email protected]...
ERROR: Unable to install required module "[email protected]". MeshCentral may not have access to npm, or npm may not have suffisent rights to load the new module.

Which I fixed with:

docker start meshcentral ; docker exec -it meshcentral bash -c 'npm install [email protected]' 
docker start meshcentral 

I'm not understanding why my previous issues with npm install [email protected] didn't show up now. I've tried to solve these previously by cp -r /opt/meshcentral/node_modules/ua-parser-js/* /opt/meshcentral/node_modules/.ua-parser-js-9xX4e5om, but they should not be in place anymore after having removed the container... STRANGE... For me I have a working meshcentral again, possibly more debugging on a next release ;-)

p.s. could it be that since https://github.com/Typhonragewind/meshcentral-docker/issues/27 the otplib is not included anymore in tag preloadlibs-latest?

RoBo-OnGitHub avatar Oct 16 '23 15:10 RoBo-OnGitHub

Strangely, I don't have a problem with "[email protected]". although my tag is not preloadlibs-latest but latest

ra3ggi avatar Oct 17 '23 05:10 ra3ggi

With the latest update and I have a problem with endless "Installing [email protected]..." Installing "preloadlibs-latest" doesn't work I can't enter the commands for manual installation, because it is installed on TrueNAS, and there it has its own specifics. Help, please :)

ra3ggi avatar Oct 23 '23 11:10 ra3ggi

Honestly, I got tired of the problems with this docker and switched to another ( https://hub.docker.com/r/vegardit/meshcentral ), which I advise everyone to do. There are no problems there and everything is updated in a timely manner.

ra3ggi avatar Oct 27 '23 06:10 ra3ggi