Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[p2p_sync] Error in handle Block: [object Object] #24

Closed
olalonde opened this issue Mar 19, 2014 · 4 comments
Closed

[p2p_sync] Error in handle Block: [object Object] #24

olalonde opened this issue Mar 19, 2014 · 4 comments

Comments

@olalonde
Copy link
Contributor

I've got a bunch of those errors:

info: socket.io started
insight server listening on port 3000 in production mode
{ '0': [Error: Could not connect to bitcoin via RPC: connect ECONNREFUSED] }
[historic_sync] ERROR: Could not connect to bitcoin via RPC: connect ECONNREFUSED
{ '0': 'connecting to 127.0.0.1:8333' }
{ '0': 'connected to 127.0.0.1:8333' }
[p2p_sync] Connected to 1 peer

(some more logs here)

[p2p_sync] Handle block: 0000000002274dde8f09a85f7359478c61d81797506a2d1ab63e8760edafb686 (allowReorgs: false)

[p2p_sync] Error in handle Block: [object Object]
[p2p_sync] Error in handle Block: [object Object]
[p2p_sync] Error in handle Block: [object Object]
[p2p_sync] Error in handle Block: [object Object]
(lots of this)

Note that I believe my bitcoind is still not done downloading the blockchain. Is that the issue? If it is, is there any way to programmatically wait for the blockchain to be done before launching insight.js (I'm trying to build a Dockerfile)?

I'm launching insight with this script:

bitcoind -datadir='/data/bitcoin' -daemon
cd /opt/insight-api/
export INSIGHT_NETWORK="livenet"
export NODE_ENV="production"
export BITCOIND_DATADIR="/data/bitcoin"
node insight.js

and I copied /opt/insight-api/etc/bitcoind/bitcoin-livenet.conf to /data/bitcoin/bitcoin.conf.

http://192.168.1.101:3000/api/sync returns:

{
"status": "error",
"syncPercentage": "NaN",
"error": "Could not connect to bitcoin via RPC: connect ECONNREFUSED"
}

http://192.168.1.101:3000/api/peer returns:

{
"connected": true,
"host": "127.0.0.1",
"port": "8333"
}
@olalonde
Copy link
Contributor Author

Ok, seems I fixed above problem by launching bitcoin with this command:

bitcoind -datadir='/data/bitcoin' -daemon -rpcallowip="*"

That being said I'm still getting an error:

   info  - socket.io started
insight server listening on port 3000 in production mode
[historic_sync] ERROR: Method not found
{ '0': 'connecting to 127.0.0.1:8333' }
{ '0': 'disconnected from peer 127.0.0.1:8333' }
{ '0': 'connecting to 127.0.0.1:8333' }

@matiu
Copy link
Collaborator

matiu commented Mar 20, 2014

Yes. You need to wait until bitcoind finish downloading the blockchain. —
Sent from Mailbox for iPhone

On Wed, Mar 19, 2014 at 8:57 PM, Olivier Lalonde notifications@github.com
wrote:

I've got a bunch of those errors:

[p2p_sync] Handle block: 0000000002274dde8f09a85f7359478c61d81797506a2d1ab63e8760edafb686 (allowReorgs: false)
[p2p_sync] Error in handle Block: [object Object]
[p2p_sync] Error in handle Block: [object Object]
[p2p_sync] Error in handle Block: [object Object]
[p2p_sync] Error in handle Block: [object Object]

Note that I believe my bitcoind is still not done downloading the blockchain. Is that the issue? If it is, is there any way to programmatically wait for the blockchain to be done before launching insight.js (I'm trying to build a Dockerfile)?

Reply to this email directly or view it on GitHub:
#24

@olalonde
Copy link
Contributor Author

Ok, seems I'm no longer getting the [p2p_sync] Error in handle Block: [object Object] error but I'm still getting [historic_sync] ERROR: Method not found and all addresses I tried to look up on the API show up as "txApperances": 0 and 0 balance.

@olalonde
Copy link
Contributor Author

I will create a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants