Closed sotarules closed 2 years ago
What was the exact command that led to that error? Did you start with the command: loop setparams --autoloop=true
?
@levmi correct loop setparams --autoloop=true
Can you attempt to delete your existing macaroon and restart loopd? When you upgrade your Loop instance and there are new permissions added to the API, the old macaroon doesn't have those permissions. So, you just need to get rid of it and re-start loopd. That should fix this. But, let me know if not.
@levmi based on your recommendation I tried this, I deleted both loop.macaroon and loop.macadmin and I was thinking that the system would automatically re-create the macaroons, but when I issue command loop monitor I get this:
[loop] unable to read macaroon path : open /root/.loop/mainnet/loop.macaroon: no such file or directory
Did you restart loopd?
@levmi I did supervisorctl stop loopd
followed by supervisorctl start loopd
but here is good news: I rebooted completely and my script restarted bitcoind, lnd, loop and pool. Now I see the system did re-create loop.macaroon and so things are looking better. But now when I try loop setparams --autoloop=true
I get this:
[loop] rpc error: code = InvalidArgument desc = unknown protocol version: 9
I want you to know that I'm building lnd from branch v0-14-2-branch-rc2
- this was just an experiment I did, normally I build lnd from branch master
. Not sure whether this is relevant.
I'm excited--I feel that we're on the verge of solving this and I'll be getting AutoLoop benefits. Thanks for your help!
Here is my /etc/supervisor/conf.d/loopd.conf
:
[program:loopd]
user=root
command=sh -c "sleep 60;/root/go/bin/loopd --lnd.macaroonpath=/root/.lnd/data/chain/bitcoin/mainnet/admin.macaroon"
stderr_logfile=/root/loopd-stderr.log
stdout_logfile=/root/loopd-stdout.log
startretries=999999999999999999999999999
startsecs=0
exitcodes=0,1,2
autostart=false
autorestart=true
Not sure whether this is helpful. Note that I'm setting the --lnd.macaroonpath
to the default lnd admin.macaroon
I'm rebuilding lnd from branch master
now just for good measure.
Rebuilding lnd from master was not a good idea, a problem that is beyond the scope of this issue surfaced. I feel back to v0-14-2-branch-rc2
Based on your other comment, this is working now too? Gonna close it out, but feel free to re-open if this is still happening.
Expected behavior
Entering command loop setparams I was expecting autoloop to be enabled.
Actual behavior
[loop] rpc error: code = Unknown desc = permission denied
To reproduce
100% reproducible on my system
System information
Using stand-alone loop through command line interface. Loop version is 0.17.0-beta I am building from go using go install ./.. This is on a Qotom i5 celeron machine running Ubuntu Impish.
Other
All other functions such as loop monitor work fine - I just cannot perform setparams. By the way thanks in advance for you help, I've tried a bunch of things including playing with the macaroons, but nothing has seemed to fix this. I don't understand whether the issue is related to loop versus lnd macaroons, or whether macaroons are the issue at all.