Bitcoin Forum
September 30, 2022, 10:57:58 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 »
221  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 13, 2015, 12:49:19 AM

Interesting. So you had this working for a year, then it suddenly broke "a few months ago" (as per the OP) to the point that not even a simple /bin/true works. Are you using apparmor o something similar?

I just checked my system and I have it:

/etc/apparmo
/etc/appmor.d

However, I have never seen it anywhere before you mentioned it.  Should I try changing something in it?

222  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 12, 2015, 10:26:03 PM
You can try "blocknotify=/bin/true". Nothing should happen, not even an error in your log Wink.

Then copy /bin/true to your home. "blocknotify=/home/<your username>/true". Nothing should happen again, no errors either.

Another thing worth trying is "blocknotify=/bin/touch /tmp/foo" to weed out problems with spaces and that. After the next block /tmp/foo should exist, and of course no errors in the log.

Thanks for your suggestions.

I tried "blocknotify=/bin/true".  I got the following in /home/username/.bitcoin/debug.log:

Code:
2015-03-12 22:12:47 runCommand error: system(/bin/true) returned -1

What does this error mean?

I'm not exactly sure what you mean by "Then copy /bin/true to your home".  I assume that you simply want me to try "blocknotify=/home/<your username>/true".  I haven't tried this nor your suggestion with /tmp/foo, as I assumed that I'll get the runCommand error again.  Let me know if I should anyways or if there isn't else I can try.  Thanks.

223  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 12, 2015, 05:26:53 PM

If dserrano5's changes didn't create files in /tmp, that is odd unless there are permission problems there.

I got the following:

Code:
$ ls -ld /tmp
drwxrwxrwt 4 root root 4096 Mar 12 17:17 /tmp
$

Am I correct to assume that the permissions for /tmp are fine?

Do I need to change something in ~/myscript.sh in order to enable it to write to /tmp ?

224  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 12, 2015, 12:15:16 AM

Try the curl command on one line, then the echo command on a second line as it was in grue's example.  

It appears from the above that you did it all on one line.

Thanks for your keen observation.  I indeed entered both commands on one line.  Here's what I got now:

Code:
$ curl https://mydomain.com/blocknotify.php/?blockhash=1
$ echo $?
0
$

What does the 0 mean?  Should I try putting back the following into bitcoin.conf?:

Code:
blocknotify=curl https://mydomain.com/blocknotify.php/?blockhash=%s
225  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 12, 2015, 12:00:16 AM
Code:
cat >~/myscript.sh <<EOF
#!/bin/bash
echo hi there, starting >/tmp/log
curl https://mydomain.com/blocknotify.php/?blockhash=42 >>/tmp/log 2>>/tmp/err
echo exit code is $? >>/tmp/log
EOF
$ chmod +x myscript.sh

Then "blocknotify=/home/<your user>/myscript.sh" in bitcoin.conf. After the next block, take a look to /tmp/log and /tmp/err.

Next step: feed the 42 from the "blocknotify=" line, use $@ in the script. Next step: call curl directly with no wrapper.

Thanks for your suggestions.  I created myscript.sh and changed bitcoin.conf as per your suggestions.  Then I did this:

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

$ bitcoind getinfo
{
    "version" : 90000,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : X.XXXXXX,
    "blocks" : 347231,
    "timeoffset" : 0,
    "connections" : 8,
    "proxy" : "",
    "difficulty" : 47427554950.64830017,
    "testnet" : false,
    "keypoololdest" : 1396812248,
    "keypoolsize" : 84,
    "paytxfee" : 0.00000000,
    "unlocked_until" : 0,
    "errors" : ""
}

When I noticed that "blocks" (from bitcoind getinfo) increased, I checked the /tmp folder.  But this folder only had cookies.txt, but log and err do not exist.

I checked /home/myusername/.bitcoin/debug.log and saw this:

Code:
23:35:05 runCommand error: system(/home/myusername/myscript.sh) returned -1

Is it possible that there is something wrong in myscript.sh that is causing the runCommand error?

When you say "call curl directly with no wrapper", are you saying to call curl directly from bitcoin.conf without using myscript.sh?
226  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 11, 2015, 09:07:21 PM
Yes, I have SSH.  Sorry, I didn't understand what you meant.  I tried your suggestion and I can tell that it executed my PHP program, as I have code in it that sends me an email.  However, SSH outputted the following:

$ curl https://mydomain.com/blocknotify.php/?blockhash=1 echo $?
curl: (6) Couldn't resolve host 'echo'
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://0/">here</a>.</p>
</body></html>
$

I don't know what that output means.  Do you?  Does this mean everything went as planned?
227  Bitcoin / Bitcoin Technical Support / Re: debug.log runCommand error on: March 11, 2015, 06:16:56 PM
does it run successfully in in shell? as in, run the command, then do "echo $?" to check the return status.

Are you referring to this?:

Code:
https://mydomain.com/blocknotify.php/?blockhash=00000000000000000dd3c33eaf1a2746ebe841418b98cb15f4a0bb71f3330d5e

If so, then yes, that program executes when I invoke it from a browser.

If you are suggesting that I add the following command in bitcoin.conf:

Code:
blocknotify=/home/bitcoin/block.sh %s

...then that means I need to create a shell file.  If you are suggesting that I have "echo $?" in the shell file, then I'm not sure how I would see the output.  Doesn't the echo output go to the screen?  If the shell program is running on the server, how do I see the output?




228  Bitcoin / Bitcoin Technical Support / debug.log runCommand error on: March 11, 2015, 05:08:36 PM
I have used the following successfully in bitcoin.conf for about a year:

Code:
walletnotify=curl https://mydomain.com/walletnotify.php/?tanshash=%s
blocknotify=curl https://mydomain.com/blocknotify.php/?blockhash=%s

They seemed to stop working a few months ago.  The following is in debug.log:

Code:
2015-03-11 14:05:53 runCommand error: system(curl https://mydomain.com/blocknotify.php/?blockhash=00000000000000000dd3c33eaf1a2746ebe841418b98cb15f4a0bb71f3330d5e) returned -1

I changed my code in bitcoin.conf to this:

Code:
blocknotify=/usr/bin/php /home/mydomain/public_html/blocknotify.php %s

But I'm still getting the same error:

Code:
2015-03-11 16:28:57 runCommand error: system(/usr/bin/php /home/mydomain/public_html/blocknotify.php 000000000000000015a51b99f54a611b2a88c096d1091e13933346431c17b2be) returned -1

Can anyone tell me what "runCommand error: ... returned -1" means and how to fix this?

229  Bitcoin / Bitcoin Technical Support / Re: bitcoin-qt huge blocks file on: September 27, 2014, 04:07:04 PM
The blockchain is now over 25 GB.  This seems crazy.

I need to run bitcoin on a Linux server in order to process transactions, but I have to increase the size of my server from my hosting company, just because the blockchain keeps growing.  This means over time, I will have to continue to pay more for hosting.

Isn't there any way that the core team can re-architect the blockchain so that only the most recent 10-20% of blocks need to be stored, and enable us to delete the oldest 80-90% of blocks?
230  Economy / Service Announcements / Re: [ANN] MooCoin - Play for a Bit | Faucet | Skill-based gaming | Referral network on: May 21, 2014, 06:27:13 PM
Your site is no longer up.  Have you shut it down or has it been hacked?
231  Bitcoin / Development & Technical Discussion / Re: bitcoind 0.8.4 memory leak causing crash quite often on: April 01, 2014, 02:37:28 AM
I am not sure why I am the only one seeing this problem. Its fresh installation, so if I am seeing this error others should also face similar issues. Whats wrong with it!!!

 Huh Huh Huh

I have essentially the same problem that you have.  I have the same output from "uname -a", "file /path/to/bitcoind", "ulimit -a", etc.  The only difference from you is that I'm running bitcoind 0.9.0.

After I start bitcoind, I can see in "top" that its memory usage just keeps rising.  My bitcoind crashes all the time and within less than 30 minutes.  I have the following in bitcoin.conf to limit the connections, but they have no effect on slowing or stopping the crashes:
Code:
connections=1
maxconnections=1

I was thinking of adding memory to the server, but what's the point if we don't know the maximum amount of memory that bitcoind will use?

I tried the following to limit the amount of memory and virtual memory, but this only causes bitcoind to crash faster (because bitcoind hits its limit faster?).

Code:
ulimit -m 500000 -v 1000000

There must be lots of other people having this problem.  Did you ever find the fix?

Edit:  I think I found the solution.  I added swap file and used the following:

Code:
ulimit -m 200000 -v 1000000

So far, so good.

Does anyone know how much physical RAM and swap file the server should have for running bitcoind 0.9.0, and what the "ulimit -m -v", "connections" and "maxconnections" settings should be?
232  Bitcoin / Bitcoin Technical Support / Re: Cannot stop bitcoind 0.9.0 on: March 23, 2014, 05:25:37 PM
I had bitcoind 0.8.6, so I had already downloaded the blockchain.  Is it possible that when I started using bitcoind 0.9.0, something was incompatible from 0.8.6?

I just rebooted and bitcoind is still showing on "top".

In the past, I have rebooted without stopping bitcoind first.  Does this corrupt the database?  Can this be the reason that I cannot stop it now?

I just tried the following:

$ bitcoin-cli stop

and now it seems to have stopped.  bitcoind is no longer showing on "top".

I just tried the following:

$ bitcoind
Bitcoin server starting
$ bitcoind stop
Bitcoin server stopping


...and bitcoind is not showing on "top".


233  Bitcoin / Bitcoin Technical Support / Cannot stop bitcoind 0.9.0 on: March 23, 2014, 03:07:40 PM
I installed and started bitcoind 0.9.0 64 bit on Linux.  I ran the following on Linxu:

$ sudo bitcoind stop
Bitcoin server stopping


When I run:

$ pstree

bitcoind is no longer showing.  However, when I run:

$ top

bitcoind is still running, using between 140 to 150 MB of RAM.

I ran "sudo bitcoind stop" a couple of times, but bitcoind still shows up on "top".  I don't want to "kill" the process because I read that this might corrupt the database.

When I run the following:

$ bitcoind -daemon

I get the following, which seems to confirm that bitcoind is still running:

: Cannot obtain a lock on data directory /home/user/.bitcoin. Bitcoin is probably already running.

How do I stop bitcoind?

(When bitcoind was running before I tried to stop it, it was using 550 to 680 MB of RAM.  Is this normal?)


234  Economy / Trading Discussion / Re: betco.in's a ghost town now? on: March 07, 2014, 06:01:52 PM
So finally funds started moving. Most likely because of high price. http://blockchain.info/tx/21ac34ced0f55701b38a3f8e02b9d2b8451db2f0071cd5c761a857d1ac0a78df

Is there any update on this theft?

Were you able to find out how the thieve hacked into your home laptop and desktop?

If the thieve hacked into your home computers, how did the thieve steal your coins?  Was your wallet.dat file encrypted or unencrypted?  If encrypted, did the thieve log your keys?

One of the biggest problems with Bitcoin is the rampant stealing that is going on.  Why would any business want to accept Bitcoin when it is so easy to steal?  Hence, Bitcoin is not getting widespread adoption.  If victims provide more information about how they were victimized, maybe Bitcoin can be made more secure.
235  Bitcoin / Bitcoin Technical Support / Re: bitcoind won't run on Ubuntu Server 10.04 on: February 11, 2014, 05:40:54 AM
Try
Code:
ls -l bitcoind

and

Code:
file bitcoind


I'm having the same problem, but my ubuntu Linux is 32 bit.  I'm getting the following:

Code:
ldd bitcoind
ldd: ./bitcoind: No such file or directory

ls -l bitcoind
ls: cannot access bitcoind: No such file or directory

file bitcoind
bitcoind:  ERROR: cannot open `bitcoind' (no such file or directory)

I installed bitcoin with:

Code:
$ sudo apt-get install bitcoind

It outputted several lines, with the last one being:

Code:
ldconfig deferred processing now taking place

I don't know what the above means.

I have the following files in my home/user/.bitcoin folder:

addr.dat      blk0001.dat     database   __db.002   __db.004   __db.006     db.log       wallet.dat
bitcoin.conf  blkindex.dat    __db.001   __db.003   __db.005   DB.CONFIG  debug.log

Can anyone suggest on how I can run bitcoind?

236  Bitcoin / Development & Technical Discussion / Re: Separating web server and bitcoin server from a security POV on: February 10, 2014, 07:33:34 PM
I don't see how my post in that thread could be misunderstood, or mislabed as FUD. Or why it's being brought up here, as BIP32 specs have nothing to do with how you set up your server?

Sorry, it if came across as insulting.  It wasn't mean that way.  I was replying to Sukrim's suggestion of using BIP32 for my server.  You wrote:  "People would freak if they had sent coins to an address derived from these scripts but the key wouldn't import in a client eventually....If your code/bytes get implemented elsewhere the problem would be widespread, and cause a lot of fuss for those people."  To me, this did not come across as a big endorsement of BIP32.  Also, because I didn't understand the technical details of your comment and the other postings on that thread and because of comments as such as "The testnet version strings are problematic..." and "...it's awfully ambiguous.", I felt FUD about BIP32.
237  Economy / Service Discussion / Re: Is bitcoinmonitor.net reliable? on: February 10, 2014, 06:58:47 PM
blockchain.info watch-only wallet with notifications enabled

I need to enable my users to send and withdraw bitcoins (more info:  https://bitcointalk.org/index.php?topic=457629.msg5047724#msg5047724)

I looked around blockchain.info (https://blockchain.info/wallet/wallet-faq) to see how it can be a solution.  I do not see how my web app can get a new address from Blockchain's My Wallet, such as an API, in order to show the new address to my user.  It does not seem that Blockchain can notify my web app via a callback URL (https://blockchain.info/wallet/payment-notifications)

When my user wants to withdraw, he will give my his address to my web app.  How do I insert this address into my blockchain wallet?

Am I missing this information somewhere from Blockchain's website?
238  Bitcoin / Project Development / Re: [ANN] bip32.org - JavaScript BIP32 deterministic wallet generator on: February 10, 2014, 06:30:10 PM
BIP32 is likely not the relevant standard if you want users to send and withdraw bitcoin. Also that post is from 2011 and the approach may no longer be best.

Thanks for your input.  Which standard do you think is relevant and which approach do you think is the best?  Please see my post at https://bitcointalk.org/index.php?topic=457629.msg5047724#msg5047724
239  Bitcoin / Development & Technical Discussion / Re: Separating web server and bitcoin server from a security POV on: February 10, 2014, 05:49:24 PM
BIP32 for generating addresses...

Thanks for your suggestion.  I read https://bitcointalk.org/index.php?topic=406386.0, and it sounds complicated and confusing.  User "fbueller" spread FUD (Fear Uncertainty and Doubt) and I don't even understand fbueller's comment nor most of the comments.  It seems like it can take a long time just to figure out if this is the right approach, no?

Even if I'm able to figure out BIP32, is there a service like Blockchainfo or Blockexplorer that works with testnet addresses?

FYI, I think Bitcoin adoption would be much more widespread if it wasn't so complicated and insecure, which adds to the complexity:  http://www.ideaexcursion.com/2013/09/18/developing-against-bitcoind/
240  Bitcoin / Project Development / Re: [ANN] bip32.org - JavaScript BIP32 deterministic wallet generator on: February 10, 2014, 05:44:06 PM

How do I use it?

Simple. Type in a passphrase into the "Passphrase" box and tweak the value in "Keypair index".  The generated keys are shown at the bottom of the page, along with a Bitcoin address you can send coins to.  

In order to spend, copy the "Derived private key", change the button at the top of the page to "BIP32 Key" and paste in the key you just copied.  Now copy the "Key" in the Key Info section.  This is the Bitcoin private key, and it can be used to spend by using the transaction generator at http://brainwallet.org/

Where is the "Keypair index"?  You wrote: "...paste in the key you just copied."  Paste it where?  Most of the fields cannot be pasted into.

More advanced users can use the site to do the following things:

It seems that this is already for more advanced users.

I just want to enable my users to send and withdraw bitcoin.  I'm trying to see if the approach suggested by just_someguy at https://bitcointalk.org/index.php?topic=22368.msg5058875#msg5058875 is the way to go.  I've already spent 2 months to see if I can integrate Bitcoin to my web app.  Do I need to understand cryptography, Depth, Parent Fingerprint, Child Index, Chain Code, Derivation Path, Derived Private Key, Private Key (WIF), Derived Public Key, Public Key (Hex), XXpv/XXub, base58_decode, magic bytes, encode, DOGE, Ltpv, Ltub, dgpv, dgub, etc. in order to do so?
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!