<p>You basically already have given the answer. You need to connect to a peer and open a channel with a peer before you can make a payment. On <a href="https://api.lightning.community/rest/index.html#ChannelOpenRequest" rel="nofollow noreferrer">https://api.lightning.community/rest/index.html#ChannelOpenRequest</a> you can read about the syntax for opening a channel. (the same you also works with <code>lncli</code> on the command line. Before you can do that you need to send onchain Bitcoin (or in your case onchain testnet Bitcoin) to your lightning node. There is also a command <a href="https://api.lightning.community/rest/index.html#newaddress" rel="nofollow noreferrer">https://api.lightning.community/rest/index.html#newaddress</a> that generates a new address to which you can send the (testnet)Bitcoin.</p>

<p>On a meta level you might want to open an issue in lnds github asking them to make the error message more specific. You could reference to this discussion. </p>

CC BY-SA 4.0
2019-05-20T13:13:58.837Z
Thank you. I will do it and let you know the result. (btw.. I forked Bluewallet and added testnet support. Then I tried to pay to the invoice from mobile app via lndhub. But before doing that I will try to send from my LND node as you suggested.)
zono
CC BY-SA 4.0
2019-05-20T12:50:35.653Z
2019-05-20T12:50:35.653Z
Rene Pickhardt
<p>I got an error "unable to find a path to destination" when I call SendPayment to an invoice, created at starblocks.acinq.co, from my local private LND node on mac (docker).</p>

<p>It seems getinfo and getnetworkinfo are no problem. Am I missing something? (e.g. open port or connect channel) How can I debug it?</p>

<ul>
<li>my local private LND node</li>
</ul>

<pre><code># lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 getinfo
{
    "version": "0.6.1-beta commit=v0.6.1-beta-21-g863bf2f91b245afd58c8edc078a171a55e48f931",
    "identity_pubkey": "02a5d8c2fa771570cefd4ab00be298daffca4d64c77cfc8a0d411a6c1b638cc092",
    "alias": "02a5d8c2fa771570cefd",
    "num_pending_channels": 0,
    "num_active_channels": 0,
    "num_inactive_channels": 0,
    "num_peers": 3,
    "block_height": 1517489,
    "block_hash": "00000000000000723b9b81a3d7433385eec9e03fe1ecff2a3ea850171f70f639",
    "best_header_timestamp": 1558348537,
    "synced_to_chain": true,
    "testnet": true,
    "chains": [
        {
            "chain": "bitcoin",
            "network": "testnet"
        }
    ],
    "uris": null
}

# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 getnetworkinfo
{
    "graph_diameter": 0,
    "avg_out_degree": 6.239715591670899,
    "max_out_degree": 775,
    "num_nodes": 1969,
    "num_channels": 6143,
    "total_network_capacity": "48768373513",
    "avg_channel_size": 7938852.924141299,
    "min_channel_size": "4000",
    "max_channel_size": "16777216",
    "median_channel_size_sat": "5000000"
}
</code></pre>

<ul>
<li>invoice created at starblocks.acinq.co</li>
</ul>

<p><a href="https://starblocks.acinq.co/order/75c4e1cceefa2b59c49890f1e5466680" rel="nofollow noreferrer">https://starblocks.acinq.co/order/75c4e1cceefa2b59c49890f1e5466680</a></p>

<hr>

<p>Update 1:</p>

<p>The problem was solved. Thank you Rene. (I will try to send via lndhub again)</p>

<pre><code>bash-4.4# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 walletbalance
{
    "total_balance": "6610063",
    "confirmed_balance": "6610063",
    "unconfirmed_balance": "0"
}

bash-4.4# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 connect 03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134@34.250.234.192:9735
{

}

bash-4.4# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 listpeers
{
    "peers": [
        {
            "pub_key": "03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134",
            "address": "34.250.234.192:9735",
            "bytes_sent": "73",
            "bytes_recv": "4449",
            "sat_sent": "0",
            "sat_recv": "0",
            "inbound": false,
            "ping_time": "235186",
            "sync_type": "ACTIVE_SYNC"
        }
    ]
}

bash-4.4# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 openchannel --node_key=03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134 --local_amt=1000000
{
    "funding_txid": "3bd6b1824194f40b2d92e46d4035df3d67df9183ae3d18e6c8e1cbbe95258d9d"
}

wait for 3 confirmations...

