guardian-mainnet-guide icon indicating copy to clipboard operation
guardian-mainnet-guide copied to clipboard

Failed to get blockchain status - Guardian Node

Open Dr-StephenStrange opened this issue 4 years ago • 27 comments

Followed the guide to run a guardian node on Google Cloud Marketplace.

When entering command thetacli query status

Get the following: Failed to get blockchain status: Post http://localhost:16888/rpc: dial tcp 127.0.0.1:16888: connect: connection refused

Why is this happening?

Dr-StephenStrange avatar Jan 08 '21 13:01 Dr-StephenStrange

Thought I'd comment on this, after an hour I finally got a proper response.

But every now and again when I enter thetacli query status I get the same error.

Is my node not connecting to the blockchain correctly or something?

I used the official VM image

Dr-StephenStrange avatar Jan 08 '21 14:01 Dr-StephenStrange

eu-west-2 region seems to be working, it's still trying to sync, will update when done

Dr-StephenStrange avatar Jan 08 '21 16:01 Dr-StephenStrange

The query command works.

But it's been 36 hours and it's still syncing. Is that normal?

Dr-StephenStrange avatar Jan 10 '21 02:01 Dr-StephenStrange

The query commands only work after the snapshot is loaded, typically after 5-6 minutes.

On the marketplace node, please upgrade the theta and thetacli binary to the latest, delete the db folder and the snapshot file under the config folder, and restart the node:

killall -9 theta
wget -O `which theta` `curl -k 'https://mainnet-data.thetatoken.org/binary?os=linux&name=theta'`
wget -O `which thetacli` `curl -k 'https://mainnet-data.thetatoken.org/binary?os=linux&name=thetacli'`
rm -rf /theta/db
wget -O /theta/snapshot `curl -k https://mainnet-data.thetatoken.org/snapshot`
wget -O /theta/config.yaml `curl -k 'https://mainnet-data.thetatoken.org/config?is_guardian=true
python3 /bin/theta_launcher.py /theta/ qwertyuiop

Or you can run the node on a Linux/Ubuntu box: https://docs.thetatoken.org/docs/running-a-guardian-node-through-command-line

Thanks!

jieyilong avatar Jan 10 '21 05:01 jieyilong

Or you can run the node on a Linux/Ubuntu box: https://docs.thetatoken.org/docs/running-a-guardian-node-through-command-line

I'm having better luck following this

I'll update if I can sync and stake theta

Thanks!

Dr-StephenStrange avatar Jan 10 '21 15:01 Dr-StephenStrange

I've tried running a guardian node through the command line on a Ubuntu Server hosted on Google Cloud. It's been trying to sync for over 2 hours now

Dr-StephenStrange avatar Jan 14 '21 12:01 Dr-StephenStrange

I'm not sure what I'm doing wrong, the official google cloud image for the theta guardian doesn't seem to work for me

Dr-StephenStrange avatar Jan 14 '21 12:01 Dr-StephenStrange

Ok I'll send a message, thanks

Dr-StephenStrange avatar Jan 14 '21 12:01 Dr-StephenStrange

I got scammed by shaun-19826

Dr-StephenStrange avatar Jan 17 '21 00:01 Dr-StephenStrange

Do not trust him, he stole 1000 theta from me

Dr-StephenStrange avatar Jan 17 '21 00:01 Dr-StephenStrange

Having the same issue. Followed all the steps from https://github.com/thetatoken/guardian-mainnet-guide/blob/master/docs/CLI.md#running-a-guardian-node-through-command-line

I can see the node is syncing (or at least I think it is) as my screen is flooded with:

INFO[0849] Commit to data store, height: 8950109, rootHash: 0x74e2f759a73a0abc026d360de49bafde2a1c78ff2c3c5af4aa0972a368f6d8db prefix=ledger

but, if I open another session to query, i get this: ./thetacli query status Failed to get blockchain status: Post http://localhost:16888/rpc: dial tcp 127.0.0.1:16888: connect: connection refused

RedPlumpTomato avatar Jan 23 '21 21:01 RedPlumpTomato

Having the same issue - do I need to explicitly open up a port? Running Ubuntu 20.04.1 LTS - I don't have UFW running, I have a few ports open for other things which I can list with nmap localhost. Shouldn't have to open a port as I'm checking from within the same session on the same server...

Failed to get blockchain status: Post http://localhost:16888/rpc: dial tcp [::1]:16888: connect: connection refused

Feel like I've missed something simple...

skippa avatar Jan 27 '21 07:01 skippa

I'm using the following commands (on my Ubuntu 20.04 LTS Terminal):

  1. Navigate to TGN directory: cd ~/theta_mainnet cd bin/

  2. Launch TGN ./theta start --config=../guardian_mainnet/node

  3. To check status: In fresh Terminal: ./thetacli query status

All seems to be working fine except still syncing after 24 hours - even though I have synced before - had to reboot my pc.

Duncan

Douglas1949 avatar Jan 27 '21 08:01 Douglas1949

On another tack: Can any of you guys advise as to how I can find the "Holder Summary" of the Guardian Node - to use for staking purposes (my Theta Wallet asks for it when trying to stake). Many thanks, Duncan

Douglas1949 avatar Jan 27 '21 08:01 Douglas1949

Ah, turned out it just needed time. Query works and we're all sync'd up. I'm pretty new to theta staking so can't help you on the Holder Summary mate ;)

skippa avatar Jan 27 '21 09:01 skippa

Thanks skippa - perhaps some other kind soul might be able to. ;)

Douglas1949 avatar Jan 27 '21 09:01 Douglas1949

From the https://www.thetatoken.org/docs/Running-a-Guardian-Node-on-the-Google-Cloud-Marketplace.pdf you can see it says run 'thetacli query guardian' to get the summary. You can then use that summary code in the box in your Theta wallet app under the staking menu, with 1000 Theta tokens being the minimum stake.

On Wed, Jan 27, 2021, at 8:39 PM, Douglas1949 wrote:

Thanks skippa - perhaps some other kind soul might be able to. ;)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/thetatoken/guardian-mainnet-guide/issues/40#issuecomment-768161048, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR6L3MBJN3R6V54NYO43Z4DS37NLXANCNFSM4V2OPTRA.

rwhwr avatar Jan 27 '21 09:01 rwhwr

Many thanks 👍

On Wed, 27 Jan 2021, 09:50 rwhwr, [email protected] wrote:

From the https://www.thetatoken.org/docs/Running-a-Guardian-Node-on-the-Google-Cloud-Marketplace.pdf you can see it says run 'thetacli query guardian' to get the summary. You can then use that summary code in the box in your Theta wallet app under the staking menu, with 1000 Theta tokens being the minimum stake.

On Wed, Jan 27, 2021, at 8:39 PM, Douglas1949 wrote:

Thanks skippa - perhaps some other kind soul might be able to. ;)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/thetatoken/guardian-mainnet-guide/issues/40#issuecomment-768161048>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AR6L3MBJN3R6V54NYO43Z4DS37NLXANCNFSM4V2OPTRA .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thetatoken/guardian-mainnet-guide/issues/40#issuecomment-768167402, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACMAIC5W4MQTPIRNAKOENHLS37OVRANCNFSM4V2OPTRA .

Douglas1949 avatar Jan 27 '21 11:01 Douglas1949

eu-west-2 region seems to be working, it's still trying to sync, will update when done

I have also deployed the standard build for guardian node from google cloud marketplace. I've been syncing for 8 hours now and something doesn't seem right. Have you gotten to the bottom of what needs to be done to sync the guardian from google cloud vm...

texmason avatar Feb 02 '21 23:02 texmason

I've been syncing for 4 days !

On Tue, 2 Feb 2021, 23:08 texmason, [email protected] wrote:

eu-west-2 region seems to be working, it's still trying to sync, will update when done

I have also deployed the standard build for guardian node from google cloud marketplace. I've been syncing for 8 hours now and something doesn't seem right. Have you gotten to the bottom of what needs to be done to sync the guardian from google cloud vm...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thetatoken/guardian-mainnet-guide/issues/40#issuecomment-772077363, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACMAIC4SOC7FTG2MUU7INI3S5CAVPANCNFSM4V2OPTRA .

Douglas1949 avatar Feb 03 '21 05:02 Douglas1949

The query commands only work after the snapshot is loaded, typically after 5-6 minutes.

On the marketplace node, please upgrade the theta and thetacli binary to the latest, delete the db folder and the snapshot file under the config folder, and restart the node:

killall -9 theta
wget -O `which theta` `curl -k 'https://mainnet-data.thetatoken.org/binary?os=linux&name=theta'`
wget -O `which thetacli` `curl -k 'https://mainnet-data.thetatoken.org/binary?os=linux&name=thetacli'`
rm -rf /theta/db
wget -O /theta/snapshot `curl -k https://mainnet-data.thetatoken.org/snapshot`
wget -O /theta/config.yaml `curl -k 'https://mainnet-data.thetatoken.org/config?is_guardian=true
python3 /bin/theta_launcher.py /theta/ qwertyuiop

Or you can run the node on a Linux/Ubuntu box: https://docs.thetatoken.org/docs/running-a-guardian-node-through-command-line

Thanks!

Trying to upgrade Theta and Thetacli getting Access denied error. Running Google-Guardian node

Thank you for your help

texmason avatar Feb 11 '21 02:02 texmason

i too am getting this issue: Failed to get blockchain status: Post http://localhost:16888/rpc: dial tcp 127.0.0.1:16888: connect: connection refused

been 4 days now.... using Ubuntu 20.04 Server, followed the CLI instructions exactly. I was working previously until about 4 days ago. ive tried wiping files and reinstalling, still no luck. If anyone has a solution please let me know! thanks

phyx1u5 avatar Feb 13 '21 17:02 phyx1u5

alright my node came right, i basiclly ran the cli setup again after deleting my db folder. and after a while of syncing im back online.

phyx1u5 avatar Feb 14 '21 00:02 phyx1u5

@phyx1u5, now that you are syncing, were you successful in staking with the guardian node?

texmason avatar Feb 17 '21 21:02 texmason

I have a clean install of Debian Buster:

Linux web1 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux

Followed the steps from Running a guardian node through command line running in tmux.

I'm getting a continuous stream of logs on the guardian window that looks like this:

[2021-05-09 17:16:19] DEBUG [store] Persisted trie from memory databasenodes451size46.52 kBtime12.181015msgcnodes0gcsize0.00 Bgctime0slivenodes1livesize0.00 B
[2021-05-09 17:16:19] DEBUG [ledger] Commit to data store, height: 10275320, rootHash: 0x32a9c15bb61b228d80d608a0e4565222f9b2e8de7cf9954079e693207cde198b
[2021-05-09 17:16:19] DEBUG [store] Persisted trie from memory databasenodes14size1.36 kBtime419.123µsgcnodes0gcsize0.00 Bgctime0slivenodes1livesize0.00 B
[2021-05-09 17:16:19] DEBUG [ledger] Commit to data store, height: 10275320, rootHash: 0xec2c005419ca1964443be0831f69280c0d75aa7d10415728ad50601b2c8517d3
[2021-05-09 17:16:19] DEBUG [store] Persisted trie from memory databasenodes84size8.48 kBtime2.37047msgcnodes0gcsize0.00 Bgctime0slivenodes1livesize0.00 B
[2021-05-09 17:16:19] DEBUG [ledger] Commit to data store, height: 10275320, rootHash: 0x9cd803b3e040902a6eb93caf80f3e7eab31ece5c45a886a351529f2e4aa1f91a
[2021-05-09 17:16:19] DEBUG [store] Persisted trie from memory databasenodes9size837.00 Btime278.799µsgcnodes0gcsize0.00 Bgctime0slivenodes1livesize0.00 B
[2021-05-09 17:16:19] DEBUG [ledger] Commit to data store, height: 10275320, rootHash: 0x17f16ec2711d28ccc57029c4d40b453902b0de4c6c74315803e5f014d0bfc6d0
[2021-05-09 17:16:19] DEBUG [store] Persisted trie from memory databasenodes646size66.12 kBtime19.11237msgcnodes0gcsize0.00 Bgctime0slivenodes1livesize0.00 B
[2021-05-09 17:16:19] DEBUG [ledger] Commit to data store, height: 10275320, rootHash: 0xaf3787190bc369417e5951b9f6811b0ed40bb752d9987e06c128aa67bed414c2

Checking listening ports I get:

@web1:~/theta_mainnet/bin$ sudo ss -tulpn | grep LISTEN
[sudo] password for grant: 
tcp     LISTEN   0        128                                   0.0.0.0:22                                           0.0.0.0:*                                   users:(("sshd",pid=519,fd=3))                                                  
tcp     LISTEN   0        128                                   0.0.0.0:80                                           0.0.0.0:*                                   users:(("nginx",pid=525,fd=6),("nginx",pid=524,fd=6),("nginx",pid=523,fd=6),("nginx",pid=522,fd=6),("nginx",pid=521,fd=6))
tcp     LISTEN   0        128                                      [::]:22                                              [::]:*                                   users:(("sshd",pid=519,fd=4))                                                  
tcp     LISTEN   0        128                                         *:50001                                              *:*                                   users:(("theta",pid=920,fd=22))

So the theta application is not opening a socket on the local instance. I don't really know if it is still syncing or not because I can't query the status.

This is what I get when running the status query:

@web1:~/theta_mainnet/bin$ ./thetacli query status
Failed to get blockchain status: Post http://localhost:16888/rpc: dial tcp [::1]:16888: connect: connection refused

I'll leave it and keep trying.

grantcarthew avatar May 09 '21 07:05 grantcarthew

The RPC server only starts after the snapshot has been imported. These days the snapshot size has grown much bigger so the importation takes time. We are working on improving the snapshot import/export. Hopefully can make it more efficient soon. Thanks.

jieyilong avatar May 09 '21 18:05 jieyilong

OK, thanks @Rebeccawal01 and @jieyilong. As a follow-up, the node fails after some time. This failure is probably not related to this issue.

grantcarthew avatar May 09 '21 20:05 grantcarthew