Jarli01 / xenorchestra_installer

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

error on yarn #35

Closed babatundebusari closed 6 years ago

babatundebusari commented 6 years ago
[1/5] Validating package.json...
error @: The engine "yarn" is incompatible with this module. Expected version "^1.7.0".
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
yarn run v1.3.2
$ scripts/run-script --parallel build
module.js:549
    throw err;
    ^

Error: Cannot find module 'promise-toolbox'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/opt/xen-orchestra/scripts/run-script:4:32)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
babatundebusari commented 6 years ago

fixed by installing a few dependent packages and some OS cleanup

babatundebusari commented 6 years ago

So now installation works fine BUT nothing in browser and no way to access xenorchestra

[/opt/xen-orchestra/packages/xo-server/src/xo-mixins/store.js] Based on your code and targets, none were added.

[/opt/xen-orchestra/packages/xo-server/src/xo-mixins/subjects.js] Added following polyfills:
  es6.promise { "node":"6" }
  web.dom.iterable { "node":"6" }
  es6.symbol { "node":"6" }
  es7.symbol.async-iterator { "node":"6" }

[/opt/xen-orchestra/packages/xo-server/src/xo-mixins/workers/index.js] Based on your code and targets, none were added.

[/opt/xen-orchestra/packages/xo-server/src/xo-mixins/workers/worker.js] Based on your code and targets, none were added.

[/opt/xen-orchestra/packages/xo-server/src/xo-mixins/xen-servers.js] Added following polyfills:
  web.dom.iterable { "node":"6" }
  es6.symbol { "node":"6" }
  es7.symbol.async-iterator { "node":"6" }
  es6.promise { "node":"6" }

[/opt/xen-orchestra/packages/xo-server/src/xo.js] Added following polyfill:
  es6.promise { "node":"6" }
Successfully compiled 113 files with Babel.
[18:04:05] Finished 'buildScripts' after 3.57 min
[18:04:05] Finished 'build' after 3.57 min
Done in 248.66s.
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-auth-github': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-auth-google': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-auth-ldap': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-auth-saml': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-backup-reports': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-cloud': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-load-balancer': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-perf-alert': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-test-plugin': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-transport-email': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-transport-nagios': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-transport-slack': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-transport-xmpp': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-usage-report': File exists

Installation complete, open a browser to:
10.247.1.48

Default Login:admin@admin.net Password:admin

Don't forget to change your password!
Jarli01 commented 6 years ago

Please answer the questions in the issues template.

babatundebusari commented 6 years ago

Ubuntu 16.04 LTS

XOCE service not running

