Skip to content

Unable to start HHVM with the extension using systemctl  #4

Description

@andrewmilkowski

** 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


using following guide : (this issue might be strictly related to HHVM, so I might move this to that repo, but running this by you here regardless)

aaactually taking the extension out and repeating if exact result filling this under HHVM repo..

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

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

start-hhvm.sh

!/bin/bash

export LD_LIBRARY_PATH=/opt/local/src/git/aerospike/aerospike-client-c/target/Linux-x86_64/lib

/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]$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions