<p>I think this is because your <code>lightningd</code> is still synchronizing with the blockchain. You can test this by looking either at the output of <code>lightningd</code> which should print things like </p>

<pre><code>Adding block 529728: 00000000000000000024f3a1b7fa91de16ba324d8842bd7e83fb2a1d84719265
</code></pre>

<p>or you can compare the blocks count in <code>bitcoin-cli getblockchaininfo</code> and the blockheight in <code>lightning-cli getinfo</code>. If this is indeed different you will have to wait for <code>lightningd</code> to catch up with the appropriate blockheights and see the confirmation on the blockchain.</p>

CC BY-SA 4.0
2018-07-05T14:37:02.783Z
They are both on the block 530588. It freeze for more than 12hr. Is there any other options or command that I can run?
Hugo Doyon
CC BY-SA 4.0
2018-07-05T18:26:26.430Z
Ok, can you share the full output of `listpeers` (for that specific peer)?
cdecker
CC BY-SA 4.0
2018-07-07T12:53:06.130Z
Ok, can you restart `lightningd` with the option `--rescan=-530500`, that will re-process the blockchain from before the funding transaction was confirmed. If possible please redirect the output to a file (`lightningd/lightningd --rescan=-530500 --log-level=debug --network=bitcoin | tee logfile` will do that).
cdecker
CC BY-SA 4.0
2018-07-07T13:11:39.863Z
Just don't forget to remove the `--rescan` option once you're done, otherwise you'll always re-sync from that height.
cdecker
CC BY-SA 4.0
2018-07-16T21:43:54.533Z
I did run a rescan from the required blockheight multiples times. With lightningd and spruned in sych to the lastest block. Did a devrescanoutput as well. the channel status is still frozen to awating lockin. I got the following error message in lightningd : lightning_channeld: Writing out status 65522: Broken pipe
lightning_channeld: Writing out status 65522: Broken pipe
lightning_channeld: Writing out status 65522: Broken pipe. Is there anything else I can do to unfreeze those channel?
Hugo Doyon
CC BY-SA 4.0
2018-07-19T23:16:33.127Z
Finally I did rollback from spruned mode. Now running a full node with c-lightning until spruned lib get fixed. I think spruned will be awesome when it work and when it's stable
Hugo Doyon
CC BY-SA 4.0
2018-07-05T14:31:01.633Z
2018-07-05T14:31:01.633Z
cdecker
<p>I have open 3 channels with a c-lightning node (with rompert.com and satoshis.place and HP). </p>

<p>When I look for the funding_txid field on the blockchain the transactions are all confirms for more than 30 blocks. However the status of all the channel opening stay the following :</p>

<pre><code>"status":
[
    "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",        
    "CHANNELD_AWAITING_LOCKIN:Funding needs more confirmations."
],
</code></pre>

<p>Current blockchain state (is up to date):</p>

<pre><code>bitcoin-cli getblockchaininfo
{
  "chain": "main",
  "warning": "spruned 0.0.1a7, emulating bitcoind v0.16",
  "blocks": 530651,
  "headers": 530651,
  "bestblockhash": "0000000000000000000e16820e6f6511299c511a8f5bb085abd4af5a54603651",
  "difficulty": null,
  "chainwork": null,
  "mediantime": 1530842433,
  "verificationprogress": 81.5,
  "pruned": false
}
</code></pre>

<p>cli/lightning-cli listpeers :</p>

