Author

Topic: bitcoind hangs on CentOS (Read 1676 times)

vom
newbie
Activity: 27
Merit: 0
July 29, 2012, 11:53:57 AM
#5
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.
legendary
Activity: 1358
Merit: 1002
July 26, 2012, 06:59:38 PM
#4
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
 
fi
newbie
Activity: 18
Merit: 0
July 26, 2012, 06:52:08 PM
#3
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?
legendary
Activity: 1358
Merit: 1002
July 26, 2012, 05: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.
newbie
Activity: 18
Merit: 0
July 26, 2012, 05: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?
Jump to: