Giter VIP home page Giter VIP logo

Comments (33)

ZapUser77 avatar ZapUser77 commented on May 20, 2024 4

Worked like a champ. Thanks for your assistance.

from rtl.

ShahanaFarooqui avatar ShahanaFarooqui commented on May 20, 2024 3

Phew relieved! Closing this issue now!
Don't forget to give us a star on Github! :-)

from rtl.

saubyk avatar saubyk commented on May 20, 2024

Can you please confirm the RTL release you are running?
If you are running from the master or 0.1.13-alpha, you should not be experiencing the above issue.

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

I just installed it, via "git clone https://github.com/ShahanaFarooqui/RTL.git" as per the instructions.

from rtl.

saubyk avatar saubyk commented on May 20, 2024

do you have port 3000 open on the Raspberry pi?
You can check that by running sudo ufw status.

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

No. I'm running the web browser from the same device as LND/RTL.
Do I really need to open port 3000?

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

That can't be it... if the firewall was the problem, the loading page wouldn't show up at all.

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

The web interface sees RTL.conf and lnd.conf... but doesn't seem to see that LND is running, or something along those lines.

from rtl.

saubyk avatar saubyk commented on May 20, 2024

Is your LND synced with Bitcoind?
Please run lncli getinfo on the command line and check.

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

"synced_to_chain": true,"
Yes, it has been for about a year. ^_^

from rtl.

saubyk avatar saubyk commented on May 20, 2024

We would need to investigate the reason why LND api is failing.
Can you please do the below?
Run this command on the console...sudo journalctl -f -u RTL
In case you are not running RTL as a service, then the log should be thrown on the console where you are running node RTL
Try logging into RTL from the browser.
The log should show the reason for the API failure. Paste the console output in the comment.

from rtl.

saubyk avatar saubyk commented on May 20, 2024

Or you can update your RTL.conf with enableLogging=true
restart RTL
try logging in
RTL will generate a RTL.log file, which you can share.

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

Turned logging on... Not too helpful:

Conf: 7: 1549243316508: INFO: Getting RTL Config
Conf: 43: 1549243341068: INFO: Node Type: lnd, File Path: /home/pi/.lnd/lnd.conf
Conf: 43: 1549243348742: INFO: Node Type: rtl, File Path: /home/pi/source/RTL/R$

[And I logged on, and it popped up the "Unlock your wallet' screen"]

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

sudo journalctl -f -u RTL
Has an output of... absolutely nothing.

from rtl.

saubyk avatar saubyk commented on May 20, 2024

You only shared a partial log above, its difficult to troubleshoot, if we cannot see the reason of LND API failure.
The reason why the application is taking you to "Unlock your wallet" screen, is because the getinfo API call failed from RTL. We need to understand the reason for the API failure to advise any further.

Also the journalctl command will only work, if you have configured RTL as a service on your pi.

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

That was not a partial log. That was the entire contents.
I turned RTL, Changed enableLogging=true, node rtl, opened localhost:3000, logged in through the RTL web interface, tried to unlock the wallet, clicked on "LND.conf" then "RTL.Conf" logged out, and closed the browser.
I then opened RLT.log and did CTRL-A CTRL-C and CTRL-V.

One thing to note: When I has nodeAuthType=DEFAULT, I couldn't long in via the bitcoind.rpcpass= stored in LND.conf. Error:"Password Not Found In LND Config!".

from rtl.

saubyk avatar saubyk commented on May 20, 2024

Please pull the latest release. We made some changes in how the LND wallet unlock process is handled.

  1. In case you are trying to unlock, an already unlocked wallet, the error message will indicate that.
  2. Removed the link on the app to unlock LND wallet, as unlocking process is part of the login process, if the wallet is locked.

Please let us know, if the problem still remains.

The error you were getting for the DEFAULT nodeAuthType, may have been because your LND.conf does not have rpc password field, which RTL expects for DEFAULT.

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

"may have been because your LND.conf does not have rpc password field"
I did explicitly state that it does.
"I couldn't long in via the bitcoind.rpcpass="
I guess I could have been more clear.
There is a bitcoind.rpcpass= with LND.conf that isn't being read properly.

git pull
npm install yields these errors:
Perhaps you should add the directory containing cairo.pc' to the PKG_CONFIG_PATH environment variable No package 'cairo' found gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/pi/.config/versions/node/v11.8.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:197:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.14.30-v7+
gyp ERR! command "/home/pi/.config/versions/node/v11.8.0/bin/node" "/home/pi/.config/versions/node/v11.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/source/RTL/node_modules/canvas
gyp ERR! node -v v11.8.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

Also, if there's a RTL.log file and you try to start node RTL... it errors you:
internal/modules/cjs/loader.js:613
throw err;
^

Error: Cannot find module '/home/pi/source/RTL/RTL'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:611:15)
at Function.Module._load (internal/modules/cjs/loader.js:537:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)
at executeUserCode (internal/bootstrap/node.js:526:15)
at startMainThreadExecution (internal/bootstrap/node.js:439:3)

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

"Unlocking Wallet Failed! Verify That Lnd Is Running And The Wallet Is Locked!"

LND is most definitely running, and most definitely unlocked.

Log file had a bit extra this time:
Wallet: 20: 1549331006439: INFO: Unlock Wallet Response: "Not Found\n"

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

I've checked the RTL.conf many times, everything is correct...
But I have no idea what "lndServerUrl=https://localhost:8080/v1" is... which be the source of the problem, as I do not have anything running on HTTPS.

from rtl.

