Jarli01 / xenorchestra_installer

A simple install script for Xen Orchestra
GNU General Public License v3.0
422 stars 86 forks source link

Issues after install. Xo-server won't start. #93

Closed tjcool17 closed 3 years ago

tjcool17 commented 3 years ago

Error: Cannot find module '/opt/xen-orchestra/packages/xo-server/bin/xo-server' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15) at Function.Module._load (internal/modules/cjs/loader.js:730:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

os: 18.04 LTS and 20.04.02

thanks Trent

Danp2 commented 3 years ago

This is due to a change made in the XO source yesterday. I'm testing a fix as we speak. You can manually fix it by editing the file /lib/systemd/system/xo-server.service and changing the line that reads

ExecStart=/usr/local/bin/node ./bin/xo-server

to

ExecStart=/usr/local/bin/node ./dist/cli.mjs

After you save the file, execute the command sudo systemctl daemon-reload to force the system to load the updated version. Then you should be able to start the service with sudo systemctl start xo-server.service

tjcool17 commented 3 years ago

This work flawlessly. Thanks I have been banging my head on this for last two days. I even installed it on deb 10 same issue. This fixes it though. Thanks again.

Danp2 commented 3 years ago

Great.... thanks for confirming that the fix works. The install script should work fully once the pending PR is merged. We'll need to make corrections to the updater script so that existing installs will continue to work.

didli commented 3 years ago

I suppose there's the same issue with the Prepacked installation ?

Jarli01 commented 3 years ago

@didli very likely, I started to get to it this weekend but had to handle other items. It's on my list of things to update.

Danp2 commented 3 years ago

@didli I would have thought that you could perform the prepackaged installation and then run the updater script.

Jarli01 commented 3 years ago

@Danp2 that would work too, but of course defeats the purpose ;)

Danp2 commented 3 years ago

@Jarli01 Not sure I understand. Isn't your "prebuilt" installation based on older source that needs updating anyways?

Jarli01 commented 3 years ago

Yes it is, hence me updating it.

Danp2 commented 3 years ago

Do you do this regularly? 😱

Jarli01 commented 3 years ago

Nah, not since I got the prepacked working has it been updated (on my side).