Bitcoin Forum
December 18, 2017, 06:59:50 PM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [NOT SOLVED] Monit not automatically starting bitcoind  (Read 1389 times)
Chick
Member
**
Offline Offline

Activity: 70


View Profile
July 18, 2011, 09:42:54 AM
 #1

I just setup monit on my Ubuntu 11.04 server, however, it does not start bitcoind when the system starts up, despite monit starting itself. However, it does start if I just let bitcoind start as root.


Here is what I have in /etc/monit/monitrc, the user uid & gid 1000 belongs the user I'm trying to run this on:
Code:
set daemon 120
set logfile /var/log/monit.log

check process bitcoind with pidfile "/var/run/bitcoind.pid"
        start program "/usr/local/bin/bitcoind -pid=/var/run/bitcoind.pid -datadir=/home/bitcoin/.bitcoin -daemon"
                as uid 1000 and gid 1000
        stop program "/usr/local/bin/bitcoind stop"
                as uid 1000 and gid 1000
        if 3 restarts within 5 cycles then timeout
        if failed port 8332 for 3 cycles then restart

Could anybody who has already gotten monit with bitcoin up help me? I've checked /var/log/monit.log but no useful information... Thanks!

1513623590
Hero Member
*
Offline Offline

Posts: 1513623590

View Profile Personal Message (Offline)

Ignore
1513623590
Reply with quote  #2

1513623590
Report to moderator
1513623590
Hero Member
*
Offline Offline

Posts: 1513623590

View Profile Personal Message (Offline)

Ignore
1513623590
Reply with quote  #2

1513623590
Report to moderator
1513623590
Hero Member
*
Offline Offline

Posts: 1513623590

View Profile Personal Message (Offline)

Ignore
1513623590
Reply with quote  #2

1513623590
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1513623590
Hero Member
*
Offline Offline

Posts: 1513623590

View Profile Personal Message (Offline)

Ignore
1513623590
Reply with quote  #2

1513623590
Report to moderator
1513623590
Hero Member
*
Offline Offline

Posts: 1513623590

View Profile Personal Message (Offline)

Ignore
1513623590
Reply with quote  #2

1513623590
Report to moderator
BCEmporium
Legendary
*
Offline Offline

Activity: 1148



View Profile
July 18, 2011, 07:11:26 PM
 #2

Try to start your bitcoind manually and see if it starts, also make sure the datadir is world writable, as monit doesn't run under your user.

I normally do as so, for that setup:

sudo (or as root) mkdir /bitcoin
chmod 777 /bitcoin
start program "/usr/local/bin/bitcoind -pid=/var/run/bitcoind.pid -datadir=/bitcoin -daemon"

you can also chown and chgrp your /bitcoin folder to the user monits runs under if you don't want to have it with 777 permission.

██████████████████            ██████████
████████████████              ██████████
██████████████          ▄█   ███████████
████████████         ▄████   ███████████
██████████        ▄███████  ████████████
████████        ▄█████████  ████████████
██████        ▄███████████  ████████████
████       ▄██████████████ █████████████
██      ▄███████████████████████████████
▀        ███████████████████████████████
▄          █████████████████████████████
██▄         ▀███████████████████████████
████▄        ▀██████████████████████████
██████▄        ▀████████████████████████
████████▄        ████████████████▀ █████
██████████▄       ▀█████████████  ██████
████████████▄       ██████████   ███████
██████████████▄      ▀██████    ████████
████████████████▄▄     ███     █████████
███████████████████▄    ▀     ██████████
█████████████████████▄       ███████████
███████████████████████▄   ▄████████████





▄█████████████████   ███             ███   ███   ███▄                ▄███            █████            ████████████████   ████████████████▄             █████
███▀                 ███             ███   ███   ████▄              ▄████           ███████           ███                ███           ▀███           ███████
███                  ███             ███   ███   █████▄            ▄█████          ███▀ ▀███          ███                ███            ███          ███▀ ▀███
███                  ███             ███   ███   ███ ███▄        ▄███ ███        ▄███▀   ▀███▄        ███                ███           ▄███        ▄███▀   ▀███▄
███                  ███████████████████   ███   ███  ▀██▄      ▄██▀  ███       ▄███▀     ▀███▄       ████████████████   ████████████████▀        ▄███▀     ▀███▄
███                  ███             ███   ███   ███   ▀███    ███▀   ███      ▄███▀       ▀███▄      ███                ███        ███          ▄███▀       ▀███▄
███                  ███             ███   ███   ███    ▀███  ███▀    ███     ▄███▀         ▀███▄     ███                ███         ███        ▄███▀         ▀███▄
███▄                 ███             ███   ███   ███      ██████      ███    ▄███             ███▄    ███                ███          ███      ▄███             ███▄
▀█████████████████   ███             ███   ███   ███       ████       ███   ▄███               ███▄   ████████████████   ███           ███    ▄███               ███▄

|
  TRUE BLOCKCHAIN GAMING PLATFORM 
DECENTRALISED AUTONOMOUS UNIVERSES

  HOME PAGE                                                                  WHITE PAPER 
|
Chick
Member
**
Offline Offline

Activity: 70


View Profile
July 18, 2011, 08:07:41 PM
 #3

Try to start your bitcoind manually and see if it starts, also make sure the datadir is world writable, as monit doesn't run under your user.

I normally do as so, for that setup:

sudo (or as root) mkdir /bitcoin
chmod 777 /bitcoin
start program "/usr/local/bin/bitcoind -pid=/var/run/bitcoind.pid -datadir=/bitcoin -daemon"

you can also chown and chgrp your /bitcoin folder to the user monits runs under if you don't want to have it with 777 permission.

It runs fine when I manually start it.

The directory is read/write/executable by root.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!