saubyk avatar saubyk commented on May 20, 2024

lndServerUrl is the url on which LND is listening for the REST APIs, which RTL uses to interface with LND.
From the LND API documentation:
"The examples to the right assume that the there is a local lnd instance running and listening for REST connections on port 8080."

https://api.lightning.community/rest/index.html?javascript#lnd-rest-api-reference

from rtl.

saubyk avatar saubyk commented on May 20, 2024

Regarding the npm install error that your getting, it appears strange to us, as we don't have dependencies on any 'cairo' library.

You can try the below steps:

  1. delete node_modules folder from within the RTL folder
  2. delete package-lock.json from within the RTL folder
  3. Try to downgrade your node version to a stable version like v10.15.1
  4. run npm install in RTL folder

There should not be any npm installation errors.

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

Followed your instructions precisely:
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing cairo.pc' to the PKG_CONFIG_PATH environment variable No package 'cairo' found gyp: Call to './util/has_lib.sh freetype' returned exit status 0 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/home/pi/.config/versions/node/v10.15.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.14.30-v7+
gyp ERR! command "/home/pi/.config/versions/node/v10.15.1/bin/node" "/home/pi/.config/versions/node/v10.15.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/source/RTL/node_modules/canvas
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

from rtl.

saubyk avatar saubyk commented on May 20, 2024

Still trying to figure out, what the problem might be with you setup.
At this point, it appears to be an environmental issue at your end. We are not able to reproduce the issue you are facing at our end. The way you are running RTL directly on rpi is also unique, as the device is too under-powered for this use case.
I can advise the following to fix the environmental issues before installing RTL.

  1. Update your rpi
    a. sudo apt-get update
    b. sudo apt-get dist-upgrade
    Cairo package dependency should be resolved with the above steps.

  2. Test the LND REST API (with getinfo) on the rpi command line, with the following steps:
    a. MACAROON_HEADER="Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 /home/pi/.lnd/data/chain/bitcoin/mainnet/admin.macaroon)"
    b. curl -X GET --cacert /home/pi/.lnd/tls.cert --header "$MACAROON_HEADER" https://localhost:8080/v1/getinfo
    It should return something like below:
    {"identity_pubkey":"xxxxxxxxxxxxxxxcxxx12eab97facfxxxx1098385cxxxxx53d6bc40e52192xxxxxx","alias":"XXXXX","num_active_channels":12,"num_peers":15,"block_height":561719,"block_hash":"0000000000000000002caxxxxcx1b0xxx2e73ed8e1xxx61d8a0933b0xxxe3xxx","synced_to_chain":true,"chains":["bitcoin"],"uris":["xxxxxxxxxxxxxxxcxxx12eab97facfxxxx1098385cxxxxx53d6bc40e52192xxxxxx@xx.yyy.xxx.xx:1111"],"best_header_timestamp":"1549411611","version":"0.5.0-beta commit=3b2c80xxxxxb1b7xxxd609533c1e9xxx10ac5fxxx"}

  3. run npm install in the RTL folder

npm install errors are environmental, and your installation needs to complete successfully for the application to run perfectly.

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

"{"error":"all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: authentication handshake failed: x509: certificate is valid for 127.0.0.1, ::1, 192.168.1.100, 2405:9800:b910:8ee8:c93c:d208:f4b:4f3e, fe80::5e2f:9ca5:4308:93ec, not 0.0.0.0"","code":14}"

this is what I get when I issue that curl.

from rtl.

saubyk avatar saubyk commented on May 20, 2024

Please follow the below steps:

  1. Stop LND
  2. Delete your tls.key and tls.cert files from the lnd folder
  3. Restart LND

Retry the curl command.

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

Exact same error.

from rtl.

saubyk avatar saubyk commented on May 20, 2024

Can you share your lnd.conf file?
You can mask the sensitive information like password or IP address etc.

from rtl.

ZapUser77 avatar ZapUser77 commented on May 20, 2024

debuglevel=info
debughtlc=false
externalip=Removed
alias=Removed
color=Removed
maxpendingchannels=5
bitcoin.mainnet=1
bitcoin.active=1
bitcoin.node=bitcoind
bitcoind.rpcuser=Removed
bitcoind.rpcpass=Removed
restlisten=0.0.0.0:8080
bitcoind.zmqpubrawblock=tcp://127.0.0.1:18501
bitcoind.zmqpubrawtx=tcp://127.0.0.1:18502
rpclisten=0.0.0.0:10009
debughtlc=false

Ahh... maybe I need to delete that restlisten... I forgot I added that in there for testing.

from rtl.

saubyk avatar saubyk commented on May 20, 2024

Try with this...

[Application Options]
debuglevel=info
debughtlc=false
externalip=Removed
alias=Removed
color=Removed
maxpendingchannels=5

[Bitcoin]
bitcoin.mainnet=1
bitcoin.active=1
bitcoin.node=bitcoind

[Bitcoind]
bitcoind.rpcuser=Removed
bitcoind.rpcpass=Removed
bitcoind.zmqpubrawblock=tcp://127.0.0.1:18501
bitcoind.zmqpubrawtx=tcp://127.0.0.1:18502

from rtl.

saubyk avatar saubyk commented on May 20, 2024

On a separate note, RTL was not able to read the lnd.conf file correctly because the ini headers were missing in your file.
When you tried with authtype DEFAULT

from rtl.

saubyk avatar saubyk commented on May 20, 2024

Please note, you need to restart and unlock LND, after you have updated the conf file.

from rtl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.