Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Bitcore keep alive

Discussion in 'Development Tech Discussion' started by Izham Zubir, Dec 13, 2017.

  1. Izham Zubir

    Izham Zubir New Member

    Joined:
    Nov 28, 2017
    Messages:
    24
    Likes Received:
    4
    Trophy Points:
    3
    Currently I am running bitcore using "./bin/bitcore-node-dash start" using SSH. But after SSH session expired/ended, the bitcore seems shutting down by its own. My aim is to keep insight-api and insight-ui 24/7 accessible.

    My question is, how to prevent that? Is there any command to keep the process in background? Means execution of bitcore do not have to dependant to SSH.

    What I have tried so far that not working:
    1. pm2 start ./bin/bitcore-node-dash
    2. forever start ./bin/bitcore-node-dash
     
  2. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
  3. thephez

    thephez Member
    Dash Core Team

    Joined:
    Jan 23, 2016
    Messages:
    113
    Likes Received:
    49
    Trophy Points:
    78
    This is not bitcore specific, but there are ways to do this generically on *nix. For example, see How to keep processes running after ending ssh session?. Or just set up a cron to start on boot and periodically check the status. Of course, there may be a better bitcore-specific way to do it.
     
  4. Izham Zubir

    Izham Zubir New Member

    Joined:
    Nov 28, 2017
    Messages:
    24
    Likes Received:
    4
    Trophy Points:
    3
    Thank you for the suggestion. Currently I am trying to login the server using Putty in Windows and let the Putty & PC stay alive by having 30 seconds interval sending null packet in order to keep session alive.
     
  5. thephez

    thephez Member
    Dash Core Team

    Joined:
    Jan 23, 2016
    Messages:
    113
    Likes Received:
    49
    Trophy Points:
    78
    Yes, that is definitely going to fail at some point (and you don't really want to require a 2nd computer to be online). The issue with that is due to the process running under your SSH session and ending when the session ends. The link I provided above (or any number of other related stackoverflow questions) explains how you can do this.
     
  6. Izham Zubir

    Izham Zubir New Member

    Joined:
    Nov 28, 2017
    Messages:
    24
    Likes Received:
    4
    Trophy Points:
    3
    I have been observing between keeping SSH active and using tmux. It seem using tmux is far better, been running almost 3 days without system down :D. Thanks a lot bro
     
    • Like Like x 1
  7. Skrutch

    Skrutch Guest

    I have similar problem. If I turn off SSH, node is down.
     
  8. Izham Zubir

    Izham Zubir New Member

    Joined:
    Nov 28, 2017
    Messages:
    24
    Likes Received:
    4
    Trophy Points:
    3
    You can use tmux. And then start your bitcore. Try to exit the SSH and the bitcore will kept alive
     
    • Like Like x 1
  9. MollyMilligan

    MollyMilligan New Member

    Joined:
    Jan 13, 2018
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Apart from that i am trying to get around how to embed data on dash blockchain aka OP Return.
     
  10. rosita

    rosita Member

    Joined:
    Aug 6, 2018
    Messages:
    82
    Likes Received:
    2
    Trophy Points:
    68
    I had a similar situation. Bitcore will always live :)