Pages:
Author

Topic: LOG for errors (Read 369 times)

newbie
Activity: 16
Merit: 5
February 20, 2021, 01:44:14 PM
#24

@crystal-love, are you actually trying to get a lightning node setup as well? or do you just want a Bitcoin Core node? Huh

I would like to setup lightning node.
There are many tutorials, but non of them worked well. So i was using like 3 or 4 tutorials at the same time, trying to put everything together.
Bitcoin Core node - easy. But for lightning i did not found clear and working tutorial.

If you know some, i would be thankful Smiley
HCP
legendary
Activity: 2086
Merit: 4361
January 29, 2021, 04:40:46 AM
#23
I dunno, bitcoin.conf is empty by default so you might have set it unintentionally.
It seems they're sort of blindly copy-pasting stuff from "guides" that they've found... like they said they were following this: https://gist.github.com/bretton/1a72e9fea94405be449edbd379a1ce57

Which is specifically "This guide is specific to getting LND and bitcoind running on ubuntu 16.04 LTS for testnet." Roll Eyes

@crystal-love, are you actually trying to get a lightning node setup as well? or do you just want a Bitcoin Core node? Huh
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
January 27, 2021, 12:07:48 PM
#22
I want to have a real node, doing real things. Why do i need this testnet?
I dunno, bitcoin.conf is empty by default so you might have set it unintentionally.
Also, depending on your use-case, you might not be needing the other entries that you've added to the config file.

BTW, aside from deletion, commenting the line will disable it just like what you did in rpcuser and rpcpassword.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
January 27, 2021, 10:44:15 AM
#21

What is the reason for this testnet?
I want to have a real node, doing real things. Why do i need this testnet?

And of course the last question, how to switch to main blockchain?
Testnet is the alternative blockchain which replicates the protocol rules of Bitcoin with certain enabled features for testing, ie Segwit was activated on that first iirc. It's great for a group of users to be able to test things without risking actual Bitcoins. Regtest does the work as well but it's limited to the user only.

Just remove that line and you'll be on the mainnet.
newbie
Activity: 16
Merit: 5
January 27, 2021, 10:27:43 AM
#20

What is the reason for this testnet?
I want to have a real node, doing real things. Why do i need this testnet?

And of course the last question, how to switch to main blockchain?
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
January 27, 2021, 09:44:04 AM
#19
Also what does it mean "testnet = 1" ?  Is my node running in some "test" mode?
Yes, that's to set Bitcoin Core to run on the testnet instead of the main network.
Note that testnet has a separate blockchain and data directory from the mainnet and shouldn't be treated with monetary value.

More info: https://developer.bitcoin.org/examples/testing.html
newbie
Activity: 16
Merit: 5
January 27, 2021, 09:23:19 AM
#18
Thank you, I believe it worked out.
I've modified bitcoin.conf by commenting these two lines. It looks like it is started and running. Is there any way to check it? Except looking it to "bitcoin-cli getconnectioncount" ?

Also what does it mean "testnet = 1" ?  Is my node running in some "test" mode?


server=1
testnet=1
txindex=1
daemon=1
externalip=X.X.X.X
maxconnections=45
#rpcuser=REPLACEME
#rpcpassword=REPLACEME
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28332
HCP
legendary
Activity: 2086
Merit: 4361
January 26, 2021, 03:23:15 PM
#17
To utilise .cookie auth... you just need to comment out or remove the rpcuser and rpcpassword lines from your bitcoin.conf file, then Bitcoin Core will automagically default to .cookie authentication Wink
newbie
Activity: 16
Merit: 5
January 25, 2021, 05:51:56 AM
#16
To be honest with you, I have no idea what is zmqpath as well as what is zmqpubrawblock.
I was just trying to setup reading this tutorial:

https://gist.github.com/bretton/1a72e9fea94405be449edbd379a1ce57

Content of bitcoin.conf is empty. I suppose to add the text bellow, but except my external IP, i have no idea how to change it so it would use .cookie instead of rpcuser/rpcpassword.


server=1
testnet=1
txindex=1
daemon=1
externalip=X.X.X.X
maxconnections=10
rpcuser=REPLACEME
rpcpassword=REPLACEME
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28332
HCP
legendary
Activity: 2086
Merit: 4361
January 24, 2021, 04:55:47 PM
#15
Then i've got this error:
unable to load RPC credentials for bitcoind: please set all or none of bitcoind.rpcuser, bitcoind.rpcpass, bitcoind.zmqpubrawblock, bitcoind.zmqpubrawtx
Not sure why you're using bitcoind.zmqpath? Huh the options required are: bitcoind.zmqpubrawblock and bitcoind.zmqpubrawtx as per the error message you are seeing.

What is the contents of your bitcoin.conf file in the the /home/user/.bitcoin directory? Huh


Then i removed command "rpcuser and rpcpass" and got this:

Attempting automatic RPC configuration to bitcoind
unable to load RPC credentials for bitcoind: unable to extract RPC credentials: unable to find zmqpubrawblock in config, cannot start w/o RPC connection
As for rpcuser and rpcpass, if you pass the bitcoind.dir to lnd, it should automatically find the .cookie file and use those credentials Wink
newbie
Activity: 16
Merit: 5
January 24, 2021, 02:44:51 PM
#14

Thank you, all clear.
I found cookie file, but...

How should properly look this command? Should there be option (--bitcoind.rpcuser=REPLACEME --bitcoind.rpcpass=REPLACEME) ??


lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --bitcoin.node=bitcoind --bitcoind.rpcuser=REPLACEME --bitcoind.rpcpass=REPLACEME --externalip=X.X.X.X --noencryptwallet --bitcoind.zmqpath=tcp://127.0.0.1:28332


When i try to run, it gives me these errors:

unknown flag `noencryptwallet'

(i removed this command at all and tried again). Then i've got this error:

unknown flag `bitcoind.zmqpath'

(i removed this command at all and tried again). Then i've got this error:

unable to load RPC credentials for bitcoind: please set all or none of bitcoind.rpcuser, bitcoind.rpcpass, bitcoind.zmqpubrawblock, bitcoind.zmqpubrawtx

But i'm starting this command in the same folder, as i have .cookie  (/home/user/.bitcoin)

Then i removed command "rpcuser and rpcpass" and got this:

Attempting automatic RPC configuration to bitcoind
unable to load RPC credentials for bitcoind: unable to extract RPC credentials: unable to find zmqpubrawblock in config, cannot start w/o RPC connection

so, just deleting them, did not helped.

any ideas? how to sort it out?




HCP
legendary
Activity: 2086
Merit: 4361
January 20, 2021, 02:46:07 PM
#13
Thank you for your help, but i can't see cookies file inside .bitcoin folder. I see only these files:

/home/user/.bitcoin$ ls
try to seach in the .bitcoin directory using this command:
Code:
ls -la

By default... any file/directory that starts with a '.' is "hidden" and won't be shown with the standard ls command... you're looking for .cookie file, so you need to show hidden files/folders using the -a switch.
newbie
Activity: 16
Merit: 5
January 20, 2021, 10:14:51 AM
#12

Thank you for your help, but i can't see cookies file inside .bitcoin folder. I see only these files:

/home/user/.bitcoin$ ls
banlist.dat  bitcoin.conf  bitcoind.pid  blocks  chainstate  debug.log    fee_estimates.dat  mempool.dat   peers.dat  testnet3  wallets


Also was trying to run with any user/passw, but got this error:


$ lnd --bitcoin.active --bitcoin.testnet --debuglevel=debug --bitcoin.node=bitcoind --bitcoind.rpcuser=hello --bitcoind.rpcpass=world --externalip=x.x.x.x

unable to load RPC credentials for bitcoind: please set all or none of bitcoind.rpcuser, bitcoind.rpcpass, bitcoind.zmqpubrawblock, bitcoind.zmqpubrawtx



trying to paste to pastebin, but it's also not working:

pastebinit -i debug.log
Failed to contact the server: HTTP Error 502: Bad Gateway
HCP
legendary
Activity: 2086
Merit: 4361
January 15, 2021, 03:52:40 PM
#11
2. Where do i set/change "-rpcuser=user -rpcpassword=pass " these credentials?
You don't need to use -rpcuser and -rpcpassword (and they're being deprecated)... You can simply use the "cookie" method.

When you run bitcoind, you will find a .cookie file is created in your Bitcoin data directory (eg. in your ~\.bitcoin directory) with a randomly generated password. The contents of the .cookie file will look something like this:
Code:
__cookie__:a14191e6892facf70686a397b126423

Where:
- "__cookie__" is effectively the rpcuser value
and "a14191e6892facf70686a397b126423" is the rpcpassword value

Note: every time bitcoind starts, this file will be regenerated with a new password.


When you run bitcoin-cli it will automatically look for this .cookie in the default location and use the credentials stored in there... if you have set bitcoind to use a "custom" data directory (ie. not ~/.bitcoin), then you can simply invoke bitcoin-cli with the -datadir option so it can still find the .cookie file.
Code:
bitcoin-cli -datadir=/path/to/your/bitcoin/datadir



... there are other ways for bitcoin-cli to authenticate without these options, but you don't need to concern yourself with what those are or how they work.
EDIT: or just ignore it all like achow101 says and it will just magically work Wink
staff
Activity: 3458
Merit: 6793
Just writing some code
January 15, 2021, 03:44:06 PM
#10
1. The first command with two "--" before daemon - worked out. It started and never crashed! Thank you. By the way, what is the diference between:

bitcoind -daemon
and
bitcoind --daemon
There is no difference. It will probably crash and you should still check the debug.log file.

2. Where do i set/change "-rpcuser=user -rpcpassword=pass " these credentials?
These are set in the bitcoin.conf file and bitcoin-cli will find them automatically. There is no need to use them in your bitcoin-cli command. Additionally, there is no need to set these in your bitcoin.conf file. These options are deprecated; there are other ways for bitcoin-cli to authenticate without these options, but you don't need to concern yourself with what those are or how they work.
newbie
Activity: 16
Merit: 5
January 15, 2021, 02:29:01 PM
#9
Can you try this command instead of bitcoind -daemon add extra - to daemon it looks like this
Code:
bitcoind --daemon

Can you try this command the above still don't work
Code:
bitcoin-cli -rpcuser=user -rpcpassword=pass -rpcport=8332 getinfo

1. The first command with two "--" before daemon - worked out. It started and never crashed! Thank you. By the way, what is the diference between:

bitcoind -daemon
and
bitcoind --daemon

2. Where do i set/change "-rpcuser=user -rpcpassword=pass " these credentials?
HCP
legendary
Activity: 2086
Merit: 4361
January 13, 2021, 01:40:26 AM
#8
Is there any log for bitcoin core?
Look for the debug.log file in your ~/.bitcoin directory (as achow101 mentioned, it should be in the same location as where you put your bitcoin.conf file)

Also, you'll probably find the contents of this log file are way too long for the character limit for a post here. I'd recommend using a service like https://pastebin.com/ You just need to copy/paste the contents of debug.log to pastebin, then click the "create new paste" button, this will generate a unique URL that you can post here without worrying about character limits for posts Wink
staff
Activity: 3458
Merit: 6793
Just writing some code
January 12, 2021, 07:33:42 PM
#7
Please post the contents of the debug.log file. This file can be found in the same directory as your bitcoin.conf file.

The first command managed to start the program, that's great!

But the second, gives the error:

user@ubuntu:~$ bitcoin-cli -rpcuser=user -rpcpassword=pass -rpcport=8332 getinfo
error: Authorization failed: Incorrect rpcuser or rpcpassword


This program never asked for the user or password, so i've never enter or change it.
There is no need to use -rpcuser or -rpcpassword. bitcoin-cli will determine these itself.
newbie
Activity: 16
Merit: 5
January 12, 2021, 06:45:32 PM
#6
Can you try this command instead of bitcoind -daemon add extra - to daemon it looks like this
Code:
bitcoind --daemon

Can you try this command the above still don't work
Code:
bitcoin-cli -rpcuser=user -rpcpassword=pass -rpcport=8332 getinfo

The first command managed to start the program, that's great!

But the second, gives the error:

user@ubuntu:~$ bitcoin-cli -rpcuser=user -rpcpassword=pass -rpcport=8332 getinfo
error: Authorization failed: Incorrect rpcuser or rpcpassword


This program never asked for the user or password, so i've never enter or change it.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
January 12, 2021, 05:57:31 PM
#5

Hello once again,
Tried both of your config samples, but for some reason daemon still crashing.


user@ubuntu:~$ bitcoind -daemon
Bitcoin Core starting
user@ubuntu:~$ bitcoin-cli getconnectioncount
error: Could not connect to the server 127.0.0.1:8332

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
user@ubuntu:~$


Any ideas? :|


According to the error, it can't connect to 8332 RPCport what I think is your bitcoind still not running.

Can you try this command instead of bitcoind -daemon add extra - to daemon it looks like this
Code:
bitcoind --daemon

Then try some RPC commands again.
What I remember is you should run Bitcoind again two times to make them work.

Can you try this command the above still don't work
Code:
bitcoin-cli -rpcuser=user -rpcpassword=pass -rpcport=8332 getinfo

Wait for a few minutes and try that again.

Pages:
Jump to: