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

xud fails to pull raiden address #1240

Closed
kilrau opened this issue Sep 20, 2019 · 1 comment · Fixed by #1250
Closed

xud fails to pull raiden address #1240

kilrau opened this issue Sep 20, 2019 · 1 comment · Fixed by #1250
Assignees
Labels
bug Something isn't working

Comments

@kilrau
Copy link
Contributor

kilrau commented Sep 20, 2019

Background

Seen usually on first start, of e.g. xud-docker simnet: raiden does not have an address in xucli getinfo. Restarting xud fixes it.

Your environment

  • version of xud: xud-docker simnet
  • which operating system (uname -a on *Nix):
  • version of btcd, bitcoind, ltcd, litecoind, geth, parity, raiden, lnd or other chain backend:
  • any other relevant environment details:

Steps to reproduce

Start xud-docker simnet, getinfo -j, see raiden without address:

  "raiden": {
    "error": "",
    "address": "",
    "channels": 0,
    "version": ""
  },

Expected behaviour

xud continues to query the raiden address endpoint until it gets an address.

Actual behaviour

xud tried to query the raiden address endpoint a couple of times, then gave up.

@kilrau kilrau added the bug Something isn't working label Sep 20, 2019
@ghost
Copy link

ghost commented Sep 20, 2019

xud:

