stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 668 forks source link

btcd.onename.com working? #82

Closed denisnazarov closed 9 years ago

denisnazarov commented 9 years ago

Trying to experiment with blockstore.

Using default bitcoind server at btcd.onename.com
ERROR: Cannot connect to bitcoind
muneeb-ali commented 9 years ago

Just checked the status of btcd.onename.com (it's a AWS load-balancer with a fleet of bitcoind nodes behind it) and the status is normal. Also, tried connecting and


Using default bitcoind server at btcd.onename.com Creating initial index ...

Processing block 345014

Maybe your call to btcd.onename.com timed out for some reason?

muneeb-ali commented 9 years ago

P.S: It's going to take a long time to build the initial index. Which is what we want to address in #69 and is the top thing on our list right now in terms of blockstore development.

denisnazarov commented 9 years ago

Tried it a few times, assuming it is timing out, any way to enable verbose logs?

muneeb-ali commented 9 years ago

blockstored start --foreground

Could it be some firewall / VPN issue? My AWS monitoring is showing no issues, which is strange.

leebow commented 9 years ago

Experiencing the same issue when trying to start blockstore (this is after building image with Docker on AWS instance):

Do you have your own bitcoind server? (yes/no): no
Using default bitcoind server at btcd.onename.com
ERROR: Cannot connect to bitcoind
muneeb-ali commented 9 years ago

Looking into it. I just realized that my VPN is on AWS, so it's possible that it's working for me (since that is internal AWS traffic) and is not working for outside world because of some network issue. I'll update this Github issue with what I find and redirect traffic to some other server if AWS is experiencing some network issue.

muneeb-ali commented 9 years ago

I can confirm that I monitored btcd.onename.com for many hours and can't reproduce the issues you guys are having. Also, I can confirm that:

-- The individual bitcoind nodes (behind the loadbalancer) are working fine. Their status was normal on the loadbalancer and I also checked them manually. -- The loadbalancer itself is operating without any issues. -- I can reach btcd.onename.com with telnet etc (both when I'm on my VPN and from outside) -- Blockstore is working fine for me (both from my VPN and from outside)

Would appreciate any help in trying to reproduce this issue.

leebow commented 9 years ago

Here's the steps I took to start blockstore:

Also installed and ran nmap from the Docker container:

Starting Nmap 6.47 ( http://nmap.org ) at 2015-04-19 11:05 UTC
Nmap scan report for btcd.onename.com (54.209.247.207)
Host is up (0.079s latency).
Other addresses for btcd.onename.com (not scanned): 107.23.42.197
PORT     STATE SERVICE
8332/tcp open  unknown

So there is connectivity from my Docker container. Is it possible that the default username and password for bitcoind have changed?

muneeb-ali commented 9 years ago

I wasn't using that Dockerfile and was simply installing via pip. Let me test it using the steps you outlined.

muneeb-ali commented 9 years ago

Nope, can't reproduce this. Here are the step I tried:

sudo docker run -it ubuntu bin/bash

  • Install packages:

sudo apt-get -y update && apt-get -y install python-pip python-dev build-essential

  • Install blockstore:

pip install blockstore

  • Start blockstore:

blockstored start --foreground

I didn't enter anything for the chain.com API (just hit enter). And said "no" to the prompt about "do you have your own bitcoind server". This is the output I got:

Initializing blockstored server in foreground ...

NOTE: Blockstore currently requires API access to chain.com for getting unspent outputs. We will add support for using

bitcoind and/or other API providers in the next release.

Enter chain.com API Key ID: Enter chain.com API Key Secret: Do you have your own bitcoind server? (yes/no): no Using default bitcoind server at btcd.onename.com Creating initial index ... Processing block 343883 block_nameops [] Processing block 343884 block_nameops [] Processing block 343885

Works perfectly fine for me. Can you try the above steps?

jcnelson commented 9 years ago

In the process of testing an HAProxy load balancer instead...

muneeb-ali commented 9 years ago

Yeah and would be awesome if you guys can test it out once that is done. CC: @denisnazarov @ig-grant

jcnelson commented 9 years ago

We're now running an HAProxy load balancer at 54.237.72.244, in front of three bitcoind peers (we haven't added a DNS record for it yet, since we are still testing). @denisnazarov @ig-grant feel free to give it a try!

muneeb-ali commented 9 years ago

Awesome! I'm going to give it a spin right now.

leebow commented 9 years ago

This is great, thanks!

I've also managed to solve my original problem with installing/running blockstore on Ubuntu using Docker. See working Dockerfile below.

FROM ubuntu:14.04

RUN apt-get -y update && apt-get -y install python2.7 python-pip python-setuptools python-dev git-core build-essential
RUN pip install blockstore

CMD blockstored start --foreground
muneeb-ali commented 9 years ago

Awesome. Want to submit it as a pull request?

https://github.com/namesystem/blockstore/blob/master/images/Dockerfile is what we have right now

jcnelson commented 9 years ago

btcd.onename.com has since been moved over to our new load-balancer. We have found it to be considerably faster and more reliable than Amazon's, which is what we were using back in May.

I'm closing this issue for lack of activity. If you encounter this problem again, please let us know!

-Jude

blockstack-devops commented 6 days ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.