Jarli01 / xenorchestra_installer

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

xo-server (code=exited, status=203/EXEC) #30

Closed moveFWD closed 6 years ago

moveFWD commented 6 years ago

Hi,

i'm new to Linux so maybe the following issue is easy for you to solve. Sorry for that. I came acros this great script to get the XOCE up and running.

thanks for your help!

Expected Behavior

used xo_install.sh script as explained on a clean LinuxLite installation. the script ran without errors (as far as i could see) and told to connect to the ip address to log on this failed, no webpage available


Actual Behavior

xo-server failed to start (code=exited, status=203/EXEC)


Confirm XOCE services are running

systemctl status xo-server.service Loaded: loaded (/lib/systemd/system/xo-server.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2018-08-16 18:08:08 CEST; 2h 2min ago Process: 1148 ExecStart=/usr/local/bin/node ./bin/xo-server (code=exited, status=203/EXEC) Main PID: 1148 (code=exited, status=203/EXEC)

aug 16 18:08:08 XO systemd[1]: xo-server.service: Service hold-off time over, scheduling restart. aug 16 18:08:08 XO systemd[1]: xo-server.service: Scheduled restart job, restart counter is at 5. aug 16 18:08:08 XO systemd[1]: Stopped XO Server. aug 16 18:08:08 XO systemd[1]: xo-server.service: Start request repeated too quickly. aug 16 18:08:08 XO systemd[1]: xo-server.service: Failed with result 'exit-code'. aug 16 18:08:08 XO systemd[1]: Failed to start XO Server.

Provide the output of journalctl logs

journalctl -u xo-server -f -n 50 aug 16 18:08:06 XO systemd[1]: Started XO Server. aug 16 18:08:06 XO systemd[893]: xo-server.service: Failed to execute command: No such file or directory aug 16 18:08:06 XO systemd[893]: xo-server.service: Failed at step EXEC spawning /usr/local/bin/node: No such file or directory aug 16 18:08:06 XO systemd[1]: xo-server.service: Main process exited, code=exited, status=203/EXEC aug 16 18:08:06 XO systemd[1]: xo-server.service: Failed with result 'exit-code'. aug 16 18:08:07 XO systemd[1]: xo-server.service: Service hold-off time over, scheduling restart. aug 16 18:08:07 XO systemd[1]: xo-server.service: Scheduled restart job, restart counter is at 1. aug 16 18:08:07 XO systemd[1]: Stopped XO Server.

Provide answers to these questions:

Jarli01 commented 6 years ago

Linuxlite isn't a distribution we've tested against. Please use Debian 9 or Ubuntu Server distros.

moveFWD commented 6 years ago

OK, thank you for the quick answer, i'll re-do the installation using Ubuntu Server.

Jarli01 commented 6 years ago

You're welcome, please do let us know if you encounter any issues. For reference:

https://www.ubuntu.com/server https://www.debian.org/distrib/netinst

Jarli01 commented 6 years ago

Also with XOCE you'll want to have a way to update. Here is that link

Danp2 commented 6 years ago

That distro based on Ubuntu 18.04, so it should work in theory. You would need to look at the output from the install log to see where it failed.

moveFWD commented 6 years ago

@Jarli01 thank you for the link !

@Danp2 that's exactly what i thougt. Anyway, i'll also tryp Ubuntu Server and see if this works so we can start testing. Any idea if the output form the install is saved somewhere?

Jarli01 commented 6 years ago

The most simple place to grab it would be from the journalctl logs if you don't have the installation still open via an SSH connection (on something like putty).

moveFWD commented 6 years ago

so "ExecStart=/usr/local/bin/node ./bin/xo-server (code=exited, status=203/EXEC)" and "xo-server.service: Failed at step EXEC spawning /usr/local/bin/node: No such file or directory" that show in the logs i send are not representing the core error here i suppose?

Jarli01 commented 6 years ago

Well it's saying there is nothing named "node" in /usr/local/bin so yes that is likely the issue.

Jarli01 commented 6 years ago

Can you do cd /usr/local/bin and then ls the output?

Danp2 commented 6 years ago

Just create a new VM and then rerun the install script. Once done, post the console output here for analysis.

moveFWD commented 6 years ago

@Danp2 the ls output is: n xfc4-session

@Jarli01 i tried to grab the output from the console but there was too many output to scroll back. i'll retry with a clean image tomorrow and get back in touch.

thank you both for the help so far!

Jarli01 commented 6 years ago

If what is in /usr/local/bin is only n xfc4-session then you don't have node or npm

I know nodejs gets installed through the script so there might be something else up with this Distro.

moveFWD commented 6 years ago

xo_install_log_node.txt xo_install_log.txt

Hi, attached you can find 2 outputs from the xo_install.sh script. xo_install_log.txt is the output from the install on a clean LinuxLite build 4.0 based on Ubuntu 18.04 LTS xo_install_log.txt is the output from the install on a clean LinuxLite build 4.0 based on Ubuntu 18.04 LTS + "sudo apt-get install -y nodejs" and then "ln -s /usr/bin/node /usr/local/bin/node". Seems like the nodejs gets installed on another place than the script expects. So i created a symbolic link to that location. Whith that procedure the service gets up and running well. And i am able to go to the XO web portal and log in correctly.

maybe adding "ln -s /usr/bin/node /usr/local/bin/node" in you script after installing nodejs solves this issue without manual intervention.

I then installed Ubuntu Server 18.04 LTS to see the difference. Since LinuxLite is build bases on Ubuntu. when i check the file structure /usr/bin/node and /usr/local/bin/node do not exist on the clean install. after using the xo_install.sh script i can find node under /usr/bin but not under /usr/local/bin. the behaviour is the same, the xo-server.service does not start. adding "ln -s /usr/bin/node /usr/local/bin/node" en restarting the server makes the xo-server.service running correctly. I can also log in to the XO Web portal correctly.

So the behaviour is the same on Ubuntu Server and on the LinuxLite (based on the same build).

maybe adding "ln -s /usr/bin/node /usr/local/bin/node" in you script after installing nodejs solves this issue without manual intervention or changing the way the xo-server.service starts like "ExecStart=/usr/bin/node ./bin/xo-server/" without the symbolic link to node. I also tried that and that also works fine!

Best regards

moveFWD commented 6 years ago

Hi, one aditional question. Will the plugins be affected by this? I see that the update script https://github.com/Jarli01/xenorchestra_installer shows at the end the following messages: Updated version 5.24.2 / 5.24.0 Checking plugins... Creating link for xo-server-auth-github ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-auth-google ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-auth-ldap ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-auth-saml ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-backup-reports ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-cloud ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-load-balancer ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-perf-alert ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-test-plugin ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-transport-email ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-transport-nagios ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-transport-slack ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-transport-xmpp ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Creating link for xo-server-usage-report ln: target '/usr/local/lib/node_modules/' is not a directory: No such file or directory Restarting xo-server...

Or is that only because those plugin's are not yet installed?

Danp2 commented 6 years ago

Yes, that is an issue as well.

Danp2 commented 6 years ago

The directory /usr/local/lib/node_modules/ no longer exists after installing Node. Confirmed that XO is still searching in this location, so simplest way to resolve this would be to create the directory as part of the install script.

Jarli01 commented 6 years ago

I'm testing all committed changes now on 18.04.1 (lite) and will update shortly, but the changes are pretty small and should work without issue.

Jarli01 commented 6 years ago

Fixed with the last round of updates.

geek-baba commented 6 years ago

Yes - I can confirm that its working!