Attaching to simnet_xud_1
xud_1     | 2019-09-20 12:27:22,563 INFO Set uid to user 0 succeeded
xud_1     | 2019-09-20 12:27:22,565 INFO supervisord started with pid 1
xud_1     | 2019-09-20 12:27:23,567 INFO spawned: 'tor' with pid 7
xud_1     | 2019-09-20 12:27:23,568 INFO spawned: 'xud' with pid 8
xud_1     | Detecting localnet IP for lndbtc...
xud_1     | Detecting localnet IP for lndltc...
xud_1     | Detecting localnet IP for raiden...
xud_1     | Sep 20 12:27:23.590 [notice] Tor 0.3.4.11 (git-4fd31340f3355342) running on Linux with Libevent 2.1.8-stable, OpenSSL 1.1.1b, Zlib 1.2.11, Liblzma N/A, and Libzstd N/A.
xud_1     | Sep 20 12:27:23.590 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
xud_1     | Sep 20 12:27:23.590 [notice] Read configuration file "/etc/tor/torrc".
xud_1     | Sep 20 12:27:23.592 [notice] Scheduler type KIST has been enabled.
xud_1     | Sep 20 12:27:23.592 [notice] Opening Socks listener on 127.0.0.1:9050
xud_1     | Sep 20 12:27:23.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.
xud_1     | Sep 20 12:27:23.000 [notice] Parsing GEOIP IPv6 file /usr/share/tor/geoip6.
xud_1     | Sep 20 12:27:23.000 [warn] You are running Tor as root. You don't need to, and you probably shouldn't.
xud_1     | Sep 20 12:27:23.000 [notice] Bootstrapped 0%: Starting
xud_1     | Sep 20 12:27:24.000 [notice] Starting with guard context "default"
xud_1     | Sep 20 12:27:24.000 [notice] Bootstrapped 80%: Connecting to the Tor network
xud_1     | 20/09/2019 12:27:24.265 [GLOBAL] info: config file loaded
xud_1     | 20/09/2019 12:27:24.351 [DB] info: connected to database /root/.xud/xud-simnet.db
xud_1     | 20/09/2019 12:27:24.373 [LND-BTC] debug: loaded tls cert from /root/.lndbtc/tls.cert
xud_1     | 20/09/2019 12:27:24.374 [LND-LTC] debug: loaded tls cert from /root/.lndltc/tls.cert
xud_1     | 20/09/2019 12:27:24.375 [RAIDEN] info: trying to verify connection to raiden with uri: raiden:5001
xud_1     | 20/09/2019 12:27:24.382 [RAIDEN] info: RaidenClient status: Disconnected
xud_1     | 20/09/2019 12:27:24.382 [RAIDEN] error: Error: connect ECONNREFUSED 192.168.0.6:5001
xud_1     |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
xud_1     | 20/09/2019 12:27:24.382 [RAIDEN] error: could not verify connection to raiden at raiden:5001, retrying in 5000 ms: Error: connect ECONNREFUSED 192.168.0.6:5001
xud_1     |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
xud_1     | 20/09/2019 12:27:24.383 [LND-BTC] debug: loaded macaroon from /root/.lndbtc/data/chain/bitcoin/simnet/admin.macaroon
xud_1     | 20/09/2019 12:27:24.384 [LND-BTC] info: trying to verify connection to lnd at lndbtc:10009
xud_1     | 20/09/2019 12:27:24.385 [LND-LTC] debug: loaded macaroon from /root/.lndltc/data/chain/litecoin/simnet/admin.macaroon
xud_1     | 20/09/2019 12:27:24.385 [LND-LTC] info: trying to verify connection to lnd at lndltc:10009
xud_1     | 2019-09-20 12:27:25,386 INFO success: tor entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
xud_1     | 2019-09-20 12:27:25,386 INFO success: xud entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
xud_1     | 20/09/2019 12:27:27.176 [LND-LTC] info: LndClient status: WaitingUnlock
xud_1     | 20/09/2019 12:27:29.383 [RAIDEN] info: trying to verify connection to raiden with uri: raiden:5001
xud_1     | 20/09/2019 12:27:29.388 [LND-BTC] info: could not verify connection within initialization time limit of 5000
xud_1     | 20/09/2019 12:27:29.391 [RAIDEN] error: Error: connect ECONNREFUSED 192.168.0.6:5001
xud_1     |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
xud_1     | 20/09/2019 12:27:29.393 [RAIDEN] error: could not verify connection to raiden at raiden:5001, retrying in 5000 ms: Error: connect ECONNREFUSED 192.168.0.6:5001
xud_1     |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
xud_1     | 20/09/2019 12:27:29.427 [GLOBAL] info: Local nodePubKey is 035be1382251e1e1d3a71cfd1011b6dbf97855b875bbfcde67ca0ed9ce42c93a51
xud_1     | 20/09/2019 12:27:29.446 [P2P] info: Connecting to simnet XU network
xud_1     | 20/09/2019 12:27:29.448 [P2P] info: p2p server listening on 0.0.0.0:28885
xud_1     | 20/09/2019 12:27:29.449 [P2P] debug: Verifying reachability of advertised address: tyb5kh242dwd353edcnggf6hw6uezmhzedxgjs2p6spwmviolmumswyd.onion:28885
xud_1     | 20/09/2019 12:27:29.452 [HTTP] info: http server listening on 0.0.0.0:8887
xud_1     | Sep 20 12:27:31.000 [notice] Bootstrapped 85%: Finishing handshake with first hop
xud_1     | Sep 20 12:27:31.000 [notice] Bootstrapped 90%: Establishing a Tor circuit
xud_1     | Sep 20 12:27:32.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
xud_1     | Sep 20 12:27:32.000 [notice] Bootstrapped 100%: Done
xud_1     | 20/09/2019 12:27:44.475 [LND-LTC] info: trying to verify connection to lnd at lndltc:10009
xud_1     | 20/09/2019 12:27:44.500 [P2P] warn: Could not verify reachability of advertised address: tyb5kh242dwd353edcnggf6hw6uezmhzedxgjs2p6spwmviolmumswyd.onion:28885
xud_1     | 20/09/2019 12:27:44.510 [RPC] info: gRPC server listening on 0.0.0.0:8886
xud_1     | 20/09/2019 12:27:44.532 [LND-BTC] info: LndClient status: ConnectionVerified
xud_1     | 20/09/2019 12:27:44.534 [LND-LTC] info: LndClient status: ConnectionVerified
xud_1     | 20/09/2019 12:27:44.535 [P2P] info: Connecting to known / previously connected peers
xud_1     | 20/09/2019 12:27:47.558 [P2P] warn: could not open connection to peer (02b66438730d1fcdf4a4ae5d3d73e847a272f160fee2938e132b52cab0a0d9cfc6@xud1.simnet.exchangeunion.com:8885): could not connect to peer at xud1.simnet.exchangeunion.com:8885: connect ECONNREFUSED 224.0.0.2:8885
xud_1     | 20/09/2019 12:27:47.559 [P2P] warn: could not open connection to peer (028599d05b18c0c3f8028915a17d603416f7276c822b6b2d20e71a3502bd0f9e0a@xud2.simnet.exchangeunion.com:8885): could not connect to peer at xud2.simnet.exchangeunion.com:8885: connect ECONNREFUSED 224.0.0.3:8885
xud_1     | 20/09/2019 12:27:47.559 [P2P] warn: could not open connection to peer (03fd337659e99e628d0487e4f87acf93e353db06f754dccc402f2de1b857a319d0@xud3.simnet.exchangeunion.com:8885): could not connect to peer at xud3.simnet.exchangeunion.com:8885: connect ECONNREFUSED 224.0.0.4:8885
xud_1     | 20/09/2019 12:27:47.559 [P2P] info: Completed start-up connections to known peers
xud_1     | 20/09/2019 12:27:47.560 [LND-BTC] debug: pubkey is 0283fe388c725bf8dce3657e71ed2d0d48c78fd0e61fe63de22451e827916c049d
xud_1     | 20/09/2019 12:27:47.560 [LND-BTC] debug: uris are 0283fe388c725bf8dce3657e71ed2d0d48c78fd0e61fe63de22451e827916c049d@laxbwuphlruvkyajk7ornoh3wjjqjzjxl5dhydwc2iy6jzuld4fahpqd.onion:29735
xud_1     | 20/09/2019 12:27:47.560 [LND-BTC] debug: chain is bitcoin-simnet
xud_1     | 20/09/2019 12:27:47.561 [LND-LTC] debug: pubkey is 023fd44e44551c8ac211cbe32319ec7cef982ba1e39c05a947aac46c1be9a066c1
xud_1     | 20/09/2019 12:27:47.562 [LND-LTC] debug: uris are 023fd44e44551c8ac211cbe32319ec7cef982ba1e39c05a947aac46c1be9a066c1@5icvfkms4bdgeuet54xpmtmxxyynuomgq6ojk76hrtl2cxd4xy46p6id.onion:30735
xud_1     | 20/09/2019 12:27:47.562 [LND-LTC] debug: chain is litecoin-simnet
xud_1     | 20/09/2019 12:27:56.327 [RPC] debug: received call /xudrpc.Xud/GetInfo
xud_1     | 20/09/2019 12:27:56.334 [RAIDEN] error: Error: connect ECONNREFUSED 192.168.0.6:5001
xud_1     |     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)

raiden:

simnet > logs -f raiden
Attaching to simnet_raiden_1
raiden_1  | 2019-09-20 12:27:23,624 INFO Set uid to user 0 succeeded
raiden_1  | 2019-09-20 12:27:23,625 INFO supervisord started with pid 1
raiden_1  | 2019-09-20 12:27:24,631 INFO spawned: 'raiden' with pid 7
raiden_1  | 2019-09-20 12:27:25,634 INFO success: raiden entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
raiden_1  | Welcome to Raiden, version 0.100.5a1.dev159+g03ac468b6!
raiden_1  | ----------------------------------------------------------------------
raiden_1  | | This is an Alpha version of experimental open source software      |
raiden_1  | | released as a test version under an MIT license and may contain    |
raiden_1  | | errors and/or bugs. No guarantee or representations whatsoever is  |
raiden_1  | | made regarding its suitability (or its use) for any purpose or     |
raiden_1  | | regarding its compliance with any applicable laws and regulations. |
raiden_1  | | Use of the software is at your own risk and discretion and by      |
raiden_1  | | using the software you acknowledge that you have read this         |
raiden_1  | | disclaimer, understand its contents, assume all risk related       |
raiden_1  | | thereto and hereby release, waive, discharge and covenant not to   |
raiden_1  | | sue Brainbot Labs Establishment or any officers, employees or      |
raiden_1  | | affiliates from and for any direct or indirect liability resulting |
raiden_1  | | from the use of the software as permissible by applicable laws and |
raiden_1  | | regulations.                                                       |
raiden_1  | |                                                                    |
raiden_1  | | Privacy Warning: Please be aware, that by using the Raiden Client, |
raiden_1  | | among others, your Ethereum address, channels, channel deposits,   |
raiden_1  | | settlements and the Ethereum address of your channel counterparty  |
raiden_1  | | will be stored on the Ethereum chain, i.e. on servers of Ethereum  |
raiden_1  | | node operators and ergo are to a certain extent publicly available.|
raiden_1  | | The same might also be stored on systems of parties running Raiden |
raiden_1  | | nodes connected to the same token network. Data present in the     |
raiden_1  | | Ethereum chain is very unlikely to be able to be changed, removed  |
raiden_1  | | or deleted from the public arena.                                  |
raiden_1  | |                                                                    |
raiden_1  | | Also be aware, that data on individual Raiden token transfers will |
raiden_1  | | be made available via the Matrix protocol to the recipient,        |
raiden_1  | | intermediating nodes of a specific transfer as well as to the      |
raiden_1  | | Matrix server operators.                                           |
raiden_1  | ----------------------------------------------------------------------
raiden_1  | Raiden is running in development mode
raiden_1  |
raiden_1  | You are connected to the '4321' network and the DB path is: /root/.raiden/node_b5811aa7/netid_4321/network_de8a2bdd/v23_log.db
raiden_1  | Default fee settings are used. If you want use Raiden with mediation fees - flat, proportional and imbalance fees - see https://raiden-network.readthedocs.io/en/latest/overview_and_guide.html#firing-it-up
raiden_1  | The Raiden API RPC server is now running at http://0.0.0.0:5001/.
raiden_1  |
raiden_1  | See the Raiden documentation for all available endpoints at
raiden_1  | http://raiden-network.readthedocs.io/en/stable/rest_api.html
raiden_1  | WARNING
raiden_1  | Your account's balance is below the estimated gas reserve of 0.017951956000000002 eth. This may lead to a loss of of funds because your account will be unable to perform on-chain transactions. Please add funds to your account as soon as possible.

sangaman added a commit that referenced this issue Sep 25, 2019
This fixes the logic around rescheduling reconnection attempts to
ensure that they continue should the previous attempt to verify
the connection fail.

Closes #1240.
@sangaman sangaman self-assigned this Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants