<p>Everything but the last Comand looks correct. There is no command <code>channel</code> in c-lightning. In order to open a channel you need to execute</p>

<pre><code>cli/lightning-cli fundchannel id satoshi [feerate] [announce] [minconf]
  Fund channel with {id} using {satoshi} (or 'all') satoshis, at optional {feerate}. Only use outputs that have {minconf} confirmations.
</code></pre>

<p>The thing that beginners sometimes oversee is that before opening a channel with a node you need to peer with it first via the <code>connect</code> command like you did. </p>

CC BY-SA 4.0
2019-07-17T21:27:14.273Z
That was a mistake in the question, I did do fundchannel which is what gives the Unknown Peer error.  Any other tests I can do to try to figure out why this is happening?
oshirowanen
CC BY-SA 4.0
2019-07-18T07:33:38.757Z
can you post information from the logfile? (with loglevel debug?)
Rene Pickhardt
CC BY-SA 4.0
2019-07-18T15:59:37.530Z
Got it working.  I was making a noob mistake in that I did not realise that the connect address and the fundchannel address had to be the same...
oshirowanen
CC BY-SA 4.0
2019-08-03T09:25:13.637Z
Yes, that is quite a common mistake. It could also have been that between the `connect` and the `fundchannel` command the connection was lost, e.g., the remote peer closed the connection. In that case you would have had a connection on which to open a channel, but when attempting to fund the channel it'd be already gone again,
cdecker
CC BY-SA 4.0
2019-07-17T20:55:50.603Z
2019-07-17T20:55:50.603Z
Rene Pickhardt
<p>I'm trying to create a channel using c-lighting (testnet), but I keep getting an Unknown Peer error message.</p>

<ul>
<li>I used <code>cli/lightning-cli connect</code> which seemed to work fine.</li>
<li>I used <code>cli/lightning-cli listnodes</code> and I see whole bunch of nodes.</li>
<li>I used <code>cli/lightning-cli listpeers</code> and I see 1 peer.</li>
<li>I used <code>cli/lightning-cli newaddr</code> to create a new address and funded it (3 confirms so far)</li>
<li>I then try to use <code>cli/lightning-cli fundchannel</code> and I get an Unknown Peer message.</li>
</ul>

<lightning-network><testnet><core-lightning><channels>
c-lightning - Unknown Peer
oshirowanen
# c-lightning - Unknown Peer

(Asked by: username_0 on 2019-07-17)

I'm trying to create a channel using c-lighting (testnet), but I keep getting an Unknown Peer error message.

* I used `cli/lightning-cli connect` which seemed to work fine.
* I used `cli/lightning-cli listnodes` and I see whole bunch of nodes.
* I used `cli/lightning-cli listpeers` and I see 1 peer.
* I used `cli/lightning-cli newaddr` to create a new address and funded it (3 confirms so far)
* I then try to use `cli/lightning-cli fundchannel` and I get an Unknown Peer message.

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


---

## 1 answers

### Answer by username_1 on 2019-07-17. Score: 1

Everything but the last Comand looks correct. There is no command `channel` in c-lightning. In order to open a channel you need to execute

```
cli/lightning-cli fundchannel id satoshi [feerate] [announce] [minconf]
  Fund channel with {id} using {satoshi} (or 'all') satoshis, at optional {feerate}. Only use outputs that have {minconf} confirmations.

```

The thing that beginners sometimes oversee is that before opening a channel with a node you need to peer with it first via the `connect` command like you did.

> **Comments:**
> **username_0**: That was a mistake in the question, I did do fundchannel which is what gives the Unknown Peer error.  Any other tests I can do to try to figure out why this is happening?  
> **username_1**: can you post information from the logfile? (with loglevel debug?)  
> **username_0**: Got it working.  I was making a noob mistake in that I did not realise that the connect address and the fundchannel address had to be the same...  
> **username_2**: Yes, that is quite a common mistake. It could also have been that between the `connect` and the `fundchannel` command the connection was lost, e.g., the remote peer closed the connection. In that case you would have had a connection on which to open a channel, but when attempting to fund the channel it'd be already gone again,  

---