<pre><code>{
  "peers": [
    {
      "id": "024655b768ef40951b20053a5c4b951606d4d86085d51238f2c67c7dec29c792ca",
      "connected": true,
      "netaddr": [
        "88.98.213.235:9735"
      ],
      "alias": "www.satoshis.place",
      "color": "42f474",
      "channels": [
        {
          "state": "CHANNELD_AWAITING_LOCKIN",
          "owner": "lightning_channeld",
          "channel_id": "1416ec7bf9df734045c31363ff02a0f8c68d2c2ecab5623becde2a24d6ec7a63",
          "funding_txid": "PRIVATE",
          "msatoshi_to_us": 100000000,
          "msatoshi_to_us_min": 100000000,
          "msatoshi_to_us_max": 100000000,
          "msatoshi_total": 100000000,
          "dust_limit_satoshis": 546,
          "max_htlc_value_in_flight_msat": 18446744073709551615,
          "their_channel_reserve_satoshis": 0,
          "our_channel_reserve_satoshis": 1000,
          "channel_reserve_satoshis": 0,
          "spendable_msatoshi": 99000000,
          "htlc_minimum_msat": 0,
          "their_to_self_delay": 144,
          "our_to_self_delay": 144,
          "to_self_delay": 144,
          "max_accepted_htlcs": 483,
          "status": [
            "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",
            "CHANNELD_AWAITING_LOCKIN:They've confirmed funding, we haven't yet."
          ],
          "in_payments_offered": 0,
          "in_msatoshi_offered": 0,
          "in_payments_fulfilled": 0,
          "in_msatoshi_fulfilled": 0,
          "out_payments_offered": 0,
          "out_msatoshi_offered": 0,
          "out_payments_fulfilled": 0,
          "out_msatoshi_fulfilled": 0
        }
      ]
    },
    {
      "id": "02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b",
      "connected": true,
      "netaddr": [
        "167.99.50.31:9735"
      ],
      "alias": "rompert.com",
      "color": "0000ff",
      "channels": [
        {
          "state": "CHANNELD_AWAITING_LOCKIN",
          "owner": "lightning_channeld",
          "channel_id": "3d204f5169cd985b1855050a052f1631d42718ebc85776c46eec2f84501c7e25",
          "funding_txid": "PRIVATE",
          "msatoshi_to_us": 10000000,
          "msatoshi_to_us_min": 10000000,
          "msatoshi_to_us_max": 10000000,
          "msatoshi_total": 10000000,
          "dust_limit_satoshis": 546,
          "max_htlc_value_in_flight_msat": 18446744073709551615,
          "their_channel_reserve_satoshis": 0,
          "our_channel_reserve_satoshis": 546,
          "channel_reserve_satoshis": 0,
          "spendable_msatoshi": 9454000,
          "htlc_minimum_msat": 0,
          "their_to_self_delay": 144,
          "our_to_self_delay": 144,
          "to_self_delay": 144,
          "max_accepted_htlcs": 483,
          "status": [
            "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",
            "CHANNELD_AWAITING_LOCKIN:They've confirmed funding, we haven't yet."
          ],
          "in_payments_offered": 0,
          "in_msatoshi_offered": 0,
          "in_payments_fulfilled": 0,
          "in_msatoshi_fulfilled": 0,
          "out_payments_offered": 0,
          "out_msatoshi_offered": 0,
          "out_payments_fulfilled": 0,
          "out_msatoshi_fulfilled": 0
        }
      ]
    },
    {
      "id": "02a45def9ae014fdd2603dd7033d157faa3a55a72b06a63ae22ef46d9fafdc6e8d",
      "connected": true,
      "netaddr": [
        "85.216.75.225:9735"
      ],
      "alias": "HP",
      "color": "f88f22",
      "channels": [
        {
          "state": "CHANNELD_AWAITING_LOCKIN",
          "owner": "lightning_channeld",
          "channel_id": "a8357363f646cbff5fd4e44e0bebee84d03a2557abb738dd5bd0b2661314c29b",
          "funding_txid": "PRIVATE",
          "msatoshi_to_us": 20000000,
          "msatoshi_to_us_min": 20000000,
          "msatoshi_to_us_max": 20000000,
          "msatoshi_total": 20000000,
          "dust_limit_satoshis": 546,
          "max_htlc_value_in_flight_msat": 18446744073709551615,
          "their_channel_reserve_satoshis": 0,
          "our_channel_reserve_satoshis": 546,
          "channel_reserve_satoshis": 0,
          "spendable_msatoshi": 19454000,
          "htlc_minimum_msat": 0,
          "their_to_self_delay": 144,
          "our_to_self_delay": 144,
          "to_self_delay": 144,
          "max_accepted_htlcs": 483,
          "status": [
            "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",
            "CHANNELD_AWAITING_LOCKIN:They've confirmed funding, we haven't yet."
          ],
          "in_payments_offered": 0,
          "in_msatoshi_offered": 0,
          "in_payments_fulfilled": 0,
          "in_msatoshi_fulfilled": 0,
          "out_payments_offered": 0,
          "out_msatoshi_offered": 0,
          "out_payments_fulfilled": 0,
          "out_msatoshi_fulfilled": 0
        }
      ]
    }
  ]
}
</code></pre>

<p>(Please note that I have remove funding_txtid above for privacy reason)</p>

<p>I have restarted bitcoind (spruned), lightningd and even restarted Ubuntu. Nothing seem to fix the issue. The node and the channel are not visible from <a href="https://1ml.com" rel="nofollow noreferrer">https://1ml.com</a>.</p>

<p>In the mean time I realized that 1 transaction was not broadcasted on the blockchain but was in lightning database (.lightning/lightningd.sqlite3). So I query it and rebroadcast it manually with the bitcoin-cli sendrawtransaction command.</p>

<p>Event after all those steps the status of the channel does not change to CHANNELD_NORMAL. </p>

<p>What should I do in order to re-sync c-lightning channels and fix those issues ?</p>

<p>Thank you!</p>

CC BY-SA 4.0
2018-07-05T18:08:17.353Z
It seem that there is a transaction unbroadcast for a channel funding. However I did not find any way to rebroadcast it with lightning-cli or spruned. Maybe that spruned was down or unsync when lightning-cli broadcast it. 

