Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstart script not working #1460

Open
dseravalli opened this Issue Jun 28, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@dseravalli
Copy link

dseravalli commented Jun 28, 2017

I'm using the bitcore.conf script included in the repo unmodified, as my user is bitcore. If I cd into my node's directory (/home/bitcore/btcnode) and run bitcored, it works. I can not get bitcored to run under upstart however.

OS: Ubuntu 14.04.5 LTS
Command: sudo service bitcore start

/var/log/upstart/bitcore.log

/bin/sh: 1: exec: bitcored: not found
/bin/sh: 1: exec: bitcored: not found
/bin/sh: 1: exec: bitcored: not found
/bin/sh: 1: exec: bitcored: not found
/bin/sh: 1: exec: bitcored: not found
/bin/sh: 1: exec: bitcored: not found

/etc/init/bitcore.conf

description "Bitcore Daemon"
author "BitPay, Inc."

limit nofile 20000 30000

start on runlevel [2345]
stop on runlevel [016]

kill timeout 300
kill signal SIGINT

# user/group for bitcore daemon to run as
setuid bitcore
setgid bitcore

# home dir of the bitcore daemon user
env HOME=/home/bitcore

respawn
respawn limit 5 15

script
  exec bitcored
end script

/home/bitcore/btcnode/bitcore-node.json

{
  "network": "livenet",
  "port": 3001,
  "services": [
    "bitcoind",
    "insight-api",
    "insight-ui",
    "web"
  ],
  "servicesConfig": {
    "bitcoind": {
      "spawn": {
        "datadir": "/media/media/bitcoin",
        "exec": "/home/bitcore/.nvm/versions/node/v4.8.3/lib/node_modules/bitcore/node_modules/bitcore-node/bin/bitcoind"
      }
    }
  }
}
@madwyn

This comment has been minimized.

Copy link

madwyn commented May 16, 2018

Maybe it's because when the service started, the ENV parameters were not set yet.

Try to use the full path for bitcored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.