moonmeister / xo-install-script

Script for setup and installation of Xen-Orchestra
MIT License
12 stars 3 forks source link

Clean install and update both not working. #7

Closed astrugatch closed 6 years ago

astrugatch commented 6 years ago

Possible issue: warning " > babelify@8.0.0" has unmet peer dependency "babel-core@6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc". warning " > react-intl@2.4.0" has unmet peer dependency "prop-types@^15.5.4". warning "redux-devtools-dock-monitor > react-dock@0.2.4" has unmet peer dependency "babel-runtime@^6.3.13".

pflaugh commented 6 years ago

I too am having issues with a fresh install. Script finishes fine with no noted errors. xo-Server fails to start though. I can provide syslog if you need it.

moonmeister commented 6 years ago

@astrugatch This appears to be a node warning. If the build isn't failing it should be fine, I've noticed there are often warnings with their builds. Can you give me some info on your environment and what they symptoms of the failure are (failed build + errors, won't run, etc...).

@pflaugh The biggest thing these scripts currently lack is error handling, you kinda gotta read the output to see if anything fails. Syslogs would be helpful and/or the script output along with OS info.

I'll try to do some tests in the next couple days to see what's up.

pflaugh commented 6 years ago

@moonmeister I went ahead and reran the install script and watched the output more closely this time. I got the same exact output as @astrugatch during the yarn install for XO-Web.

Output from install script:

Cloning into '/opt/xo-web'... remote: Counting objects: 30337, done. remote: Compressing objects: 100% (110/110), done. remote: Total 30337 (delta 85), reused 102 (delta 54), pack-reused 30162 Receiving objects: 100% (30337/30337), 11.20 MiB | 9.16 MiB/s, done. Resolving deltas: 100% (20488/20488), done. Checking connectivity... done. Building XO-Server yarn install v1.3.2 [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... info fsevents@1.1.3: The platform "linux" is incompatible with this module. info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. [4/5] Linking dependencies... [5/5] Building fresh packages... Done in 47.02s. Building XO-Web yarn install v1.3.2 [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... info fsevents@1.1.3: The platform "linux" is incompatible with this module. info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. [4/5] Linking dependencies... warning " > babelify@8.0.0" has unmet peer dependency "babel-core@6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc". warning " > react-intl@2.4.0" has unmet peer dependency "prop-types@^15.5.4". warning "redux-devtools-dock-monitor > react-dock@0.2.4" has unmet peer dependency "babel-runtime@^6.3.13". [5/5] Building fresh packages... Done in 60.35s. Yay. All installed Would you like to install xo-server as a service? [Y/n]: Created symlink from /etc/systemd/system/multi-user.target.wants/xo-server.service to /etc/systemd/system/xo-server.service.

Server Fails to Start: root@XOA:/home/xoa/xo-install-script# systemctl status xo-server ? xo-server.service - XO Server Loaded: loaded (/etc/systemd/system/xo-server.service; enabled; vendor preset: enabled) Active: inactive (dead) (Result: exit-code) since Fri 2017-12-29 19:08:19 HST; 10min ago Process: 8087 ExecStart=/usr/local/bin/xo-server (code=exited, status=1/FAILURE) Main PID: 8087 (code=exited, status=1/FAILURE)

Dec 29 19:08:19 XOA systemd[1]: xo-server.service: Main process exited, code=exited, status=1/FAILURE Dec 29 19:08:19 XOA systemd[1]: xo-server.service: Unit entered failed state. Dec 29 19:08:19 XOA systemd[1]: xo-server.service: Failed with result 'exit-code'. Dec 29 19:08:19 XOA systemd[1]: xo-server.service: Service hold-off time over, scheduling restart. Dec 29 19:08:19 XOA systemd[1]: Stopped XO Server. Dec 29 19:08:19 XOA systemd[1]: xo-server.service: Start request repeated too quickly. Dec 29 19:08:19 XOA systemd[1]: Failed to start XO Server. root@XOA:/home/xoa/xo-install-script#

Syslog: root@XOA:/home/xoa/xo-install-script# journalctl -u xo-server -f -n 50 -- Logs begin at Fri 2017-12-29 19:03:11 HST. -- Dec 29 19:08:18 XOA xo-server[8078]: at Function.Module._load (module.js:489:3) Dec 29 19:08:18 XOA xo-server[8078]: at Module.require (module.js:579:17) Dec 29 19:08:18 XOA xo-server[8078]: at require (internal/module.js:11:18) Dec 29 19:08:18 XOA xo-server[8078]: at Object. (/opt/xo-server/bin/xo-server:31:25) Dec 29 19:08:18 XOA xo-server[8078]: at Module._compile (module.js:635:30) Dec 29 19:08:18 XOA xo-server[8078]: at Object.Module._extensions..js (module.js:646:10) Dec 29 19:08:18 XOA xo-server[8078]: at Module.load (module.js:554:32) Dec 29 19:08:18 XOA xo-server[8078]: at tryModuleLoad (module.js:497:12) Dec 29 19:08:18 XOA xo-server[8078]: at Function.Module._load (module.js:489:3) Dec 29 19:08:18 XOA xo-server[8078]: at Function.Module.runMain (module.js:676:10) Dec 29 19:08:18 XOA xo-server[8078]: at startup (bootstrap_node.js:187:16) Dec 29 19:08:18 XOA xo-server[8078]: at bootstrap_node.js:608:3 Dec 29 19:08:18 XOA systemd[1]: xo-server.service: Main process exited, code=exited, status=1/FAILURE Dec 29 19:08:18 XOA systemd[1]: xo-server.service: Unit entered failed state. Dec 29 19:08:18 XOA systemd[1]: xo-server.service: Failed with result 'exit-code'. Dec 29 19:08:19 XOA systemd[1]: xo-server.service: Service hold-off time over, scheduling restart. Dec 29 19:08:19 XOA systemd[1]: Stopped XO Server. Dec 29 19:08:19 XOA systemd[1]: Started XO Server. Dec 29 19:08:19 XOA xo-server[8087]: module.js:538 Dec 29 19:08:19 XOA xo-server[8087]: throw err; Dec 29 19:08:19 XOA xo-server[8087]: ^ Dec 29 19:08:19 XOA xo-server[8087]: Error: Cannot find module './dist' Dec 29 19:08:19 XOA xo-server[8087]: at Function.Module._resolveFilename (module.js:536:15) Dec 29 19:08:19 XOA xo-server[8087]: at Function.Module._load (module.js:466:25) Dec 29 19:08:19 XOA xo-server[8087]: at Module.require (module.js:579:17) Dec 29 19:08:19 XOA xo-server[8087]: at require (internal/module.js:11:18) Dec 29 19:08:19 XOA xo-server[8087]: at Object. (/opt/xo-server/index.js:11:18) Dec 29 19:08:19 XOA xo-server[8087]: at Module._compile (module.js:635:30) Dec 29 19:08:19 XOA xo-server[8087]: at Object.Module._extensions..js (module.js:646:10) Dec 29 19:08:19 XOA xo-server[8087]: at Module.load (module.js:554:32) Dec 29 19:08:19 XOA xo-server[8087]: at tryModuleLoad (module.js:497:12) Dec 29 19:08:19 XOA xo-server[8087]: at Function.Module._load (module.js:489:3) Dec 29 19:08:19 XOA xo-server[8087]: at Module.require (module.js:579:17) Dec 29 19:08:19 XOA xo-server[8087]: at require (internal/module.js:11:18) Dec 29 19:08:19 XOA xo-server[8087]: at Object. (/opt/xo-server/bin/xo-server:31:25) Dec 29 19:08:19 XOA xo-server[8087]: at Module._compile (module.js:635:30) Dec 29 19:08:19 XOA xo-server[8087]: at Object.Module._extensions..js (module.js:646:10) Dec 29 19:08:19 XOA xo-server[8087]: at Module.load (module.js:554:32) Dec 29 19:08:19 XOA xo-server[8087]: at tryModuleLoad (module.js:497:12) Dec 29 19:08:19 XOA xo-server[8087]: at Function.Module._load (module.js:489:3) Dec 29 19:08:19 XOA xo-server[8087]: at Function.Module.runMain (module.js:676:10) Dec 29 19:08:19 XOA xo-server[8087]: at startup (bootstrap_node.js:187:16) Dec 29 19:08:19 XOA xo-server[8087]: at bootstrap_node.js:608:3 Dec 29 19:08:19 XOA systemd[1]: xo-server.service: Main process exited, code=exited, status=1/FAILURE Dec 29 19:08:19 XOA systemd[1]: xo-server.service: Unit entered failed state. Dec 29 19:08:19 XOA systemd[1]: xo-server.service: Failed with result 'exit-code'. Dec 29 19:08:19 XOA systemd[1]: xo-server.service: Service hold-off time over, scheduling restart. Dec 29 19:08:19 XOA systemd[1]: Stopped XO Server. Dec 29 19:08:19 XOA systemd[1]: xo-server.service: Start request repeated too quickly. Dec 29 19:08:19 XOA systemd[1]: Failed to start XO Server.

Env Details: Ubuntu Server 16.04 LTS VM on XenServer 7.2 1vCPU 1GB of RAM 10GB of Storage

pflaugh commented 6 years ago

I have tried seeing if the dependencies could be repaired via yarn and got an error in /opt/xo-server on "yarn add dependencies"

Output:

root@XOA:/opt/xo-server# yarn add dependencies yarn add v1.3.2 [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... info fsevents@1.1.3: The platform "linux" is incompatible with this module. info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. [4/5] Linking dependencies... error An unexpected error occurred: "ENOENT: no such file or directory, open '/usr/local/share/.cache/yarn/v1/npm-gulp-4.0.0-alpha.3-2db82d9d849e47fb6460ca912f32b1bc2f5a7b6d/.yarn-metadata.json'". info If you think this is a bug, please open a bug report with the information provided in "/opt/xo-server/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command. root@XOA:/opt/xo-server#

astrugatch commented 6 years ago

@moonmeister

On Ubuntu 16.04 LTS 60GB HD 2GB Ram

On both my VM that was updated and the VM that has a fresh install the web interface is inaccessible. I would assume it is failing to start. I'm not the best with linux but if you point me somewhere I can get whatever info you need.

astrugatch commented 6 years ago

Not sure if this helps but another XOA installer script lists updated yarn commands in a recent commit (that script had been updated less recently than this one) https://github.com/Jarli01/xenorchestra_installer

moonmeister commented 6 years ago

Yarn looks happy in the build. Warnings aren't failures. I think this issue is Dec 29 19:08:19 XOA xo-server[8087]: Error: Cannot find module './dist' basically the server can't find the web code. See here: https://github.com/vatesfr/xo/blob/master/docs/from_the_sources.md

I'll test these tomorrow and see if maybe something has changed with the yarn build.

pflaugh commented 6 years ago

@astrugatch @moonmeister I ran the install of the xo-installer.sh that was referenced above from Jarli01. This script finished with the same dependency warnings during the yarn build, but everything is working and I have an XOA login screen. Astrugatch is definitely on to something here. I'm going to compare the two scripts and see if I see any differences and let you know.

(The only downside to this other one is that it threw a big Deprecation Warning for Node.Js v5.)

moonmeister commented 6 years ago

@pflaugh The yarn build use to not be required but it may be now. I'll look into it.

moonmeister commented 6 years ago

@pflaugh @astrugatch Yup, it's a yarn build issue. Per this commit it's now required: https://github.com/vatesfr/xo/commit/7d950e2b8de3b0f66c61077474e9d45cdf57dee9#diff-6e6b751a3600f59985d9f70df0b34dce I've created a dev branch with with yarn build included. The update now works for me. If you guys try this let me know how it works for you. Thanks.

pflaugh commented 6 years ago

I’ll give it a try tonight

pflaugh commented 6 years ago

I just gave the new script a shot on a fresh VM. Everything looks great and is working! Thanks for fixing this!