Bitcoin Forum
December 06, 2016, 10:27:15 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: bitcoind hangs on CentOS  (Read 1449 times)
jaychristopher spendbitcoins.com
Newbie
*
Offline Offline

Activity: 18


View Profile
July 26, 2012, 10:49:04 PM
 #1

When I start bitcoind through SSH on my CentOS box it just goes to the next line and does nothing. If I run another connection through SSH I can start issuing bitcoind commands no problem.
If I close the first Shell - bitcoind shuts down..

This is weird to me because on my ubuntu box this doesnt happen.. it just says bitcoind starting and keeps running even if i close the shell..

Any ideas on this?
1481020035
Hero Member
*
Offline Offline

Posts: 1481020035

View Profile Personal Message (Offline)

Ignore
1481020035
Reply with quote  #2

1481020035
Report to moderator
1481020035
Hero Member
*
Offline Offline

Posts: 1481020035

View Profile Personal Message (Offline)

Ignore
1481020035
Reply with quote  #2

1481020035
Report to moderator
1481020035
Hero Member
*
Offline Offline

Posts: 1481020035

View Profile Personal Message (Offline)

Ignore
1481020035
Reply with quote  #2

1481020035
Report to moderator
The grue lurks in the darkest places of the earth. Its favorite diet is adventurers, but its insatiable appetite is tempered by its fear of light. No grue has ever been seen by the light of day, and few have survived its fearsome jaws to tell the tale.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481020035
Hero Member
*
Offline Offline

Posts: 1481020035

View Profile Personal Message (Offline)

Ignore
1481020035
Reply with quote  #2

1481020035
Report to moderator
1481020035
Hero Member
*
Offline Offline

Posts: 1481020035

View Profile Personal Message (Offline)

Ignore
1481020035
Reply with quote  #2

1481020035
Report to moderator
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



View Profile
July 26, 2012, 10:53:18 PM
 #2

You have a few options:

-   Turn off huponexit: shopt -u huponexit. The process may still exit if it ever tries to write to the terminal after it's been closed, depending on how it handles write errors. (Note that twiddling this option only affects that one shell. You'll need to add it to a shell startup script — or find and delete the corresponding command that's turning the option on — to have it apply to all shells subsequently started.)

-   Use nohup to run the command instead. This wrapper ignores SIGHUP, letting the underlying command run unaffected. Standard output streams are redirected into a file.

-   Use screen. This starts a completely new terminal session. You can detach to this session and reattach to it at a later time, as you please.

gweedo
Legendary
*
Offline Offline

Activity: 1246


Java, PHP, HTML/CSS Programmer for Hire!


View Profile WWW
July 26, 2012, 11:18:58 PM
 #3

or setup a cronjob to run every few minutes and check if bitcoind is running, if not start it. Also if this is a server environment setup so bitcoind starts up like apache and mysqld.

Want to earn 2500 SATOSHIS per hour? Come Chat and Chill in https://goseemybits.com/lobby
jaychristopher spendbitcoins.com
Newbie
*
Offline Offline

Activity: 18


View Profile
July 26, 2012, 11:52:08 PM
 #4

I couldnt get nohup or others to work -- I'd love to get it so I can start/stop in shell..
The cron worked okay.. Any hints on how I'd go about checking if its running before trying to execute it though?
Raoul Duke
aka psy
Legendary
*
Offline Offline

Activity: 1442



View Profile
July 26, 2012, 11:59:38 PM
 #5

Code:
$ nohup bitcoind &
$ exit

That should be all. It works for me. It's strange it didn't work.
But gweedo is right. You should start it with the system and avoid those problems.

To check if a certain process is running and start it if not you can do something along the lines of

Code:
#!/bin/bash

if ! pgrep bitcoind > /dev/null
then
  <do something to restart the bitcoind>
fi

vom
Newbie
*
Offline Offline

Activity: 27



View Profile
July 29, 2012, 04:53:57 PM
 #6

Is there a reason you aren't using -daemon ?

Code:
-daemon
                        Run in the background as a daemon and accept commands

Also, as mentioned already - screen.  Seriously - you should learn screen if you haven't already.

OTC WOT rating (http://bitcoin-otc.com/viewratingdetail.php?nick=vom513)
SH1-0151.  This is the serial number, of our orbital gun.
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!