Is there a way to refresh/rebroadcast/resync c-lightning channel statut? (tried lightning-cli dev-rescan-outputs and it does not work : the unbroadcast transaction is still there)
Hugo Doyon
<lightning-network><core-lightning>
c-lightning - CHANNELD_AWAITING_LOCKIN - Freeze
Hugo Doyon
# c-lightning - CHANNELD_AWAITING_LOCKIN - Freeze

(Asked by: username_0 on 2018-07-05)

I have open 3 channels with a c-lightning node (with rompert.com and satoshis.place and HP).

When I look for the funding\_txid field on the blockchain the transactions are all confirms for more than 30 blocks. However the status of all the channel opening stay the following :

```
"status":
[
    "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",        
    "CHANNELD_AWAITING_LOCKIN:Funding needs more confirmations."
],

```

Current blockchain state (is up to date):

```
bitcoin-cli getblockchaininfo
{
  "chain": "main",
  "warning": "spruned 0.0.1a7, emulating bitcoind v0.16",
  "blocks": 530651,
  "headers": 530651,
  "bestblockhash": "0000000000000000000e16820e6f6511299c511a8f5bb085abd4af5a54603651",
  "difficulty": null,
  "chainwork": null,
  "mediantime": 1530842433,
  "verificationprogress": 81.5,
  "pruned": false
}

```

cli/lightning-cli listpeers :

```
{
  "peers": [
    {
      "id": "024655b768ef40951b20053a5c4b951606d4d86085d51238f2c67c7dec29c792ca",
      "connected": true,
      "netaddr": [
        "88.98.213.235:9735"
      ],
      "alias": "www.satoshis.place",
      "color": "42f474",
      "channels": [
        {
          "state": "CHANNELD_AWAITING_LOCKIN",
          "owner": "lightning_channeld",
          "channel_id": "1416ec7bf9df734045c31363ff02a0f8c68d2c2ecab5623becde2a24d6ec7a63",
          "funding_txid": "PRIVATE",
          "msatoshi_to_us": 100000000,
          "msatoshi_to_us_min": 100000000,
          "msatoshi_to_us_max": 100000000,
          "msatoshi_total": 100000000,
          "dust_limit_satoshis": 546,
          "max_htlc_value_in_flight_msat": 18446744073709551615,
          "their_channel_reserve_satoshis": 0,
          "our_channel_reserve_satoshis": 1000,
          "channel_reserve_satoshis": 0,
          "spendable_msatoshi": 99000000,
          "htlc_minimum_msat": 0,
          "their_to_self_delay": 144,
          "our_to_self_delay": 144,
          "to_self_delay": 144,
          "max_accepted_htlcs": 483,
          "status": [
            "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",
            "CHANNELD_AWAITING_LOCKIN:They've confirmed funding, we haven't yet."
          ],
          "in_payments_offered": 0,
          "in_msatoshi_offered": 0,
          "in_payments_fulfilled": 0,
          "in_msatoshi_fulfilled": 0,
          "out_payments_offered": 0,
          "out_msatoshi_offered": 0,
          "out_payments_fulfilled": 0,
          "out_msatoshi_fulfilled": 0
        }
      ]
    },
    {
      "id": "02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b",
      "connected": true,
      "netaddr": [
        "167.99.50.31:9735"
      ],
      "alias": "rompert.com",
      "color": "0000ff",
      "channels": [
        {
          "state": "CHANNELD_AWAITING_LOCKIN",
          "owner": "lightning_channeld",
          "channel_id": "3d204f5169cd985b1855050a052f1631d42718ebc85776c46eec2f84501c7e25",
          "funding_txid": "PRIVATE",
          "msatoshi_to_us": 10000000,
          "msatoshi_to_us_min": 10000000,
          "msatoshi_to_us_max": 10000000,
          "msatoshi_total": 10000000,
          "dust_limit_satoshis": 546,
          "max_htlc_value_in_flight_msat": 18446744073709551615,
          "their_channel_reserve_satoshis": 0,
          "our_channel_reserve_satoshis": 546,
          "channel_reserve_satoshis": 0,
          "spendable_msatoshi": 9454000,
          "htlc_minimum_msat": 0,
          "their_to_self_delay": 144,
          "our_to_self_delay": 144,
          "to_self_delay": 144,
          "max_accepted_htlcs": 483,
          "status": [
            "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",
            "CHANNELD_AWAITING_LOCKIN:They've confirmed funding, we haven't yet."
          ],
          "in_payments_offered": 0,
          "in_msatoshi_offered": 0,
          "in_payments_fulfilled": 0,
          "in_msatoshi_fulfilled": 0,
          "out_payments_offered": 0,
          "out_msatoshi_offered": 0,
          "out_payments_fulfilled": 0,
          "out_msatoshi_fulfilled": 0
        }
      ]
    },
    {
      "id": "02a45def9ae014fdd2603dd7033d157faa3a55a72b06a63ae22ef46d9fafdc6e8d",
      "connected": true,
      "netaddr": [
        "85.216.75.225:9735"
      ],
      "alias": "HP",
      "color": "f88f22",
      "channels": [
        {
          "state": "CHANNELD_AWAITING_LOCKIN",
          "owner": "lightning_channeld",
          "channel_id": "a8357363f646cbff5fd4e44e0bebee84d03a2557abb738dd5bd0b2661314c29b",
          "funding_txid": "PRIVATE",
          "msatoshi_to_us": 20000000,
          "msatoshi_to_us_min": 20000000,
          "msatoshi_to_us_max": 20000000,
          "msatoshi_total": 20000000,
          "dust_limit_satoshis": 546,
          "max_htlc_value_in_flight_msat": 18446744073709551615,
          "their_channel_reserve_satoshis": 0,
          "our_channel_reserve_satoshis": 546,
          "channel_reserve_satoshis": 0,
          "spendable_msatoshi": 19454000,
          "htlc_minimum_msat": 0,
          "their_to_self_delay": 144,
          "our_to_self_delay": 144,
          "to_self_delay": 144,
          "max_accepted_htlcs": 483,
          "status": [
            "CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.",
            "CHANNELD_AWAITING_LOCKIN:They've confirmed funding, we haven't yet."
          ],
          "in_payments_offered": 0,
          "in_msatoshi_offered": 0,
          "in_payments_fulfilled": 0,
          "in_msatoshi_fulfilled": 0,
          "out_payments_offered": 0,
          "out_msatoshi_offered": 0,
          "out_payments_fulfilled": 0,
          "out_msatoshi_fulfilled": 0
        }
      ]
    }
  ]
}

```