bash-4.4# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 listchannels
{
    "channels": [
        {
            "active": true,
            "remote_pubkey": "03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134",
            "channel_point": "3bd6b1824194f40b2d92e46d4035df3d67df9183ae3d18e6c8e1cbbe95258d9d:0",
            "chan_id": "1668570467812442112",
            "capacity": "1000000",
            "local_balance": "999817",
            "remote_balance": "0",
            "commit_fee": "183",
            "commit_weight": "600",
            "fee_per_kw": "253",
            "unsettled_balance": "0",
            "total_satoshis_sent": "0",
            "total_satoshis_received": "0",
            "num_updates": "0",
            "pending_htlcs": [
            ],
            "csv_delay": 720,
            "private": false,
            "initiator": true,
            "chan_status_flags": "ChanStatusDefault"
        }
    ]
}

bash-4.4# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 sendpayment --pay_req=lntb12u1pww90nkpp5lcv7a9lt9ussmupumq420xlchcl9ytatqhel45sxryfnj7wqkpxqdp2xys9xct5da3kx6twv9kk7m3qg3hkccm9ypxxzar5v5cqp599lvp3dlz95htpps87kv4kylp968mgjr5l65afu78yfjtv0p86mpcgvu73hmcmuhkhtjs7m2w9g7lfgvpt3tg0kdlufu69zgn9d6w0sphg0gls
Description: 1 Satoccinamon Dolce Latte
Amount (in satoshis): 1200
Destination: 03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134
Confirm payment (yes/no): yes
{
    "payment_error": "",
    "payment_preimage": "8a1736a5774a3488fbdaeb341d97b3414745a878f58360a7fb1d3851a95eba91",
    "payment_route": {
        "total_time_lock": 1517578,
        "total_amt": 1200,
        "hops": [
            {
                "chan_id": 1668570467812442112,
                "chan_capacity": 1000000,
                "amt_to_forward": 1200,
                "expiry": 1517578,
                "amt_to_forward_msat": 1200000,
                "pub_key": "03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134"
            }
        ],
        "total_amt_msat": 1200000
    }
}
</code></pre>

CC BY-SA 4.0
2019-05-20T17:07:04.763Z
Awesome that you also posted your solution code with an update! This will be so helpful if people Google for it and find it later
Rene Pickhardt
<lightning-network><lightning-network-daemon>
lnd SendPayment "unable to find a path to destination"
zono
# lnd SendPayment "unable to find a path to destination"

(Asked by: username_0 on 2019-05-20)

I got an error "unable to find a path to destination" when I call SendPayment to an invoice, created at starblocks.acinq.co, from my local private LND node on mac (docker).
It seems getinfo and getnetworkinfo are no problem. Am I missing something? (e.g. open port or connect channel) How can I debug it?

my local private LND node

# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 getinfo
{
    "version": "0.6.1-beta commit=v0.6.1-beta-21-g863bf2f91b245afd58c8edc078a171a55e48f931",
    "identity_pubkey": "02a5d8c2fa771570cefd4ab00be298daffca4d64c77cfc8a0d411a6c1b638cc092",
    "alias": "02a5d8c2fa771570cefd",
    "num_pending_channels": 0,
    "num_active_channels": 0,
    "num_inactive_channels": 0,
    "num_peers": 3,
    "block_height": 1517489,
    "block_hash": "00000000000000723b9b81a3d7433385eec9e03fe1ecff2a3ea850171f70f639",
    "best_header_timestamp": 1558348537,
    "synced_to_chain": true,
    "testnet": true,
    "chains": [
        {
            "chain": "bitcoin",
            "network": "testnet"
        }
    ],
    "uris": null
}

# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 getnetworkinfo
{
    "graph_diameter": 0,
    "avg_out_degree": 6.239715591670899,
    "max_out_degree": 775,
    "num_nodes": 1969,
    "num_channels": 6143,
    "total_network_capacity": "48768373513",
    "avg_channel_size": 7938852.924141299,
    "min_channel_size": "4000",
    "max_channel_size": "16777216",
    "median_channel_size_sat": "5000000"
}


invoice created at starblocks.acinq.co

https://starblocks.acinq.co/order/75c4e1cceefa2b59c49890f1e5466680

Update 1:
The problem was solved. Thank you Rene. (I will try to send via lndhub again)
bash-4.4# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 walletbalance
{
    "total_balance": "6610063",
    "confirmed_balance": "6610063",
    "unconfirmed_balance": "0"
}

bash-4.4# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 connect 03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134@34.250.234.192:9735
{

}

bash-4.4# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 listpeers
{
    "peers": [
        {
            "pub_key": "03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134",
            "address": "34.250.234.192:9735",
            "bytes_sent": "73",
            "bytes_recv": "4449",
            "sat_sent": "0",
            "sat_recv": "0",
            "inbound": false,
            "ping_time": "235186",
            "sync_type": "ACTIVE_SYNC"
        }
    ]
}

bash-4.4# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 openchannel --node_key=03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134 --local_amt=1000000
{
    "funding_txid": "3bd6b1824194f40b2d92e46d4035df3d67df9183ae3d18e6c8e1cbbe95258d9d"
}

wait for 3 confirmations...

bash-4.4# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 listchannels
{
    "channels": [
        {
            "active": true,
            "remote_pubkey": "03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134",
            "channel_point": "3bd6b1824194f40b2d92e46d4035df3d67df9183ae3d18e6c8e1cbbe95258d9d:0",
            "chan_id": "1668570467812442112",
            "capacity": "1000000",
            "local_balance": "999817",
            "remote_balance": "0",
            "commit_fee": "183",
            "commit_weight": "600",
            "fee_per_kw": "253",
            "unsettled_balance": "0",
            "total_satoshis_sent": "0",
            "total_satoshis_received": "0",
            "num_updates": "0",
            "pending_htlcs": [
            ],
            "csv_delay": 720,
            "private": false,
            "initiator": true,
            "chan_status_flags": "ChanStatusDefault"
        }
    ]
}

bash-4.4# lncli --macaroonpath=/home/bitcoin/.lnd_1/chain/bitcoin/testnet/admin.macaroon --rpcserver=localhost:10010 --lnddir=/home/bitcoin/.lnd_1 sendpayment --pay_req=lntb12u1pww90nkpp5lcv7a9lt9ussmupumq420xlchcl9ytatqhel45sxryfnj7wqkpxqdp2xys9xct5da3kx6twv9kk7m3qg3hkccm9ypxxzar5v5cqp599lvp3dlz95htpps87kv4kylp968mgjr5l65afu78yfjtv0p86mpcgvu73hmcmuhkhtjs7m2w9g7lfgvpt3tg0kdlufu69zgn9d6w0sphg0gls
Description: 1 Satoccinamon Dolce Latte
Amount (in satoshis): 1200
Destination: 03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134
Confirm payment (yes/no): yes
{
    "payment_error": "",
    "payment_preimage": "8a1736a5774a3488fbdaeb341d97b3414745a878f58360a7fb1d3851a95eba91",
    "payment_route": {
        "total_time_lock": 1517578,
        "total_amt": 1200,
        "hops": [
            {
                "chan_id": 1668570467812442112,
                "chan_capacity": 1000000,
                "amt_to_forward": 1200,
                "expiry": 1517578,
                "amt_to_forward_msat": 1200000,
                "pub_key": "03933884aaf1d6b108397e5efe5c86bcf2d8ca8d2f700eda99db9214fc2712b134"
            }
        ],
        "total_amt_msat": 1200000
    }
}

**Tags:** lightning-network, lightning-network-daemon

> **Comments:**
> **username_1**: Awesome that you also posted your solution code with an update! This will be so helpful if people Google for it and find it later  

---

## 1 answers

### Answer by username_1 on 2019-05-20. Score: 2 | Accepted answer

You basically already have given the answer. You need to connect to a peer and open a channel with a peer before you can make a payment. On <https://api.lightning.community/rest/index.html#ChannelOpenRequest> you can read about the syntax for opening a channel. (the same you also works with `lncli` on the command line. Before you can do that you need to send onchain Bitcoin (or in your case onchain testnet Bitcoin) to your lightning node. There is also a command <https://api.lightning.community/rest/index.html#newaddress> that generates a new address to which you can send the (testnet)Bitcoin.

On a meta level you might want to open an issue in lnds github asking them to make the error message more specific. You could reference to this discussion.

> **Comments:**
> **username_0**: Thank you. I will do it and let you know the result. (btw.. I forked Bluewallet and added testnet support. Then I tried to pay to the invoice from mobile app via lndhub. But before doing that I will try to send from my LND node as you suggested.)  

---

