Bitcoin Forum
September 30, 2022, 10:56:03 PM *
News: Latest Bitcoin Core release: 23.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 »
201  Bitcoin / Bitcoin Technical Support / Re: How to set up a secure offline savings wallet on: May 17, 2017, 07:57:28 PM

You can boot ubuntu from a removable usb stick that should be fine.
However, there is considered to be a problem with the random number generation of linux software (and i'm not sure if this has been fixed yet)?
The idea of linux is that is it fairly immune from malware due to the security levels of the operating system, it doesn't make it impossible for something to sneak on.
I don't think you'll have to pull the battery out if it's not removable (that's probably ust to ensure the the computeris definitely off fully (which may be impossible as every computer has at least a clock that remains active that may still send a very small current through other parts of the computer).
Also you'll have to ensure that there is no problem with the usb drive that you use as they are still fairly bad at reliability over large amount of use (so ensure you put it on another USB stick/cd drive or any other storage medium if you can).
You cannot send transactions before the blockchain is downloaded. However, i'd recommend electrum.org if you wanted to do that (only use electrum.org to download their software). As they don't require you to download the blockchain. And you can place that on a separate removable USB stick as a portable version and it is then easier to acces across both platforms.

"~/.bitcoin" will be located on the ubuntu operating system on the USB stick.
A strong passphrase doesn't immunise your wallet from being hacked. It reduces the likelihood of it being hacked. Unless you use a fully randomized password of several megabytes of size (large enough for all the private keys)

If you're going to distribute it to the 5 friends, consider doing that offline (sending it using a flash drive or even a CD)

I don't think Electrum's source code will be as widely reviewed and scrutinized as Bitcoin Core.  Hence, I'm a little leery of that.

Can I copy the block folder from the Mac onto a second USB stick and then after booting up Ubuntu, copy the block folder and over-write the "~/.bitcoin" folder created by Bitcoin Core under Ubuntu on the Ubuntu USB stick?  (To download the blockchain again on the Ubuntu stick will take 5 days minimally.  I'm hoping to avoid this.)

Under "How to Deposit Funds", steps 7 and 8 state:

Quote
  • Shut down your computer, and boot Ubuntu (or Linux distribution of you choice) from a liveCD. This will not affect your current operating system.
  • Disconnect machine from the internet.

This means that Ubuntu will be online.  Don't we want to keep Ubuntu offline?  Shouldn't those steps be reversed?

Under "How to Retrieve Funds", it has these steps:

Quote
  • Run bitcoin client and close it again.
  • Replace wallet.dat in ~/.bitcoin directory with wallet.dat from USB drive.

Why do this?  Why not copy wallet.dat from USB onto ~/.bitcoin directory before launching Bitcoin Core?  That way, Bitcoin will use my wallet and not create a new one.

Step 5 states:

Quote
  • Connect to the internet.

If we do this, then how is this an "offline savings wallet"?

202  Bitcoin / Bitcoin Technical Support / Re: Bitcoin Core & pruning mode on: May 17, 2017, 06:12:28 PM
Also minimal number from that command line to start prune mode: "550" - is it linked directly to disk space pruned blockchain will take?
That number is the number of Megabytes to allocate for block and undo files. Each block can have up to 1 Mb of block file and 1 Mb of undo file. 550 will thus store, at a minimum, ~2 days of blocks.

What are benefits of setting prune to be anything greater than 550, such as 551, 2000, 3000?

I'm planning to run Bitcoin Core 0.14.1 on two machines:  one that is online and another that is offline (hence offline wallet).  I'll have to update the blockchain once in a while on my online machine.  The offline machine will be the same physical machine except booted from a Ubuntu USB stick.  To run Bitcoin Core on the offline machine, I was thinking of running Bitcoin Core from the same USB stick.  Is this do-able?

On the rare occasion that I use my offline machine, I was thinking that I would copy the block folder from the online machine onto a second USB stick, go offline, boot up Ubuntu from the first USB stick, copy the block folder from the second USB stick to the first USB stick.  This way, when I launch Bitcoin Core from the first USB stick, it would be synced and therefore I will be able to send out bitcoins.

Does this sound do-able?
203  Bitcoin / Bitcoin Technical Support / How to set up a secure offline savings wallet on: May 15, 2017, 06:44:15 PM
After researching wallets, I think I like to stick with Bitcoin Core, because it seems the least risky.  It seems the least risky because I'm guessing that its source code is reviewed by the most people.  With some wallets, I don't think many people review the source code.  I don't see how anyone can review the source code in a hardware wallet's firmware.

It seems that a very secure method is the following:

https://en.bitcoin.it/wiki/How_to_set_up_a_secure_offline_savings_wallet
"Setting up an offline wallet from scratch"

Under "How to Deposit Funds", step 7 states:

Quote
Shut down your computer, and boot Ubuntu (or Linux distribution of you choice) from a liveCD. This will not affect your current operating system.

According to the link for liveCD (https://www.ubuntu.com/download/desktop), I can create a bootable Ubuntu USB stick from my Mac, which is what I'll do.  When I do this, can malware get into my USB stick or into Ubuntu?

Step 11 states:

Quote
Shut down system and turn off computer. Before switching your computer on again, remove all power sources for about 1 minute. Physically remove battery from laptop.

I have a Mac and cannot take out the battery.  How important is this step?

Step 14 states:

Quote
Backup encrypted wallet.dat file in several places:
  • Send it to your 5 best friends by email attachment and ask them to save it for you.
  • Save it on your cloud drive accounts created in step 1.

Am I correct to assume that if the wallet.dat file is encrypted with a strong passphrase, then it should be safe and secure to allow anyone, even hackers, to take a copy of wallet.dat, because they won't be able to decrypt it?

Under "How to Retrieve Funds", it has these steps:

Quote
  • Boot from Ubuntu liveCD, as in step 5 above.
  • Insert USB drive.
  • Run bitcoin client and close it again.
  • Replace wallet.dat in ~/.bitcoin directory with wallet.dat from USB drive.
  • Connect to the internet.
  • Restart bitcoin client.
  • Wait for blocks to download (optional).
  • Send bitcoins.

Step 4 states:

Quote
Replace wallet.dat in ~/.bitcoin directory with wallet.dat from USB drive.

Where will this ~/.bitcoin directory be?  Will it be on my Mac's hard drive or on the USB drive?  (If Bitcoin Core (running under Ubuntu) creates this directory onto my Mac's hard drive, then this means I'll have 2 bitcoin directories on my Mac:  one for Bitcoin Core that has already run under my Mac and another for Bitcoin Core running under Ubuntu.)

Step 5 states:

Quote
Connect to the internet.

Why bother booting from Ubuntu (especially running it online) if the wallet.dat is already e-mailed to other people and sitting in the cloud (after doing step 14 above)?  Is this because Ubuntu (booted from a CD) will prevent malware or key-loggers from getting my passphrase?  Is it not possible that some malware or key-logger can still work on my computer through the internet?

Step 7 states:

Quote
Wait for blocks to download (optional).

I already have the blockchain downloaded and synced on my Mac with Bitcoin Core v0.14.1, pruned to 2GB.  Will Bitcoin Core, running under Ubuntu on my Mac, be able to access this same folder?  (If so, then downloading the blocks and synchronizing will take far less time.)

Can I indeed send out bitcoins if the Bitcoin Core has not synchronized the blockchain?

Am I correct to assume that after I've sent out bitcoins, I should "backup the wallet.dat file in several places" again?
204  Bitcoin / Bitcoin Technical Support / Re: Can I delete old copies of wallet.dat? on: May 15, 2017, 01:41:33 PM

Thanks for your reply.


Why would the different wallet.dat files show different balances?  Don't they have the same addresses and keys?
No. After 100 addresses are used (including change addresses), a new set of 100 addresses will have been generated which are not part of the previous backup.

I didn't make anywhere close to 100 transactions.  Just a handful.  Therefore, shouldn't the same addresses and keys (that had any transactions) exist in all copies of the wallet.dat?  If so, shouldn't Bitcoin Core be able to determine from those addresses and keys, the most up-to-date bitcoin balance (and the same balance) for all copies of wallet.dat?
205  Bitcoin / Bitcoin Technical Support / Can I delete old copies of wallet.dat? on: May 15, 2017, 01:25:27 AM
I have Bitcoin Core and wallet.dat.

In the past, I've made backups of wallet.dat by copying them to another disk.  Now, when I open each of the wallet.dat with Bitcoin Core, I see a different balance.  This makes sense because there were transactions between each time I took a backup copy.

Am I correct to assume that I can delete the older copies?  (I read somewhere that I should never delete any wallet.)

Why would the different wallet.dat files show different balances?  Don't they have the same addresses and keys?
206  Bitcoin / Bitcoin Technical Support / Re: bitcoind invoked oom-killer on: April 22, 2015, 07:33:47 PM
just check randomly what process is using ram resources with top or htop.

some process is making a peak on ram usage therefore kernel starts killing processes. I suggest htop - you can order processes by ram usage.

there's probably is a better way to monitor this but I am not a system administrator :-)

Most of the memory is used by bitcoind.  It usually shows 30%.  Below is some of the output from top:

Code:
  PID USER        PR  NI  VIRT      RES  SHR S %CPU %MEM        TIME+  COMMAND                                                 
  652 bitcoin     35  15 2689m     612m 4048 S    1 30.6     844:08.78 bitcoind                                               
  20177 www-data  20   0  358m      15m 3784 S    0  0.7       0:00.29 apache2                                               
  20463 www-data  20   0  357m      14m 3728 S    0  0.7       0:00.20 apache2                                               
  20136 www-data  20   0  358m      14m 3760 S    0  0.7       0:00.20 apache2                                                 
  20474 www-data  20   0  357m      14m 3572 S    0  0.7       0:00.11 apache2                                               
  19096 www-data  20   0  356m      13m 3972 S    0  0.7       0:01.09 apache2                                               
  19098 www-data  20   0  355m      13m 3908 S    0  0.7       0:00.98 apache2                                               
  20135 www-data  20   0  352m     9092 3812 S    0  0.4       0:00.28 apache2

Not only is bitcoind a memory hog, it is also a disk hog.


You can disable the wallet, set the cache lower and decrease the maximum connections but that's about all you can do to minimise its ram usage. It will still use heaps of ram. Short of a rewrite, or using different software, there's no way around it.

What do you think is the lowest that I can set cache and maximum connections to?  According to https://en.bitcoin.it/wiki/Running_Bitcoin , there is a dbcache setting, but no cache setting.  Are you referring to dbcache?
207  Bitcoin / Bitcoin Technical Support / Re: bitcoind invoked oom-killer on: April 21, 2015, 07:37:15 PM
Is this on a VPS? VPS host systems are well known for killing mysqld and bitcoind with the OOM killer, so you definitely need more RAM. For a website and mysql and bitcoind you can't get away with less than 4gb although 8gb is preferred.

Yes, it's a VPS.  4-8 gb?  Wow, bitcoind is a hog.

it seems you don't have space on your memory including swap. you need to understand the reason of the peak. track down with / top or stop occasionally.

Can you elaborate on how I can track down with / top?  What am I supposed to be looking for when I stop bitcoind occasionally?
208  Bitcoin / Bitcoin Technical Support / Re: bitcoind invoked oom-killer on: April 21, 2015, 01:45:23 AM
Bitcoind uses a LOT of ram, and even more so (probably with leaks) if you compile it yourself with anything but the exact set of libraries that the official binary is compiled with. I struggled with even 4GB of ram on my server until I gave up compiling it myself and ended up using the official binary. However even that hovers around 1.2GB mem usage when well connected and often spikes much higher.

Translation: You need more ram to use bitcoind, and use the official binary if you can.

Thanks for your insight.

I used the official binary.

My server has 2 GB of RAM.  "top" tells me that bitcoind uses 30% of of my server's memory, which equates to 600 MB.  Are you saying that bitcoind will request 2 GB (or more) every once in a while?  What causes this?  Will the memory usage go down if I reduce the number of connections?
209  Bitcoin / Bitcoin Technical Support / bitcoind invoked oom-killer on: April 19, 2015, 03:58:55 PM
My site crashed because MySQL stopped running.  According to the syslog, the following happened:

Code:
...
bitcoind invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=-17, oom_score_adj=-1000
bitcoind cpuset=/ mems_allowed=0
...
...
2299 total pagecache pages
1911 pages in swap cache
Swap cache stats: add 855411, delete 853500, find 7256250/7310330
Free swap  = 0kB
Total swap = 1048572kB
524270 pages RAM
11529 pages reserved
61072 pages shared
497066 pages non-shared
...
...
Out of memory: Kill process 5919 (mysqld) score 25 or sacrifice child
Killed process 5919 (mysqld) total-vm:2126812kB, anon-rss:29312kB, file-rss:0kB
init: mysql main process (5919) killed by KILL signal
init: mysql main process ended, respawning
apache2 invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0
apache2 cpuset=/ mems_allowed=0
...

I'm guessing that "bitcoind invoked oom-killer" caused the server to run out of memory which caused the server to kill mysqld.  Am I correct?

I have 2 GB of memory.  This is what shows on "top":

Code:
Mem:   2050964k total,  1976288k used,    74676k free,    18068k buffers
Swap:  1048572k total,   948164k used,   100408k free,   742556k cached

According to "top", bitcoind usually uses approximately 30% of memory (which I think is WAY TOO much).  My server is mainly for my site that runs bitcoind.  There is little traffic, so Apache cannot be using much memory.  I would've assume that 2 GB is overkill.

What is causing "bitcoind invoked oom-killer"?  How can I prevent this from happening?




210  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 16, 2015, 04:11:55 PM

Ubuntu?  Debian?  version?


Ubuntu 12.04
211  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 16, 2015, 02:22:01 PM
dserrano5:

I did the following

Code:
$ sudo apt-get remove apparmor
[sudo] password for stockbet:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libxxf86dga1 x11-utils libxxf86vm1 xterm libgl1-mesa-dri libxcb-glx0 libgl1-mesa-glx
  libx11-xcb1 libglapi-mesa xbitmaps libxaw7 linux-headers-3.5.0-23-generic libxmu6
  linux-headers-3.5.0-23 libfontenc1 libxtst6 libutempter0 tk8.5 libxcb-shape0 libxv1
  libllvm3.0
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  apparmor
0 upgraded, 0 newly installed, 1 to remove and 55 not upgraded.
After this operation, 1,081 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 257432 files and directories currently installed.)
Removing apparmor ...
 * Clearing AppArmor profiles cache
   ...done.
All profile caches have been cleared, but no profiles have been unloaded.
Unloading profiles will leave already running processes permanently
unconfined, which can lead to unexpected situations.

To set a process to complain mode, use the command line tool
'aa-complain'. To really tear down all profiles, run the init script
with the 'teardown' option."
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot

Should I run 'apt-get autoremove' to remove the above packages that are no longer required?

Code:
$ ps aux | grep apparmor
username  9244  0.0  0.0   9384   936 pts/0    S+   23:29   0:00 grep apparmor

As per http://stackoverflow.com/questions/9375711/more-elegant-ps-aux-grep-v-grep , grep is included in the results, and so I did the following as well, which returned nothing:

Code:
$ ps aux | grep '[a]pparmor'
$

I rebooted.

blocknotify is now working!!

Cryptowatch.com:

I had done the above already before I saw your posting.

I ran these commands:

Code:
$ sudo dpkg --get-selections | grep apparmor
apparmor deinstall
dh-apparmor install
$

$ apt-cache search apparmor
apparmor - User-space parser utility for AppArmor
apparmor-docs - Documentation for AppArmor
apparmor-notify - AppArmor notification system
apparmor-profiles - Profiles for AppArmor Security policies
apparmor-utils - Utilities for controlling AppArmor
dh-apparmor - AppArmor debhelper routines
libapache2-mod-apparmor - changehat AppArmor library as an Apache module
libapparmor-dev - AppArmor development libraries and header files
libapparmor-perl - AppArmor library Perl bindings
libapparmor1 - changehat AppArmor library
libpam-apparmor - changehat AppArmor library as a PAM module
python-libapparmor - AppArmor library Python bindings
$

To find the files installed with a package, I ran:

Code:
$ dpkg -L apparmor

From a glance, it seems that all of the files shown by the above command are still on my system, even though I had uninstalled apparmor.  There are some files in /etc/apparmor.d/local/ that were not listed by the above command.

All of the files shown below still exist on my system:

Code:
$ dpkg -L dh-apparmor
/.
/usr
/usr/bin
/usr/bin/dh_apparmor
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/dh_apparmor.1.gz
/usr/share/doc
/usr/share/doc/dh-apparmor
/usr/share/doc/dh-apparmor/changelog.Debian.gz
/usr/share/doc/dh-apparmor/copyright
/usr/share/debhelper
/usr/share/debhelper/autoscripts
/usr/share/debhelper/autoscripts/postrm-apparmor
/usr/share/debhelper/autoscripts/postinst-apparmor
$

I don't know if any of the above files matter anymore because blocknotify now works.

dserrano5 and Cryptowatch.com:

Thank you so much for your help.

What about AppArmor?  Without it, isn't my system insecure?

Is there any way to find out the offending AppArmor profile and to fix it?  I googled (startpage.com) for "default profile in apparmor" and cannot find much, other than to assume that apparmor runs the profiles in /etc/apparmor.d.  I looked at some of the profiles in /etc/apparmor.d and cannot figure out how any of them can interfere with bitcoind.

I didn't upgrade my operating system.  I didn't install AppArmor.  What do you think prompted AppArmor to cause the problem?

212  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 15, 2015, 09:23:26 PM
I'm not exactly sure I know what you mean by:


a. Find out the name of the package(s) that contains apparmor on your system.
b. List all files associated with those packages on your system. Make a note of those.


https://wiki.ubuntu.com/DebuggingApparmor  seems to shed some light on "package".  Based on this, I did the following:

Code:
$ cd /etc/apparmor.d
$ ls
abstractions  force-complain  tunables        usr.sbin.rsyslogd
cache       local       usr.sbin.mysqld  usr.sbin.tcpdump
disable       sbin.dhclient   usr.sbin.ntpd
$ dpkg -S sbin.dhclient
isc-dhcp-client: /etc/apparmor.d/sbin.dhclient
$ dpkg -S usr.sbin.mysqld
mysql-server-5.5: /etc/apparmor.d/usr.sbin.mysqld
$ dpkg -S usr.sbin.ntpd
ntp: /etc/apparmor.d/usr.sbin.ntpd
ntp: /etc/apparmor/init/network-interface-security/usr.sbin.ntpd
$ dpkg -S usr.sbin.rsyslogd
rsyslog: /etc/apparmor.d/usr.sbin.rsyslogd
$ dpkg -S usr.sbin.tcpdump
tcpdump: /etc/apparmor.d/usr.sbin.tcpdump

Note:  the following from /etc/apparmor.d are folders:

abstractions
cache
disable
force-complain
local
tunables

I looked inside each of the above folders and did not see "bitcoin".  The "abstractions" folder had approximately 73 files.  There were a few files in the other folders.  Did you want me to find the package for all these as well?

Yes, I'm running Ubuntu.  I don't know if AppArmor was added with a recent update.  I read somewhere that AppArmor comes with Ubuntu.

213  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 15, 2015, 03:48:55 PM

Yes of course. My parenthesis remark is only to explain why there's more than one pair execve(sh),execve(true). Of course, waiting for one block and actually being there to stop bitcoind will result in only one block Smiley. It's only, I was doing other stuff and forgot about bitcoind so several blocks were added to the chain in the meanwhile.

Sorry for my slowness.  Is there anything else that I'm not reading correctly?  What part of my output is unexpected, as compared to your output?

Thanks for hanging in here to help me out.


214  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 15, 2015, 01:40:41 AM

Yes, but the output keeps being unexpected. Look at mine (there are several blocks here, not only one):


Shortly after starting up bitcoind, I checked debug.log.  When I saw the runCommand error, I stopped bitcoind and ran grep.  Doesn't this explain why there is only one block in my mytrace files?  If I had let bitcoind run for a while before running grep, there would've been several more invocations of blocknotify and therefore several more occurrences of the runCommand error.  Doesn't this explain it?

215  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 15, 2015, 01:29:57 AM
Apparmor was mentioned.

Some info:
http://en.wikipedia.org/wiki/AppArmor
http://manpages.ubuntu.com/manpages/precise/en/man7/apparmor.7.html

I'm unfamiliar with apparmor, but I think these suggestions might make sense:

If you have root access, try disable or remove apparmor entirely. If block and wallet-notifications now triggers correctly, this was the culprint, and you might decide to have it uninstalled, or you might decide to have it installed but alter it's configuration to suit your needs. From what I understand from the docs, it gives access permissions on application level, rather than user level.

As for how to complete these steps, it's an exercise for you. Good luck.

Thanks for your suggestion.

Apparmor's profiles are supposed to be in the following directory.  A profile does not exist for bitcoind:

Code:
$ ls /etc/apparmor.d/
abstractions  disable       local      tunables       usr.sbin.ntpd usr.sbin.tcpdump
cache       force-complain  sbin.dhclient  usr.sbin.mysqld  usr.sbin.rsyslogd

Nevertheless, I tried stopping apparmor.  As per http://www.techytalk.info/disable-and-remove-apparmor-on-ubuntu-based-linux-distributions/ , I did the following:

Code:
$ sudo /etc/init.d/apparmor stop
 * Clearing AppArmor profiles cache
   ...done.
All profile caches have been cleared, but no profiles have been unloaded.
Unloading profiles will leave already running processes permanently
unconfined, which can lead to unexpected situations.

To set a process to complain mode, use the command line tool
'aa-complain'. To really tear down all profiles, run the init script
with the 'teardown' option."

But it didn't seem to stop when I checked the status:

Code:
$ sudo /etc/init.d/apparmor status
apparmor module is loaded.
6 profiles are loaded.
6 profiles are in enforce mode.
   /sbin/dhclient
   /usr/lib/NetworkManager/nm-dhcp-client.action
   /usr/lib/connman/scripts/dhclient-script
   /usr/sbin/mysqld
   /usr/sbin/ntpd
   /usr/sbin/tcpdump
0 profiles are in complain mode.
2 processes have profiles defined.
2 processes are in enforce mode.
   /usr/sbin/mysqld (837)
   /usr/sbin/ntpd (1604)
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.

So, as per https://help.ubuntu.com/lts/serverguide/apparmor.html , I tried the following to stop AppArmor:

Code:
$ sudo service apparmor stop
 * Clearing AppArmor profiles cache
   ...done.
All profile caches have been cleared, but no profiles have been unloaded.
Unloading profiles will leave already running processes permanently
unconfined, which can lead to unexpected situations.

To set a process to complain mode, use the command line tool
'aa-complain'. To really tear down all profiles, run the init script
with the 'teardown' option."
$ sudo update-rc.d -f apparmor remove
 Removing any system startup links for /etc/init.d/apparmor ...
   /etc/rcS.d/S37apparmor

When I checked apparmor status, I got the same as before.

I tried to set bitcoind to complain mode, but it didn't work:

Code:
$ sudo aa-complain /usr/local/bin/bitcoind
sudo: aa-complain: command not found
$

As per https://help.ubuntu.com/community/AppArmor , I did the following to disable AppArmor:

Code:
$ sudo invoke-rc.d apparmor stop
[sudo] password for stockbet:
 * Clearing AppArmor profiles cache
   ...done.
All profile caches have been cleared, but no profiles have been unloaded.
Unloading profiles will leave already running processes permanently
unconfined, which can lead to unexpected situations.

To set a process to complain mode, use the command line tool
'aa-complain'. To really tear down all profiles, run the init script
with the 'teardown' option."
$ sudo update-rc.d -f apparmor remove
 Removing any system startup links for /etc/init.d/apparmor ...

When I checked apparmor status, I got the same as before.

I stopped and started bitcoind:

Code:
$ bitcoind stop
Bitcoin server stopping
$ bitcoind -daemon
Bitcoin server starting
$

…but I still got the runCommand error in .bitcoin/debug.log:

Code:
2015-03-15 01:18:12 runCommand error: system(/bin/true) returned -1

I have bitcoind 0.9.0.  Do I need upgrade it?  I read that version 0.10.0 causes frozen blocks.

216  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 15, 2015, 12:12:31 AM
Hmm, nothing there. What if you 'grep execve' or maybe just 'grep exec'?

Is this what you are asking for?:

Code:
$ grep -C 2 exec mytrace.*
mytrace.5727:execve("/usr/local/bin/bitcoind", ["bitcoind"], [/* 13 vars */]) = 0
mytrace.5727-brk(0)                                  = 0x7fe2a93af000
mytrace.5727-access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
$
217  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 14, 2015, 04:03:50 PM
Ahem:

  • Stop bitcoind.
  • Configure it again to run /bin/true.
  • Run bitcoind with strace, eg. 'strace -o mytrace -s 99 -ff bitcoind &'. This assumes you usually run bitcoind by simply typing 'bitcoind'. If you run it some other way (for example './bitcoind' or '/path/to/bitcoind', substitute the "bitcoind" at the end accordingly. You may have to install strace first.
  • Wait for the next block. Find the error in the log.
  • Stop bitcoind.
  • Run bitcoind as usual (without strace) so you contribute to the network.
  • Examine the mytrace.* files you'll find in the current directory. A quick way is 'grep -C 2 bin/true mytrace*'. Post your findings/the output of the grep.
Here it is:

Code:
$ ls
bitcoin.conf    debug.log      mytrace.5729  mytrace.5741  mytrace.5746  mytrace.5751  peers.dat
debug.log.save     mytrace.5730      mytrace.5742  mytrace.5747  mytrace.5752  tempcron
blocks    debug.log.save.1  mytrace.5731  mytrace.5743  mytrace.5748  mytrace.5753
chainstate    mytrace.5727      mytrace.5732  mytrace.5744  mytrace.5749  mytrace.5754
db.log    mytrace.5728      mytrace.5733  mytrace.5745  mytrace.5750  mytrace.5773
$ grep -C 2 bin/true mytrace.*
mytrace.5773-rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
mytrace.5773-write(4, "2015-03-14 15:45:51 ", 20)    = 20
mytrace.5773:write(4, "runCommand error: system(/bin/true) returned -1\n", 48) = 48
mytrace.5773-madvise(0x7fe25effe000, 8368128, MADV_DONTNEED) = 0
mytrace.5773-_exit(0)                                = ?
$ bitcoind -daemon
Bitcoin server starting
$

I am still running bitcoind version 0.9.0.  Will this be a factor?  Do I need to upgrade to 0.10.0?

218  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 13, 2015, 07:27:20 PM

In this thread:
https://bitcointalk.org/index.php?topic=385146.msg4154179#msg4154179

there was an error elsewhere in the config file that was messing things up.  Perhaps this is a symptom of a different problem that is manifesting itself in an odd way?


Thanks for your suggestion.

Automatic had the following in his bitcoin.conf.  However, he stated that the notify commands randomly started working and randomly stopped working.

Code:
rpcuser=no.
rpcpassword=no.
maxconnections=1000
checklevel=4
keypool=10000
rpcallowip=127.0.0.1
server=1
blocknotify=/home/bitcoin/block.sh %s
walletnotify=/home/bitcoin/wallet.sh %s
alertnotify=/home/bitcoin/alert.sh %s

I tried the following configs in my bitcoin.conf:

Code:
rpcuser=XXXXXXXXXX
rpcpassword=XXXXXXXXXX
maxconnections=1000
checklevel=4
keypool=10000
rpcallowip=127.0.0.1
server=1
blocknotify=/bin/true
walletnotify=/bin/true
alertnotify=/bin/true

and

Code:
rpcuser=XXXXXXXXXX
rpcpassword=XXXXXXXXXX
blocknotify=/bin/true
walletnotify=/bin/true

After restarting bitcoind each time, I'm still getting the same error in .bitcoin/debug.log:

Code:
2015-03-13 18:45:17 runCommand error: system(/bin/true) returned -1

Any other suggestions that I can try?

219  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 13, 2015, 03:57:57 PM

That has nothing to do with the result of the program. The error means that bitcoin core is unable to run /bin/true and that's the problem you have to tackle.

Thanks for your help.  Do you have any ideas on what I can try next?

220  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 13, 2015, 12:56:49 AM

Code:

me@mine:~# /bin/true
me@mine:~# echo $?
0
me@mine:~# /bin/false
me@mine:~# echo $?
1
As dserrano5 said, it seems that "not even a simple /bin/true works."

Try what I have as code above.  Do you get something similar to the output above?


/bin/true and /bin/false are useful for testing your logic when needed since you always know the result.

I got the same output as you did:

Code:
$ /bin/true
$ echo $?
0
$ /bin/false
$ echo $?
1
$

I'm still getting the following in /home/username/.bitcoin/debug.log:

Code:
2015-03-13 00:41:32 runCommand error: system(/bin/true) returned -1
Pages: « 1 2 3 4 5 6 7 8 9 10 [11] 12 13 14 15 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!