lightning-cli listnodes is empty. Am I missing something? I want the result of listnodes like the following. How can I do that?

{ "nodes" : 
    [ 
        { "nodeid" : "028e5a8e86540f703e1f58880d35d1e318a54c27d84ec1edbcde04a78ed4469a1e", "alias" : "???? EXANTE", "color" : "007f39", "last_timestamp" : 1516636793, "addresses" : 
            [ 
                { "type" : "ipv4", "address" : "148.251.53.235", "port" : 9735 } ] },


https://gist.github.com/coinables/19223b8bf09a24a3a6e8240433df04bf

This is what I did:


Installed c-lightning referring to https://github.com/ElementsProject/lightning/blob/master/doc/INSTALL.md#to-build-on-ubuntu
Add config file as the followings.
Open firewall for port 9735
Check netstat. but 9735 is NOT listing. ("netstat -anp | grep 9735" is empty)


$ cat ~/.lightning/config
alias=xxx
rgb=008000
network=bitcoin
bitcoin-rpcuser=xxx
bitcoin-rpcpassword=xxx
bitcoin-rpcconnect=xxx
bitcoin-rpcport=xxx
announce-addr=xxx:9735
log-level=debug

$ ./cli/lightning-cli getinfo
{
  "id": "xxx",
  "alias": "xxx",
  "color": "008000",
  "num_peers": 0,
  "num_pending_channels": 0,
  "num_active_channels": 0,
  "num_inactive_channels": 0,
  "address": [
    {
      "type": "ipv4",
      "address": "xxx",
      "port": 9735
    }
  ],
  "binding": [
  ],
  "version": "v0.7.0-41-g1cd0ae1",
  "blockheight": 567741,
  "network": "bitcoin",
  "msatoshi_fees_collected": 0,
  "fees_collected_msat": "0msat"
}

$ ./cli/lightning-cli listnodes
{
  "nodes": [
  ]
}
In order for list nodes to provide some output you need to first connect to at least one peer on the network. Because the peer is giving you all the information from the gossip protocol about announced nodes and announced channels.

So do lightning-cli connect 03efccf2c383d7bf340da9a3f02e2c23104a0e4fe8ac1a880c8e2dc92fbdacd9df@144.76.235.20:9735 to peer with my node. 

In case I change my node in the future you can try any node from a node explorer or find the address of my node at https://ln.rene-pickhardt.de

Also keep in mind that syncing the network over gossip takes some time (currently a couple of seconds) after you connected so you should not call list nodes right away.