Closed dsiminiuk closed 3 years ago
Hi,
Thanks. Script should've exited already in the build phase but it didn't. I commited a fix to handle that properly.
The issue here is this:
error @xen-orchestra/backups@0.4.0: The engine "node" is incompatible with this module. Expected version ">=14.5". Got "12.20.2" error Found incompatible module.
There are commits in xen orchestra github from today about that module and i assume it's a work in progress. These happen from time to time when build is done against the master branch. Nothing i can do unfortunately, you should wait and try again later and stick with your current version for now.
I will keep an eye on xen orchestra repository activity if they release any new "from sources" installation instructions. I suppose it's a mistake that it would require node 14.x since instructions still say that 12.x LTS version should be used, but we'll see.
Reopened because 14.x version dependency was just released. Need to implement that to this installation script as well.
Hi,
We've just upgraded Node requirement to >=14.5, hope it's not too much troubles for you :slightly_smiling_face:
We've updated the doc as well.
quick test with node 14.x, stumbled to another error, proxy this time. @julien-f want me to open an issue or is it still WIP?
error /opt/xo/xo-builds/xen-orchestra-202102231453/node_modules/@xen-orchestra/proxy: Command failed. Exit code: 2 Command: ./scripts/systemd-service-installer Arguments: Directory: /opt/xo/xo-builds/xen-orchestra-202102231453/node_modules/@xen-orchestra/proxy Output: ./scripts/systemd-service-installer: 17: ./scripts/systemd-service-installer: npm_config_prefix: parameter not set
npm cache clean -f
npm install -g n
n latest
installing : node-v15.10.0
mkdir : /usr/local/n/versions/node/15.10.0
fetch : https://nodejs.org/dist/v15.10.0/node-v15.10.0-linux-x64.tar.xz
installed : v15.10.0 (with npm 7.5.3)
Note: the node command changed location and the old location may be remembered in your current shell.
old : /usr/bin/node
new : /usr/local/bin/node
To reset the command location hash either start a new shell, or execute PATH="$PATH"
exit
Reset the shell path by logging in again and check node version...
node -v
v15.10.0
Update xo...
./xo-install.sh --update
[info] Checking current node.js version
[ok] node.js version already on 15, checking updates
[info] Fetching Xen Orchestra source code
[info] Creating install directory: /etc/xo/xo-builds/xen-orchestra-202102230853
[ok] Shutting down xo-server
[info] Updating xen-orchestra from '1bc80eb48' to 'a6f4e6771'
[info] xo-server and xo-web build quite a while. Grab a cup of coffee and lay back
[ok] Running installation
[ok] Installing plugins
[info] Fixing binary path in systemd service configuration file
[info] Adding WorkingDirectory parameter to systemd service configuration file
[info] Fixing relative path to xo-web installation in xo-server configuration file
[info] Activating modified configuration file
[info] Symlinking fresh xo-server install/update to /etc/xo/xo-server
[info] Symlinking fresh xo-web install/update to /etc/xo/xo-web
[info] Replacing systemd service configuration file
[info] Reloading systemd configuration
[info] Starting xo-server...
waiting for port to be open
waiting for port to be open
waiting for port to be open
waiting for port to be open
waiting for port to be open
waiting for port to be open
[fail] Update completed, but looks like there was a problem when starting xo-server/reading journalctl. Please see logs for more details
Control xo-server service with systemctl for stop/start/restart etc.
Close! But no cigar.
journalctl -u xo-server -n100
Feb 23 09:02:37 xoa systemd[1]: xo-server.service: Failed with result 'exit-code'.
Feb 23 09:02:37 xoa systemd[1]: xo-server.service: Scheduled restart job, restart counter is at 4.
Feb 23 09:02:37 xoa systemd[1]: Stopped XO Server.
Feb 23 09:02:37 xoa systemd[1]: Started XO Server.
Feb 23 09:02:37 xoa xo-server[1395]: node:internal/modules/cjs/loader:926
Feb 23 09:02:37 xoa xo-server[1395]: throw err;
Feb 23 09:02:37 xoa xo-server[1395]: ^
Feb 23 09:02:37 xoa xo-server[1395]: Error: Cannot find module './dist/configure'
Feb 23 09:02:37 xoa xo-server[1395]: Require stack:
Feb 23 09:02:37 xoa xo-server[1395]: - /etc/xo/xo-builds/xen-orchestra-202102230853/@xen-orchestra/log/configure.js
Feb 23 09:02:37 xoa xo-server[1395]: - /etc/xo/xo-builds/xen-orchestra-202102230853/packages/xo-server/bin/xo-server
Feb 23 09:02:37 xoa xo-server[1395]: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:923:15)
Feb 23 09:02:37 xoa xo-server[1395]: at Function.Module._load (node:internal/modules/cjs/loader:768:27)
Feb 23 09:02:37 xoa xo-server[1395]: at Module.require (node:internal/modules/cjs/loader:995:19)
Feb 23 09:02:37 xoa xo-server[1395]: at require (node:internal/modules/cjs/helpers:92:18)
Feb 23 09:02:37 xoa xo-server[1395]: at Object.<anonymous> (/etc/xo/xo-builds/xen-orchestra-202102230853/@xen-orchestra/log/configure.js:1:18)
Feb 23 09:02:37 xoa xo-server[1395]: at Module._compile (node:internal/modules/cjs/loader:1091:14)
Feb 23 09:02:37 xoa xo-server[1395]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1120:10)
Feb 23 09:02:37 xoa xo-server[1395]: at Module.load (node:internal/modules/cjs/loader:971:32)
Feb 23 09:02:37 xoa xo-server[1395]: at Function.Module._load (node:internal/modules/cjs/loader:812:14)
Feb 23 09:02:37 xoa xo-server[1395]: at Module.require (node:internal/modules/cjs/loader:995:19)
Feb 23 09:02:37 xoa xo-server[1395]: at require (node:internal/modules/cjs/helpers:92:18)
Feb 23 09:02:37 xoa xo-server[1395]: at Object.<anonymous> (/etc/xo/xo-builds/xen-orchestra-202102230853/packages/xo-server/bin/xo-server:23:1)
Feb 23 09:02:37 xoa xo-server[1395]: at Module._compile (node:internal/modules/cjs/loader:1091:14)
Feb 23 09:02:37 xoa xo-server[1395]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1120:10)
Feb 23 09:02:37 xoa xo-server[1395]: at Module.load (node:internal/modules/cjs/loader:971:32)
Feb 23 09:02:37 xoa xo-server[1395]: at Function.Module._load (node:internal/modules/cjs/loader:812:14) {
Feb 23 09:02:37 xoa xo-server[1395]: code: 'MODULE_NOT_FOUND',
Feb 23 09:02:37 xoa xo-server[1395]: requireStack: [
Feb 23 09:02:37 xoa xo-server[1395]: '/etc/xo/xo-builds/xen-orchestra-202102230853/@xen-orchestra/log/configure.js',
Feb 23 09:02:37 xoa xo-server[1395]: '/etc/xo/xo-builds/xen-orchestra-202102230853/packages/xo-server/bin/xo-server'
Feb 23 09:02:37 xoa xo-server[1395]: ]
Feb 23 09:02:37 xoa xo-server[1395]: }
Feb 23 09:02:37 xoa systemd[1]: xo-server.service: Main process exited, code=exited, status=1/FAILURE
Feb 23 09:02:37 xoa systemd[1]: xo-server.service: Failed with result 'exit-code'.
Feb 23 09:02:37 xoa systemd[1]: xo-server.service: Scheduled restart job, restart counter is at 5.
Feb 23 09:02:37 xoa systemd[1]: Stopped XO Server.
Feb 23 09:02:37 xoa systemd[1]: xo-server.service: Start request repeated too quickly.
Feb 23 09:02:37 xoa systemd[1]: xo-server.service: Failed with result 'exit-code'.
Feb 23 09:02:37 xoa systemd[1]: Failed to start XO Server.
quick test with node 14.x, stumbled to another error, proxy this time. @julien-f want me to open an issue or is it still WIP?
error /opt/xo/xo-builds/xen-orchestra-202102231453/node_modules/@xen-orchestra/proxy: Command failed. Exit code: 2 Command: ./scripts/systemd-service-installer Arguments: Directory: /opt/xo/xo-builds/xen-orchestra-202102231453/node_modules/@xen-orchestra/proxy Output: ./scripts/systemd-service-installer: 17: ./scripts/systemd-service-installer: npm_config_prefix: parameter not set
Do not build/install @xen-orchestra/proxy
it's not intended for open source consumption yet, you will encounter issues.
This specific error occurs when you install dependencies of the proxy as root
.
quick test with node 14.x, stumbled to another error, proxy this time. @julien-f want me to open an issue or is it still WIP?
error /opt/xo/xo-builds/xen-orchestra-202102231453/node_modules/@xen-orchestra/proxy: Command failed. Exit code: 2 Command: ./scripts/systemd-service-installer Arguments: Directory: /opt/xo/xo-builds/xen-orchestra-202102231453/node_modules/@xen-orchestra/proxy Output: ./scripts/systemd-service-installer: 17: ./scripts/systemd-service-installer: npm_config_prefix: parameter not set
Do not build/install
@xen-orchestra/proxy
it's not intended for open source consumption yet, you will encounter issues.This specific error occurs when you install dependencies of the proxy as
root
.
Yeah figured something like that. Error was the outcome of running yarn
inside freshly cloned repo content. I'd expect it to be skipped if this shouldn't work yet unless it's going to be available soonish.
It's a script that should run when the package is globally installed/uninstalled, unfortunately npm scripts run even in dev mode, I'll try to find a way to detect it and bail out appropriately.
nodejs will now be upgraded to 14.x when script is ran.
Ran tests against Debian 10, Ubuntu 20 and CentOS 8 with success.
@dsiminiuk pull the latest version and if you have issues with 15 version you already upgraded manually, then downgrade to 14.
@ronivay
Downloaded latest script, updated
[info] Checking current node.js version
[ok] node.js version already on 15, checking updates
[info] Fetching Xen Orchestra source code
[info] Creating install directory: /etc/xo/xo-builds/xen-orchestra-202102240925
[ok] Shutting down xo-server
[info] Updating xen-orchestra from '95c2944f3' to '11801f306'
[info] xo-server and xo-web build quite a while. Grab a cup of coffee and lay back
[ok] Running installation
[ok] Installing plugins
[info] Fixing binary path in systemd service configuration file
[info] Adding WorkingDirectory parameter to systemd service configuration file
[info] Fixing relative path to xo-web installation in xo-server configuration file
[info] Activating modified configuration file
[info] Symlinking fresh xo-server install/update to /etc/xo/xo-server
[info] Symlinking fresh xo-web install/update to /etc/xo/xo-web
[info] Replacing systemd service configuration file
[info] Reloading systemd configuration
[info] Starting xo-server...
waiting for port to be open
waiting for port to be open
waiting for port to be open
waiting for port to be open
waiting for port to be open
waiting for port to be open
[fail] Update completed, but looks like there was a problem when starting xo-server/reading journalctl. Please see logs for more details
Control xo-server service with systemctl for stop/start/restart etc.
Yet, the service is up and I can login. Would reverting to node v14 make a difference?
If build went through and service started, then i doubt downgrading makes a difference. That part of the script looks a line (Starting XO Server...) from service logs that indicates if xo-server has started on a specific port defined in config. It will fail if that cannot be found in 60seconds which usually is more than enough. When it fails, it should print out the lines from service log to the end of scripts own logfile. You can compare that to journalctl -u xo-server output to see if it just started slowly.
And just like that, it stopped kicking out there error. I just let it build every day if there is a new version.
OS Version: Ubuntu 20.04.1 LTS Node.js version: v12.20.2 Yarn version: 1.22.5
Server specs 2 vCPUs, 4 GB RAM (VMWare Workstation 16 Pro)
Issue ./xo-install.sh --update Fails with errors I was able to rollback to a 2021-02-20 installation and it works fine.
I tried apt update and the yarn repo was complaining about invalid key so I updated it.
Installation logfile
Contents of /etc/xo/xo-builds/xen-orchestra-202102230710
copy and paste the output (if available) from command journalctl -u xo-server -n 100