● xo-server.service - XO Server
   Loaded: loaded (/etc/systemd/system/xo-server.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since Sun 2018-08-19 18:39:22 EDT; 2min 22s ago
  Process: 31516 ExecStart=/usr/local/bin/node ./bin/xo-server (code=exited, status=200/CHDIR)
 Main PID: 31516 (code=exited, status=200/CHDIR)

Aug 19 18:39:22 xen-orchestra-5 systemd[1]: xo-server.service: Main process exited, code=exited, status=200/CHDIR
Aug 19 18:39:22 xen-orchestra-5 systemd[1]: xo-server.service: Unit entered failed state.
Aug 19 18:39:22 xen-orchestra-5 systemd[1]: xo-server.service: Failed with result 'exit-code'.
Aug 19 18:39:22 xen-orchestra-5 systemd[1]: xo-server.service: Service hold-off time over, scheduling restart.
Aug 19 18:39:22 xen-orchestra-5 systemd[1]: Stopped XO Server.
Aug 19 18:39:22 xen-orchestra-5 systemd[1]: xo-server.service: Start request repeated too quickly.
Aug 19 18:39:22 xen-orchestra-5 systemd[1]: Failed to start XO Server.

logs from /var/log/syslog

Aug 19 18:39:21 localhost systemd[1]: Stopped XO Server.
Aug 19 18:39:21 localhost systemd[1]: Started XO Server.
Aug 19 18:39:21 localhost systemd[31505]: xo-server.service: Failed at step CHDIR spawning /usr/local/bin/node: No such file or directory
Aug 19 18:39:21 localhost systemd[1]: xo-server.service: Main process exited, code=exited, status=200/CHDIR
Aug 19 18:39:21 localhost systemd[1]: xo-server.service: Unit entered failed state.
Aug 19 18:39:21 localhost systemd[1]: xo-server.service: Failed with result 'exit-code'.
Aug 19 18:39:21 localhost systemd[1]: xo-server.service: Service hold-off time over, scheduling restart.
Aug 19 18:39:21 localhost systemd[1]: Stopped XO Server.
Aug 19 18:39:21 localhost systemd[1]: Started XO Server.
Aug 19 18:39:21 localhost systemd[31510]: xo-server.service: Failed at step CHDIR spawning /usr/local/bin/node: No such file or directory
Aug 19 18:39:21 localhost systemd[1]: xo-server.service: Main process exited, code=exited, status=200/CHDIR
Aug 19 18:39:21 localhost systemd[1]: xo-server.service: Unit entered failed state.
Aug 19 18:39:21 localhost systemd[1]: xo-server.service: Failed with result 'exit-code'.
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Service hold-off time over, scheduling restart.
Aug 19 18:39:22 localhost systemd[1]: Stopped XO Server.
Aug 19 18:39:22 localhost systemd[1]: Started XO Server.
Aug 19 18:39:22 localhost systemd[31512]: xo-server.service: Failed at step CHDIR spawning /usr/local/bin/node: No such file or directory
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Main process exited, code=exited, status=200/CHDIR
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Unit entered failed state.
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Failed with result 'exit-code'.
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Service hold-off time over, scheduling restart.
Aug 19 18:39:22 localhost systemd[1]: Stopped XO Server.
Aug 19 18:39:22 localhost systemd[1]: Started XO Server.
Aug 19 18:39:22 localhost systemd[31514]: xo-server.service: Failed at step CHDIR spawning /usr/local/bin/node: No such file or directory
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Main process exited, code=exited, status=200/CHDIR
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Unit entered failed state.
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Failed with result 'exit-code'.
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Service hold-off time over, scheduling restart.
Aug 19 18:39:22 localhost systemd[1]: Stopped XO Server.
Aug 19 18:39:22 localhost systemd[1]: Started XO Server.
Aug 19 18:39:22 localhost systemd[31516]: xo-server.service: Failed at step CHDIR spawning /usr/local/bin/node: No such file or directory
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Main process exited, code=exited, status=200/CHDIR
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Unit entered failed state.
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Failed with result 'exit-code'.
Aug 19 18:39:22 localhost systemd[1]: xo-server.service: Service hold-off time over, scheduling restart.
Jarli01 commented 6 years ago

Can you run node -v and show me the output.

While 16.04 worked in the past, it's very out of date at this point. It might worth trying the current server distro.

babatundebusari commented 6 years ago
$which node
/usr/local/bin/node

$node -v
v8.11.4
Jarli01 commented 6 years ago

As for the very first reply it appears you have yarn 1.3.2 installed and the system is telling you that you need 1.7.0 or above.

Compounded with the out of date OS my initial recommendation is to update to the current stable release.

Jarli01 commented 6 years ago

Node looks good, that's their LTS version.

Jarli01 commented 6 years ago

You might need to manually upgrade yarn.

babatundebusari commented 6 years ago

lets be honest 16.04 LTS is not that outdated...14.04 LTS can be said to be outdated

i will try 18.04 then and see

how do i update yarn?

Jarli01 commented 6 years ago

I'm unable to test the build at the moment, but if you can provide a like to the ISO you've used I can test at some point and see what may be happening.

babatundebusari commented 6 years ago

how do i update yarn? and after update of yarn what do i do next?

Jarli01 commented 6 years ago

https://stackoverflow.com/questions/49689174/how-to-upgrade-yarn-version-using-terminal

babatundebusari commented 6 years ago
$npm upgrade --global yarn

   ╭─────────────────────────────────────╮
   │                                     │
   │   Update available 5.6.0 → 6.4.0    │
   │     Run npm i -g npm to update      │
   │                                     │
   ╰─────────────────────────────────────╯

and then i restarted XOCE and still same errors

Jarli01 commented 6 years ago

Please provide a link to the iso you've used and I'll test when I can.

babatundebusari commented 6 years ago

what you mean what ISO? OS is 16.04 LTS not sure where ISO matters or what do you mean by ISO?

Jarli01 commented 6 years ago

. . . .

In order to confirm if there actually is some issue I need to follow the same process you went through.

I can go to Ubuntu's website, but it doesn't mean I'm using the same exact iso that you used. You could be using an AMD build, or some random don version.

Because you've chosen to use 16.04 im asking you to provide the link so as to simplify my troubleshooting

babatundebusari commented 6 years ago

Am using xenserver hypervisor and am not sure ISO will matter here either way that will be lot of work for you i instead did the work and upgraded to 18.04 LTS and still not working

[/opt/xen-orchestra/packages/xo-server/src/xo-mixins/subjects.js] Added following polyfills:
  es6.promise { "node":"6" }
  web.dom.iterable { "node":"6" }
  es6.symbol { "node":"6" }
  es7.symbol.async-iterator { "node":"6" }

[/opt/xen-orchestra/packages/xo-server/src/xo-mixins/workers/index.js] Based on your code and targets, none were added.

[/opt/xen-orchestra/packages/xo-server/src/xo-mixins/workers/worker.js] Based on your code and targets, none were added.

[/opt/xen-orchestra/packages/xo-server/src/xo-mixins/xen-servers.js] Added following polyfills:
  web.dom.iterable { "node":"6" }
  es6.symbol { "node":"6" }
  es7.symbol.async-iterator { "node":"6" }
  es6.promise { "node":"6" }
[20:43:33] Finished 'buildStyles' after 16 s

[/opt/xen-orchestra/packages/xo-server/src/xo.js] Added following polyfill:
  es6.promise { "node":"6" }
Successfully compiled 113 files with Babel.
[20:46:49] Finished 'buildScripts' after 3.53 min
[20:46:49] Finished 'build' after 3.53 min
Done in 248.31s.
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-auth-github': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-auth-google': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-auth-ldap': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-auth-saml': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-backup-reports': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-cloud': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-load-balancer': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-perf-alert': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-test-plugin': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-transport-email': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-transport-nagios': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-transport-slack': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-transport-xmpp': File exists
ln: failed to create symbolic link '/usr/local/lib/node_modules/xo-server-usage-report': File exists

Installation complete, open a browser to:
10.247.1.48

Default Login:admin@admin.net Password:admin

Don't forget to change your password!

root@server:~# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
root@server:~# node -v
v8.11.4

root@server:~# yarn -c
yarn install v1.9.4
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 0.19s.

root@server:~# yarn -v
1.9.4

root@server:~# ls -lha /opt/
total 12K
drwxr-xr-x  3 root root 4.0K Aug 19 17:56 .
drwxr-xr-x 23 root root 4.0K Aug 19 20:03 ..
drwxr-xr-x  9 root root 4.0K Aug 19 17:57 xen-orchestra

root@server:~# systemctl status xo-server.service
● xo-server.service - XO Server
   Loaded: loaded (/etc/systemd/system/xo-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2018-08-19 20:46:52 EDT; 24min ago
  Process: 6650 ExecStart=/usr/local/bin/node ./bin/xo-server (code=exited, status=200/CHDIR)
 Main PID: 6650 (code=exited, status=200/CHDIR)

Aug 19 20:46:52 server systemd[1]: Stopped XO Server.
Aug 19 20:46:52 server systemd[1]: Started XO Server.
Aug 19 20:46:52 server systemd[1]: xo-server.service: Main process exited, code=exited, status=200/CHDIR
Aug 19 20:46:52 server systemd[1]: xo-server.service: Failed with result 'exit-code'.
Aug 19 20:46:52 server systemd[1]: xo-server.service: Service hold-off time over, scheduling restart.
Aug 19 20:46:52 server systemd[1]: xo-server.service: Scheduled restart job, restart counter is at 5.
Aug 19 20:46:52 server systemd[1]: Stopped XO Server.
Aug 19 20:46:52 server systemd[1]: xo-server.service: Start request repeated too quickly.
Aug 19 20:46:52 server systemd[1]: xo-server.service: Failed with result 'exit-code'.
Aug 19 20:46:52 server systemd[1]: Failed to start XO Server.
babatundebusari commented 6 years ago

question now is how can i uninstall or wipe out all data of any installed xenorchestra so i can start from SCRATCH?

Am thinking there is an issue somewhere so will like to start from scratch on the same server

Jarli01 commented 6 years ago

Are you attempting to install this directly on xen server rather than a VM running Ubuntu or Debian on xen server?

If so you're doing it all wrong. You need to create a VM on your hypervisor, and install this on that VM.

babatundebusari commented 6 years ago

this is on a VM using xenserver hypervisor So it is on a VM

Jarli01 commented 6 years ago

Okay, so provide the link to the installation media you used to create this VM.

Even if it's just from Ubuntu's website.

Otherwise I'm going to close this issue as a PEBKAC issue.

babatundebusari commented 6 years ago

server 64 bit LTS iso from ubuntu website http://releases.ubuntu.com/16.04/ubuntu-16.04.5-server-amd64.iso

Jarli01 commented 6 years ago

I'll test tomorrow and get back to you with what I find.

babatundebusari commented 6 years ago

but i upgraded to 18.04 LTS now and not working? did you see my reply? https://github.com/Jarli01/xenorchestra_installer/issues/35#issuecomment-414172045

Jarli01 commented 6 years ago

Just delete this VM and create a new one.

Danp2 commented 6 years ago

You could also try sudo rm -rf /opt/xen-orchestra

babatundebusari commented 6 years ago

@Danp2 did not help either did that several times

one thing i do know is updating this xenorchestra is ALWAYS an issue i have never updated easily always have one issue or the other until finally i get it to work

anyways will just create another VM to retry

babatundebusari commented 6 years ago

ok now on another VM and still errors I mean this is just not very reliable jumped on another VM box and first run of the install command ended with errors

[/opt/xen-orchestra/packages/xo-server/src/xo-mixins/xen-servers.js] Added following polyfills:
  web.dom.iterable { "node":"6" }
  es6.symbol { "node":"6" }
  es7.symbol.async-iterator { "node":"6" }
  es6.promise { "node":"6" }

[/opt/xen-orchestra/packages/xo-server/src/xo.js] Added following polyfill:
  es6.promise { "node":"6" }
Successfully compiled 113 files with Babel.
[00:05:27] 'buildScripts' errored after 2.33 min
[00:05:27] Error: Cannot find module 'themes' from '/opt/xen-orchestra/packages/xo-web/src/xo-app'
    at /opt/xen-orchestra/node_modules/browser-resolve/node_modules/resolve/lib/async.js:46:17
    at process (/opt/xen-orchestra/node_modules/browser-resolve/node_modules/resolve/lib/async.js:173:43)
    at ondir (/opt/xen-orchestra/node_modules/browser-resolve/node_modules/resolve/lib/async.js:188:17)
    at load (/opt/xen-orchestra/node_modules/browser-resolve/node_modules/resolve/lib/async.js:69:43)
    at onex (/opt/xen-orchestra/node_modules/browser-resolve/node_modules/resolve/lib/async.js:92:31)
    at /opt/xen-orchestra/node_modules/browser-resolve/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:152:21)
[00:05:27] 'build' errored after 2.37 min
* xo-web:build − Error: 1
Danp2 commented 6 years ago

Not sure why you are having so much troubles. FWIW, I just ran the build process and it worked without any issues.

Jarli01 commented 6 years ago

I'm just finishing the OS install now and will test within a moment as well.

Thanks for testing @Danp2

Jarli01 commented 6 years ago

So I'm getting an error at the very end of the installation on this ISO. (At the office LAB which is a bit flaky). Will complete the install at the home lab and update from there as well. (at some point today)

[11:24:40] 'buildScripts' errored after 1.15 min
[11:24:40] SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' (106:0) while parsing /opt/xen-orchestra/node_modules/xo-acl-resolver/index.js while parsing file: /opt/xen-orchestra/node_modules/xo-acl-resolver/index.js
    at DestroyableTransform.end [as _flush] (/opt/xen-orchestra/node_modules/insert-module-globals/index.js:114:21)
    at DestroyableTransform.prefinish (/opt/xen-orchestra/node_modules/readable-stream/lib/_stream_transform.js:138:10)
    at emitNone (events.js:106:13)
    at DestroyableTransform.emit (events.js:208:7)
    at prefinish (/opt/xen-orchestra/node_modules/readable-stream/lib/_stream_writable.js:619:14)
    at finishMaybe (/opt/xen-orchestra/node_modules/readable-stream/lib/_stream_writable.js:627:5)
    at endWritable (/opt/xen-orchestra/node_modules/readable-stream/lib/_stream_writable.js:638:3)
    at DestroyableTransform.Writable.end (/opt/xen-orchestra/node_modules/readable-stream/lib/_stream_writable.js:594:41)
    at DestroyableTransform.onend (/opt/xen-orchestra/node_modules/readable-stream/lib/_stream_readable.js:577:10)
    at Object.onceWrapper (events.js:313:30)
[11:24:40] 'build' errored after 1.15 min
* xo-web:build − Error: 1
✖ 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Created symlink from /etc/systemd/system/multi-user.target.wants/xo-server.service to /lib/systemd/system/xo-server.service.

I'm not yet sure what is causing this issue but I'll try and sort it out. @Danp2 did you use the ISO @babatundebusari provided with the link above?

Danp2 commented 6 years ago

No. My test VM was previously built using Ubuntu 18.04.1 LTS. I restored it to a pre-XO installation snapshot and then reran the install script.

Jarli01 commented 6 years ago

Ok, testing on 18.04.1 as well. This might be a compatibility issue with 16.04.5, will update in a bit.

Jarli01 commented 6 years ago

Hrm, works just fine on vBox (so it's likely hardware related). Testing the 16.04.5 iso on vBox as well.

Jarli01 commented 6 years ago

And 16.04.5 works just fine on vBox here at the office as well.

chrome_2018-08-20_12-52-55

Jarli01 commented 6 years ago

Are you selecting any additional services or roles during the installation besides SSH server and the default utilities?

LIke "web server" or some other such function?

Jarli01 commented 6 years ago

@babatundebusari just checking to see if you still need help with this? We've both tested and are unable to reproduce so without additional information we can't help to figure out this issue.

Jarli01 commented 6 years ago

@babatundebusari if you can provide any further logs we'd be happy to look. Until then I'm closing this issue as it isn't able to be reproduced in 3 separate instances.