Jarli01 / xenorchestra_installer

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

Fresh Debian 10.1 Install Fail #61

Closed ethanpil closed 4 years ago

ethanpil commented 4 years ago

Describe the bug I just tried (for the second time) a fresh install in a Debian 10.1 VM. The install fails and XO wont start.

My feeling is that we have the wrong Yarn package install?

cd /opt/xen-orchestra yarn

and I get 00h00m00s 0/0: : ERROR: There are no scenarios; must have at least one.

Other useful stuff:

root@xo:/opt/xen-orchestra# which yarn
/usr/bin/yarn

root@xo:/opt/xen-orchestra# yarn --version
0.32+git

I then did this:

root@xo:/opt/xen-orchestra# npm install -g yarnpkg
npm WARN deprecated yarnpkg@0.15.1: Please use the `yarn` package instead of `yarnpkg`
npm WARN deprecated github@2.5.1: 'github' has been renamed to '@octokit/rest' (https://git.io/vNB11)
/usr/local/bin/yarn -> /usr/local/lib/node_modules/yarnpkg/bin/yarn.js

> core-js@2.6.9 postinstall /usr/local/lib/node_modules/yarnpkg/node_modules/core-js
> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

+ yarnpkg@0.15.1
added 169 packages from 129 contributors in 13.072s

Then I went back and did:

root@xo:/opt/xen-orchestra# /usr/local/bin/yarn
yarn install v0.15.1
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 28.25s.

None of this solved the problem, but clearly yarnpkg didnt install and the yarn command doesnt do the correct thing, which I suspect is breaking the install. If I have time, I will try on a Debian 9 to see if the issue is Debian 10. If anyone has some thoughts, or suggestions, I would appreciate it.

To Reproduce Steps to reproduce the behavior:

  1. Fresh Debian 10 install minimal
  2. apt install curl
  3. follow install instructions in readme

Expected behavior XO starts service

Screenshots N/A

Desktop/Server details (please complete the following information): Freshly downloaded and verified debian-10.1.0-amd64-netinst.iso in XCP-NG 8.0

Additional context n/a

Confirm XOCE services are running

xo-server.service - XO Server
   Loaded: loaded (/lib/systemd/system/xo-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-09-17 17:34:37 PDT; 14min ago
  Process: 104514 ExecStart=/usr/local/bin/node ./bin/xo-server (code=exited, status=1/FAILURE)
 Main PID: 104514 (code=exited, status=1/FAILURE)

Sep 17 17:34:37 xo systemd[1]: xo-server.service: Main process exited, code=exited, status=1/FAILURE
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Failed with result 'exit-code'.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Service RestartSec=100ms expired, scheduling restart.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Scheduled restart job, restart counter is at 5.
Sep 17 17:34:37 xo systemd[1]: Stopped XO Server.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Start request repeated too quickly.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Failed with result 'exit-code'.
Sep 17 17:34:37 xo systemd[1]: Failed to start XO Server.

Provide the output of journalctl logs

xo-server.service - XO Server
   Loaded: loaded (/lib/systemd/system/xo-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-09-17 17:34:37 PDT; 14min ago
  Process: 104514 ExecStart=/usr/local/bin/node ./bin/xo-server (code=exited, status=1/FAILURE)
 Main PID: 104514 (code=exited, status=1/FAILURE)

Sep 17 17:34:37 xo systemd[1]: xo-server.service: Main process exited, code=exited, status=1/FAILURE
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Failed with result 'exit-code'.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Service RestartSec=100ms expired, scheduling restart.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Scheduled restart job, restart counter is at 5.
Sep 17 17:34:37 xo systemd[1]: Stopped XO Server.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Start request repeated too quickly.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Failed with result 'exit-code'.
Sep 17 17:34:37 xo systemd[1]: Failed to start XO Server.
root@xo:/opt/xen-orchestra# journalctl -u xo-server -f -n 50
-- Logs begin at Wed 2019-09-11 14:58:06 PDT. --
Sep 17 17:34:36 xo systemd[1]: Stopped XO Server.
Sep 17 17:34:36 xo systemd[1]: Started XO Server.
Sep 17 17:34:36 xo xo-server[104508]: module.js:550
Sep 17 17:34:36 xo xo-server[104508]:     throw err;
Sep 17 17:34:36 xo xo-server[104508]:     ^
Sep 17 17:34:36 xo xo-server[104508]: Error: Cannot find module 'bluebird'
Sep 17 17:34:36 xo xo-server[104508]:     at Function.Module._resolveFilename (module.js:548:15)
Sep 17 17:34:36 xo xo-server[104508]:     at Function.Module._load (module.js:475:25)
Sep 17 17:34:36 xo xo-server[104508]:     at Module.require (module.js:597:17)
Sep 17 17:34:36 xo xo-server[104508]:     at require (internal/module.js:11:18)
Sep 17 17:34:36 xo xo-server[104508]:     at Object.<anonymous> (/opt/xen-orchestra/packages/xo-server/bin/xo-server:17:18)
Sep 17 17:34:36 xo xo-server[104508]:     at Module._compile (module.js:653:30)
Sep 17 17:34:36 xo xo-server[104508]:     at Object.Module._extensions..js (module.js:664:10)
Sep 17 17:34:36 xo xo-server[104508]:     at Module.load (module.js:566:32)
Sep 17 17:34:36 xo xo-server[104508]:     at tryModuleLoad (module.js:506:12)
Sep 17 17:34:36 xo xo-server[104508]:     at Function.Module._load (module.js:498:3)
Sep 17 17:34:36 xo xo-server[104508]:     at Function.Module.runMain (module.js:694:10)
Sep 17 17:34:36 xo xo-server[104508]:     at startup (bootstrap_node.js:204:16)
Sep 17 17:34:36 xo xo-server[104508]:     at bootstrap_node.js:625:3
Sep 17 17:34:36 xo systemd[1]: xo-server.service: Main process exited, code=exited, status=1/FAILURE
Sep 17 17:34:36 xo systemd[1]: xo-server.service: Failed with result 'exit-code'.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Service RestartSec=100ms expired, scheduling restart.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Scheduled restart job, restart counter is at 4.
Sep 17 17:34:37 xo systemd[1]: Stopped XO Server.
Sep 17 17:34:37 xo systemd[1]: Started XO Server.
Sep 17 17:34:37 xo xo-server[104514]: module.js:550
Sep 17 17:34:37 xo xo-server[104514]:     throw err;
Sep 17 17:34:37 xo xo-server[104514]:     ^
Sep 17 17:34:37 xo xo-server[104514]: Error: Cannot find module 'bluebird'
Sep 17 17:34:37 xo xo-server[104514]:     at Function.Module._resolveFilename (module.js:548:15)
Sep 17 17:34:37 xo xo-server[104514]:     at Function.Module._load (module.js:475:25)
Sep 17 17:34:37 xo xo-server[104514]:     at Module.require (module.js:597:17)
Sep 17 17:34:37 xo xo-server[104514]:     at require (internal/module.js:11:18)
Sep 17 17:34:37 xo xo-server[104514]:     at Object.<anonymous> (/opt/xen-orchestra/packages/xo-server/bin/xo-server:17:18)
Sep 17 17:34:37 xo xo-server[104514]:     at Module._compile (module.js:653:30)
Sep 17 17:34:37 xo xo-server[104514]:     at Object.Module._extensions..js (module.js:664:10)
Sep 17 17:34:37 xo xo-server[104514]:     at Module.load (module.js:566:32)
Sep 17 17:34:37 xo xo-server[104514]:     at tryModuleLoad (module.js:506:12)
Sep 17 17:34:37 xo xo-server[104514]:     at Function.Module._load (module.js:498:3)
Sep 17 17:34:37 xo xo-server[104514]:     at Function.Module.runMain (module.js:694:10)
Sep 17 17:34:37 xo xo-server[104514]:     at startup (bootstrap_node.js:204:16)
Sep 17 17:34:37 xo xo-server[104514]:     at bootstrap_node.js:625:3
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Main process exited, code=exited, status=1/FAILURE
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Failed with result 'exit-code'.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Service RestartSec=100ms expired, scheduling restart.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Scheduled restart job, restart counter is at 5.
Sep 17 17:34:37 xo systemd[1]: Stopped XO Server.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Start request repeated too quickly.
Sep 17 17:34:37 xo systemd[1]: xo-server.service: Failed with result 'exit-code'.
Sep 17 17:34:37 xo systemd[1]: Failed to start XO Server.

Provide answers to these questions:

egberdun commented 4 years ago

I am having the exact same issue on Debian 10.0.0! Did a basic netinstall for it and rebooted, got the script, ran it, and I'm seeing the very same errors (yarn environment error, journalctl cannot find module bluebird, same systemctl status output, etc). Essentially the same as reported above, but without any manual fiddling at all.

I have just finished running the script on Debian 9.11, and it works without issues. I stared at the installation script output, and indeed it seems that the Yarn install steps at the end did not complete at all when compared to the 10.0.0 attempt.

Danp2 commented 4 years ago

I will take a look at it, but I suspect this is caused by an upstream issue.

Jarli01 commented 4 years ago

@Danp2 didn't we have another issue with bluebird a while back?

Danp2 commented 4 years ago

@Jarli01 Yes... you previously added apt-transport-https to the dependency list here -- #52

Danp2 commented 4 years ago

Guessing the error is related to this --

Get:4 https://dl.yarnpkg.com/debian stable InRelease [13.3 kB]
Err:4 https://dl.yarnpkg.com/debian stable InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23E7166788B63E1E
Reading package lists... Done
W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23E7166788B63E1E
E: The repository 'https://dl.yarnpkg.com/debian stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Danp2 commented 4 years ago

There also this, which occurs just prior to the above --

E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
curl: (23) Failed writing body (550 != 1369)

Seems like this line is failing -- /usr/bin/curl -sS $yarn_gpg | apt-key add -

Danp2 commented 4 years ago

Testing now after manually installing gnupg

Danp2 commented 4 years ago

Worked manually. Coded the fix to the install script. Would someone please test to confirm? Use the following command to test --

sudo curl https://raw.githubusercontent.com/Jarli01/xenorchestra_installer/dp_debianfix/xo_install.sh | bash

egberdun commented 4 years ago

Will test this tonight and confirm!

ethanpil commented 4 years ago

Worked manually. Coded the fix to the install script. Would someone please test to confirm? Use the following command to test --

sudo curl https://raw.githubusercontent.com/Jarli01/xenorchestra_installer/dp_debianfix/xo_install.sh | bash

I just tested and can confirm this works as expected. XO installed and started without any further issues.

Jarli01 commented 4 years ago

GnuPG is included in the full version, so must've been removed from the netinstall iso.

Danp2 commented 4 years ago

Fixed in #62.

egberdun commented 4 years ago

FYI, issue is solved on 10.0.0 too ^_^.

Jarli01 commented 4 years ago

I was just able to confirm, gpg is included in the full live iso but not the netinstall iso. Just another dependency that is needed.

@Danp2 thanks for jumping on that so quickly.