Stacks testnet loading

i am trying to setup my own stacks testnet as mentioned in githup repo of blockstack-core at

https://github.com/blockstack/blockstack-core/tree/master/testnet

blockstack-public-testnet.sh is running there are no any errors in testnet.log

in browser it shows only loading as in screenshot below

I am also attaching testnet.log file

testnet.log.zip (30.8 KB)

It looks like your Web server is blocking requests from the testnet status page, and moreover, it looks like all ports besides port 80 are blocked on that host. First, you’ll need to configure your webserver as follows (this is pulled from a working Nginx config):

upstream testFramework {
  server localhost:30001;
}

server {

  index index.html index.htm;
  root /var/www/html;

  location ~ \.(html|css|js|log) {
    try_files $uri $uri/ =404;
  }

  location = / {
    try_files $uri $uri/ =404;
  }

  location / {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;
    proxy_pass http://testFramework;
  }
}

You’ll also need to open all the same ports you’ll see on the public testnet:

  • TCP 4000
  • TCP 4001
  • TCP 16269
  • TCP 30000
  • TCP 18332
  • TCP 18444

Those all ports are already opened and I am also able call Bitcoin service with Bitcoin-cli but I am not able to use it with frontend
What else can be done?

I can’t reach any of those ports on your host – I get ECONNREFUSED.

If I try to curl any paths (i.e. GET /config), I get a 404.

Please confirm that the testnet code is running. To help diagnose the problem, it would be helpful for you if you monitored the network requests on the page in your browser’s console. The web page issues GETs to the testnet Web server, and the Web server needs to proxy those requests back to the testnet process. I think you’re using Apache? If so, you’ll need to configure Apache to act as a proxy to the testnet process (i.e. as indicated by the nginx config I posted).

Thanks @jude when you are trying to connect i have stopped my script. But i ran script again and configured proxy to 30001 in apache and it’s working thanks.

hey @jude
my local testnet is running
I am able add BTC
but having error while adding STACKS

Traceback (most recent call last):
 File "/usr/local/lib/python2.7/dist-packages/blockstack_integration_tests-20.0.0.0-py2.7.egg/blockstack_integration_tests/scenarios/testnet_public.py", line 307, in do_POST
   res = testlib.blockstack_send_tokens(addr, 'STACKS', value, wallets[3].privkey)
 File "/usr/local/lib/python2.7/dist-packages/blockstack_integration_tests-20.0.0.0-py2.7.egg/blockstack_integration_tests/scenarios/testlib.py", line 901, in blockstack_send_tokens
   stacks_recipient_address = res['testnet']['STACKS']
KeyError: 'testnet' (edited)  

how can i solve this error ?

Can you confirm that blockstack-cli is installed and runnable on your system? The error happened while trying to parse the output of a command like this:

$ blockstack-cli convert_address 17GWJ5tcDsXHBBgNVgaEU6dqbvqi78xiyB

This should print out:

{
  "mainnet": {
    "STACKS": "SP12BYWNFQYD1Q4YX1BM9NFBKQM4655GKNGVY2XW1",
    "BTC": "17GWJ5tcDsXHBBgNVgaEU6dqbvqi78xiyB"
  },
  "testnet": {
    "STACKS": "ST12BYWNFQYD1Q4YX1BM9NFBKQM4655GKNGW0ACW0",
    "BTC": "mmnTb8yb2txXxJ9zDFYcJ1rATvSQxttFus"
  }
}