Closed cclarke591 closed 5 years ago
Please try the installation on Ubuntu 18.04 Server, 16.04 is very old at this point.
I'm attempting the installation on 18.04 live (64) at the moment and once done I'll be able to provide more feedback to this.
From the initial error though it looks as though your source is missing bluebird npm. Which would cause an issue.
I'm unable to reproduce this error with a more current version of Ubuntu Server. It would be best to run the most current version if possible.
Is there a particular need to run 16.04?
No particular reason, I run a few vm's like openvpn for testing, and I know openvpn hasn't updated to 18.04 last time I checked. So I just default to 16.04 for most applications. I will try 18.04 now. Same process? Just sudo bash and run script?
Correct, same process, just with an updated distro.
Staying current is useful for other reasons beyond just getting it to install. If you ever need support from the XO developer team, they are more likely to want to help if you're at least using a current distro.
No one wants to go back and troubleshoot something from X years ago :)
I agree, its nice having a script or application running on the most current distros instead of having to backdate your version just to make one app work.
Moving on!
I spun up a new vm with 18.04 Ubuntu Server 64bit, running into the same issue. The issue standing out to me the most when watching the log blow through, is still the yarn install section at the end.
Do you have any proxy on this box or something that might be causing this? It looks like you're getting a partial file for yarn.
The issue in particular is that the yarn package validator isn't downloaded fully or is corrupted (likely you have a partial download).
It's only 3KB from what I'm seeing here when I download it directly.
No proxies setup for it. Based on the logs and the errors being thrown up I think its safe to say it is a yarn download issue like you said. If its so small I can't imagine why it wouldn't download properly. I tried with and without guest tools installed just in case as well thinking it may have been conflicting with installed networking tools from XCP-NG.
Nothing special about the Virtual Network setup either. Default as can be. DHCP ip addressing, no issues pinging out and receiving. No problems with updating from Ubuntu...
I think I will try to install Yarn separately and see if that helps...
Andddddd a big fat nope.
Had to install Node.js first, then installed yarn, and still failed.
Looking againnnnnnn at the log, it's saying https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.2.tgz is "corrupt".
Looking into the web directory, it looks like 5.1.3 is the most recent version. Would that effect anything? (Regardless is should load anyways considering you ran it yourself and it worked no problem, just spitballing noob ideas ;D)
So those are the versions of node, yarn and npm that were automatically installed on the test I ran earlier today.
Can you check what your system says is installed?
(also I didn't bother updating my test system).
Says the exact same thing as yours. I tested both before and after installing updates.
I'm working on another issue at the moment, but can you provide the link to the distro you used to install most recently with so I can test with the same thing.
I'm not sure where the issue could be since I'm unable to reproduce this. Would be good to use the same thing that you're using.
Also Debian works (or should).
I'm using an iso I downloaded a week or two ago. I will try using debian as well to see if that works instead, as well as installing a fresh version of ubuntu 18.04 iso from the website.
An iso that is only a week old should work, if you can send me the link that you used to download it I could test with that exact iso here in my lab and see if this is something related to that iso.
Unlikely but it's possible.
It was direct from the website, so no link to send. Let me try out the 2 new iso's and I will get back to you.
Alright so debian 9 didn't work either. Same error. Here is the process:
debian-9.6.0-amd64-netinst.iso direct from debian.org ---> spun up vm in XCP-NG with 2 vcpu, 2048mb of ram, 20GB of disk space, used guided install with LVM, used entire disk. Only installed standard tools, and openssh server in regards to extra software in the installation wizard. ---> Logged in via putty, used su command to switch into root. Downloaded curl. Then curled the script.
Unsure why this isn't working for you. FWIW, I just tested the script with a freshly updated copy of Ubuntu 18.04.01, and the install went just fine.
Try to run the following commands and show us the output from each --
cd /opt/xen-orchestra
yarn
yarn build
root@xoa-debian:/opt/xen-orchestra# yarn ERROR: There are no scenarios; must have at least one. root@xoa-debian:/opt/xen-orchestra# yarn build ERROR: [Errno 2] No such file or directory: 'build' root@xoa-debian:/opt/xen-orchestra#
This was after I had run the scenario this morning. I will try running on direct hardware, outside of Xen, just to find out if xen is whats messing with me. Because in theory is should be working, and since both you guys have been able to run it no problem is something with my scenario specifically.
Also would removing installation of yarn and nodejs from the script, and installing it separately first, effect the rest of the installation?
Seems like you are running into this issue -- https://github.com/yarnpkg/yarn/issues/2821
You could try running apt purge cmdtest
and then reinstall yarn with the correct commands.
Alright so Installed this scenerio (debian 9 one) directly onto hardware outside of xen and it gives the same error.
@Danp2 I thought the same thing as well while troubleshooting yarn. Here is the output from the hardware test scenerio, where this is after I have run the script and received the same error as before.
root@debian-xoa-test:/home/user# apt purge cmdtest Reading package lists... Done Building dependency tree Reading state information... Done Package 'cmdtest' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@debian-xoa-test:/home/user#
Removing it would substantially affect the script as they are required components to have a working XO installation.
@Jarli01 Are you referring to cmdtest
package or something else?
Update time.
I installed curl, git, node, and yarn manually. All went fine from what I could tell.
I then forked code (Forgive me, this is my first time really working with github, so I apologize if that's and inherently rude thing to do lol) and commented out the node and yarn installation section. I passed the first error section! A new error comes up. Here is the last section of the log:
Resolving deltas: 100% (44426/44426), done. sed: can't read /opt/xen-orchestra/packages/xo-web/src/xo-app/settings/config/index.js: No such file or directory bash: line 52: cd: /opt/xen-orchestra: No such file or directory yarn install v1.12.3 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.10s. yarn run v1.12.3 error Couldn't find a package.json file in "/home/cclarke" info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. bash: line 56: cd: packages/xo-server: No such file or directory cp: cannot stat 'sample.config.yaml': No such file or directory sed: can't read .xo-server.yaml: No such file or directory ls: cannot access '/opt/xen-orchestra/packages/xo-server-*': No such file or directory Created symlink /etc/systemd/system/multi-user.target.wants/xo-server.service → /lib/systemd/system/xo-server.service.
Installation complete, open a browser to: 192.168.55.179
Default Login:admin@admin.net Password:admin
Don't forget to change your password! root@xoa-debian:/home/cclarke#
What sticks out to me is the:
sed: can't read /opt/xen-orchestra/packages/xo-web/src/xo-app/settings/config/index.js: No such file or directory bash: line 52: cd: /opt/xen-orchestra: No such file or directory
In that first section. As well as obviously:
error Couldn't find a package.json file in "/home/cclarke"
@cclarke591 asked if removing them from the script would cause issues. Which of course it would since they are required components to XO.
The script automates the installation of the dependencies and really nothing extra to get to a working point.
We also don't use cmdtest, but the current main stable version of yarn.
@cclarke591 I can't for the life of me understand where this is failing since we can't reproduce this error.
In your most recent post, you're missing the directories required for XO /opt/xen-orchestra.
It's as if you aren't running with permission to create directories and files.
PS forking code is perfectly fine. No complaints from me.
I think you are right @Jarli01. At least that's what it looks like. But I honestly don't know enough about coding to figure out what I am doing wrong. In my mind, using bash, running as root, or even cloning the entire project into my home directory, chmod 0777 the entire /xenorchestra_installer/ directory and running the script locally, should work.
Could it be that my drives on LVM? or I'm using ftp.ca.debian.org as my main repository?
Also, dope, I'm glad that's cool with you. I think I am getting the hang of github a little more.
@Jarli01 OIC... I missed his original question. But technically, it should work because he was going to manually install yarn and node before hand, correct?
@Danp2 it should but doesn't mean it will if he is having other issues.
Honestly if I have 10 minutes free I would just run via a remote session and perform the install for him.
@cclarke591 You commented out the line cd /opt
, so the subsequent git clone
isn't being run from the correct location.
@Danp2 Lol I just found it and am in the process of testing it again with that fixed.
Re ran it, thanks @Danp2, I caught it just before you told me.
I got the same errors in the original, and whats causing them is lines 52-54. this is outside of my experience at this point lol. I have no idea what yarn is or does.
root@xoa-debian:/opt/xen-orchestra# yarn
yarn install v1.12.3
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.2.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "Unexpected end of data"
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
root@xoa-debian:/opt/xen-orchestra# yarn build
yarn run v1.12.3
$ scripts/run-script --parallel build
module.js:550
throw err;
^
Error: Cannot find module 'promise-toolbox'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/opt/xen-orchestra/scripts/run-script:4:32)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
root@xoa-debian:/opt/xen-orchestra#
This issue is clearly something within your environment, either a firewall rule or route issue that is causing the issue.
I've created a video of the installation working from VM creation to login at a brand new installation.
If you need further assistance I would check with your internal team (if you have others) to see if there might be something that is blocking or otherwise stopping the required connections to download this.
I've recorded the process from start to finish, it can be reviewed here. https://youtu.be/VaDtLNQgGsQ
Since this appears to be an issue with a dependency there isn't much that we can do. You could attempt a manual installation following the source directions but I suspect the same issue will occur.
Or you may get lucky and get this validator file.
Thanks for being patient.
No worries, thanks for keeping an eye out.
XO Guys have sorted out yarn.lock file, allowing the installation to complete flawlessly.
Thanks for your help gents.
First off, thanks for your awesome script and taking the time to check out this issue.
Keep up the good work!
Expected Behavior
Web page to load when browsing to ip address.
Actual Behavior
Web page does not load.
Confirm XOCE services are running
Provide the output of journalctl logs
journalctl -u xo-server -f -n 50
Provide answers to these questions:
Installation log: