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

macaroon not found for mainnet issue with testnet newaddress RPC #1914

Closed
miketwenty1 opened this issue Sep 15, 2018 · 8 comments
Closed

macaroon not found for mainnet issue with testnet newaddress RPC #1914

miketwenty1 opened this issue Sep 15, 2018 · 8 comments

Comments

@miketwenty1
Copy link

miketwenty1 commented Sep 15, 2018

Background

Bitcoind Testnet
LND testnet
run command lncli newaddress p2wkh
lncli] unable to read macaroon path (check the network setting!): open /home/user/.lnd/data/chain/bitcoin/mainnet/admin.macaroon: no such file or directory

Your environment

[Application Options]
color=#fff000
alias=testnetnode
;externalip=<public ip address> 

[Bitcoin]
bitcoin.active=1 
bitcoin.testnet=1
bitcoin.node=bitcoind
  • version of lnd
    master
  • which operating system (uname -a on *Nix)
    Linux testnode 4.15.0-1019-gcp Implement RPC Authentication  #20~16.04.1-Ubuntu SMP Thu Aug 30 11:52:19 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • version of btcd, bitcoind, or other backend
    bitcoind 0.16.2
  • any other relevant environment details
    Even if I run LND with "--no-macaroons" it will still happen

Steps to reproduce

Tell us how to reproduce this issue. Please provide stacktraces and links to code in question.

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

@miketwenty1
Copy link
Author

Also.. If I add

no-macaroons=true
adminmacaroonpath=~/.lnd/data/chain/bitcoin/testnet/admin.macaroon
readonlymacaroonpath=~/.lnd/data/chain/bitcoin/testnet/readonly.macaroon
invoicemacaroonpath=~/.lnd/data/chain/bitcoin/testnet/invoice.macaroon

to lnd.conf it makes no difference.

@miketwenty1
Copy link
Author

TEMP FIX:

mkdir -p ~/.lnd/data/chain/bitcoin/mainnet/
cp ~/.lnd/data/chain/bitcoin/testnet/* ~/.lnd/data/chain/bitcoin/mainnet/

@cfromknecht
Copy link
Contributor

@miketwenty1 Try passing --network=testnet to lncli?

@miketwenty1
Copy link
Author

Yes this works, is this a mandatory param for lncli even if lnd.conf is specified with testnet?

@miketwenty1
Copy link
Author

in release notes

@cfromknecht
Copy link
Contributor

cfromknecht commented Sep 15, 2018

Yes since the client is stateless. One suggestion is to use alias tlncli=“lncli --network=testnet”, and similar for simnet

@A-qiu161203
Copy link

Yes since the client is stateless. One suggestion is to use alias tlncli=“lncli --network=testnet”, and similar for simnet

hello,I try this method :lncli --rpcserver=localhost:xxxxxx --no-macaroons --network=simnet create. But it still doesn't work.

@A-qiu161203
Copy link

TEMP FIX:

mkdir -p ~/.lnd/data/chain/bitcoin/mainnet/
cp ~/.lnd/data/chain/bitcoin/testnet/* ~/.lnd/data/chain/bitcoin/mainnet/

hello~ Can this method work?

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

3 participants