(Please note that I have remove funding\_txtid above for privacy reason)

I have restarted bitcoind (spruned), lightningd and even restarted Ubuntu. Nothing seem to fix the issue. The node and the channel are not visible from <https://1ml.com>.

In the mean time I realized that 1 transaction was not broadcasted on the blockchain but was in lightning database (.lightning/lightningd.sqlite3). So I query it and rebroadcast it manually with the bitcoin-cli sendrawtransaction command.

Event after all those steps the status of the channel does not change to CHANNELD\_NORMAL.

What should I do in order to re-sync c-lightning channels and fix those issues ?

Thank you!

**Tags:** lightning-network, core-lightning

> **Comments:**
> **username_0**: It seem that there is a transaction unbroadcast for a channel funding. However I did not find any way to rebroadcast it with lightning-cli or spruned. Maybe that spruned was down or unsync when lightning-cli broadcast it.   Is there a way to refresh/rebroadcast/resync c-lightning channel statut? (tried lightning-cli dev-rescan-outputs and it does not work : the unbroadcast transaction is still there)  

---

## 1 answers

### Answer by username_1 on 2018-07-05. Score: 1

I think this is because your `lightningd` is still synchronizing with the blockchain. You can test this by looking either at the output of `lightningd` which should print things like

```
Adding block 529728: 00000000000000000024f3a1b7fa91de16ba324d8842bd7e83fb2a1d84719265

```

or you can compare the blocks count in `bitcoin-cli getblockchaininfo` and the blockheight in `lightning-cli getinfo`. If this is indeed different you will have to wait for `lightningd` to catch up with the appropriate blockheights and see the confirmation on the blockchain.

> **Comments:**
> **username_0**: They are both on the block 530588. It freeze for more than 12hr. Is there any other options or command that I can run?  
> **username_1**: Ok, can you share the full output of `listpeers` (for that specific peer)?  
> **username_1**: Ok, can you restart `lightningd` with the option `--rescan=-530500`, that will re-process the blockchain from before the funding transaction was confirmed. If possible please redirect the output to a file (`lightningd/lightningd --rescan=-530500 --log-level=debug --network=bitcoin | tee logfile` will do that).  
> **username_1**: Just don't forget to remove the `--rescan` option once you're done, otherwise you'll always re-sync from that height.  
> **username_0**: I did run a rescan from the required blockheight multiples times. With lightningd and spruned in sych to the lastest block. Did a devrescanoutput as well. the channel status is still frozen to awating lockin. I got the following error message in lightningd : lightning_channeld: Writing out status 65522: Broken pipe lightning_channeld: Writing out status 65522: Broken pipe lightning_channeld: Writing out status 65522: Broken pipe. Is there anything else I can do to unfreeze those channel?  
> **username_0**: Finally I did rollback from spruned mode. Now running a full node with c-lightning until spruned lib get fixed. I think spruned will be awesome when it work and when it's stable  

---

