facebook / hhvm

A virtual machine for executing programs written in Hack.
https://hhvm.com
Other
18.19k stars 2.99k forks source link

Unable to start HHVM using systemctl #5733

Closed andrewmilkowski closed 9 years ago

andrewmilkowski commented 9 years ago

\ update, I wanted to run HHVM as shall (due to custom libraries on the LIB PATH) however adding lib ldconfig , succeeds just fine, it is not critical really ***

to /opt/local/src/git/aerospike/aerospike-client-c/target/Linux-x86_64/lib: libaerospike.so -> libaerospike.so

still it should work with startup bash marked as executable...


using following guide : ref. https://github.com/facebook/hhvm/wiki/Building-and-installing-hhvm-on-CentOS-7.x

Note: able to start HHVM extension by hand in the following way (using bash script) from the command line with the sudo

start-hhvm.sh

!/bin/bash

/opt/local/src/git/facebook/hhvm/dist/bin/hhvm --config /etc/hhvm/server.ini --user nobody --mode daemon

/opt/local/src/git/facebook/hhvm/dist/bin/hhvm --config /etc/hhvm/server.ini --mode daemon


using sudo systemctl start hhvm , following does not start (with or without --user=nobody, with the difference that user nobody creates "Unable to find/load systemlib.php" error in the /var/log/hhvm/error.log

[Unit] Description=HHVM HipHop Virtual Machine (FCGI)

[Service] ExecStartPre=-/usr/bin/mkdir -p /var/run/hhvm ExecStartPre=-/usr/bin/chown nobody /var/run/hhvm ExecStart=/opt/local/src/git/facebook/hhvm/dist/bin/start-hhvm

[Install] WantedBy=multi-user.target


pid = /var/run/hhvm/hhvm.pid

hhvm.server.port = 9000 hhvm.server.type = fastcgi hhvm.server.ip = 127.0.0.1 hhvm.log.use_log_file = true hhvm.log.header = true hhvm.log.file = /var/log/hhvm/error.log hhvm.server.thread_count = 40 hhvm.server.expose_hphp = false hhvm.server.request_timeout_seconds = 8

hhvm.extensions[] = /opt/local/src/git/aerospike/aerospike-client-hhvm/dist/lib64/hhvm/extensions/20150212/aerospike-hhvm.so


[amilkowski@localhost bin]$ sudo systemctl start hhvm [amilkowski@localhost bin]$ sudo systemctl status hhvm hhvm.service - HHVM HipHop Virtual Machine (FCGI) Loaded: loaded (/usr/lib/systemd/system/hhvm.service; enabled) Active: inactive (dead) since Fri 2015-07-17 11:06:42 EDT; 6s ago Process: 116795 ExecStart=/opt/local/src/git/facebook/hhvm/dist/bin/start-hhvm (code=exited, status=0/SUCCESS) Process: 116792 ExecStartPre=/usr/bin/chown nobody /var/run/hhvm (code=exited, status=0/SUCCESS) Process: 116790 ExecStartPre=/usr/bin/mkdir -p /var/run/hhvm (code=exited, status=0/SUCCESS) Main PID: 116795 (code=exited, status=0/SUCCESS)

Jul 17 11:06:42 localhost.localdomain systemd[1]: Starting HHVM HipHop Virtual Machin.... Jul 17 11:06:42 localhost.localdomain systemd[1]: Started HHVM HipHop Virtual Machine.... Hint: Some lines were ellipsized, use -l to show in full. [amilkowski@localhost bin]$

jwatzman commented 9 years ago

Your update makes it sound like you solved this? In any event, this looks like a RHEL, CentOS, or Fedora machine. We don't maintain the packages on those machines -- if you're having problems with startup and init scripts (as opposed to HHVM itself), you need to talk to whomever made the packages.