# CNTools, core node starts as relay

**URL:** <https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555>\
**Category:** Setup a Stake Pool\
**Created:** [3 December 2021 10:24 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555 "2021-12-03T10:24:06Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Huga\_Ligen](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/huga_ligen/32/47063_2.png) [@Huga\_Ligen](https://forum.cardano.org/u/Huga_Ligen)\
**Post date:** [3 December 2021 10:24 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/1 "2021-12-03T10:24:06Z")

</div>

I just can’t get my core node to start as a core node, it starts as relay no matter what I do.

env -file:  
seems OK I have only uncommented the POOL\_NAME and CNODE\_PORT  
CNTools:  
Works, I can view pool and wallet and submit transactions.  
I do get warning about KES keys are out of date every time I start it. I have rotated keys but still is like this.

systemctl status cnode:  
Shows that the node is started as relay (no args for keys) So I guess the cnode.sh cannot find my keys.  
But all pool keys are in /opt/cardano/cnode/priv/pool/Sigma\_Stake/ with correct permissions and owner.

I saw something strange in the env script:

```auto
[[-z ${POOL_FOLDER}]] && POOL_FOLDER="${CNODE_HOME}/priv/pool"
[[-z ${POOL_NAME}]] && POOL_NAME="CHANGE_ME"
[[-z ${POOL_DIR}]] && POOL_DIR="${POOL_FOLDER}/${POOL_NAME}"

```

Why does it say “CHANGE\_ME”??  
I edited the toppologyupdater script for the relay from “CHANGE\_ME” to “Sigma\_Stake” but the core should not even use this script?

So confused by now why it’s not working. It shows up on [ADATools.io](https://testnet.adatools.io/pools)

_EDIT_  
I get the [[-z ${POOL\_NAME}]] && POOL\_NAME=“CHANGE\_ME” now.  
and when I run sLiveView it says that the name is indeed CHANGE\_ME so it seems that the default is used even though I changed POOL\_NAME in the env file. I am not using the default port for CNODE\_PORT, so that is apparently working but not the POOL\_NAME …

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [3 December 2021 10:31 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/2 "2021-12-03T10:31:52Z")

</div>

> [@Huga\_Ligen](#):
>
> ems OK I have only uncommented the POOL\_NAME and CNODE\_PORT  
> CNTools:

hi,  
the pool name from env it is case sensitive so  
go to cd $CNODE\_HOME/priv/pool and type ls -l  
then copy the folder name and paste it to pool name inside the env file (and don’t forget to uncomment the line - delete # from the beginning)

Cheers,

---

<div class="post-metadata">

**Author:** ![Huga\_Ligen](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/huga_ligen/32/47063_2.png) [@Huga\_Ligen](https://forum.cardano.org/u/Huga_Ligen)\
**Post date:** [3 December 2021 10:38 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/3 "2021-12-03T10:38:41Z")

</div>

Thank you for reply, but I think that is already as it should be?  
The folder is:

```auto
/opt/cardano/cnode/priv/pool/Sigma_Stake

```

and in the env script:  
`POOL_NAME="Sigma_Stake"`

The folder was generated by CNTools when I created the pool I think?

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [3 December 2021 10:40 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/4 "2021-12-03T10:40:12Z")

</div>

yes the folder was generated auto by cntools, now how it looks the node in gLiveView? can u share the output? is it 100% synced?

---

<div class="post-metadata">

**Author:** ![Huga\_Ligen](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/huga_ligen/32/47063_2.png) [@Huga\_Ligen](https://forum.cardano.org/u/Huga_Ligen)\
**Post date:** [3 December 2021 10:44 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/5 "2021-12-03T10:44:01Z")

</div>

Both relay and core are synched.  
 ![Untitled](https://us1.discourse-cdn.com/flex023/uploads/cardano/original/3X/f/8/f84733598c764400ee2a70eae64b28546a6c3d5c.png)

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [3 December 2021 10:47 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/6 "2021-12-03T10:47:58Z")

</div>

journalctl -e -f -u cnode

do you see any errors?  
also can u share the files located inside the Sigma\_Stake folder?

---

<div class="post-metadata">

**Author:** ![Huga\_Ligen](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/huga_ligen/32/47063_2.png) [@Huga\_Ligen](https://forum.cardano.org/u/Huga_Ligen)\
**Post date:** [3 December 2021 10:52 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/7 "2021-12-03T10:52:44Z")

</div>

No errors, see entry for latest restart:

```auto
Dec 03 10:41:08 core systemd[1]: cnode.service: Failed with result 'signal'.
Dec 03 10:41:08 core systemd[1]: Stopped Cardano Node.
Dec 03 10:41:08 core systemd[1]: Started Cardano Node.
Dec 03 10:41:09 core cnode[2974448]: WARN: A prior running Cardano node was not cleanly shutdown, socket file still exists. Cleaning up.
Dec 03 10:41:10 core cnode[2974599]: Node configuration: NodeConfiguration {ncNodeIPv4Addr = Just 0.0.0.0, ncNodeIPv6Addr = Nothing, ncNodePortNumber = Just 3099, ncConfigFile = "/opt/cardano/cnode/files/config.json", ncTopologyFile = "/opt/cardano/cnode/files/topology.json", ncDatabaseFile = "/opt/cardano/cnode/db", ncProtocolFiles = ProtocolFilepaths {byronCertFile = Nothing, byronKeyFile = Nothing, shelleyKESFile = Nothing, shelleyVRFFile = Nothing, shelleyCertFile = Nothing, shelleyBulkCredsFile = Nothing}, ncValidateDB = False, ncShutdownIPC = Nothing, ncShutdownOnSlotSynced = NoMaxSlotNo, ncProtocolConfig = NodeProtocolConfigurationCardano (NodeByronProtocolConfiguration {npcByronGenesisFile = "/opt/cardano/cnode/files/byron-genesis.json", npcByronGenesisFileHash = Nothing, npcByronReqNetworkMagic = RequiresMagic, npcByronPbftSignatureThresh = Nothing, npcByronApplicationName = ApplicationName {unApplicationName = "cardano-sl"}, npcByronApplicationVersion = 1, npcByronSupportedProtocolVersionMajor = 3, npcByronSupportedProtocolVersionMinor = 0, npcByronSupportedProtocolVersionAlt = 0}) (NodeShelleyProtocolConfiguration {npcShelleyGenesisFile = "/opt/cardano/cnode/files/shelley-genesis.json", npcShelleyGenesisFileHash = Nothing}) (NodeAlonzoProtocolConfiguration {npcAlonzoGenesisFile = "/opt/cardano/cnode/files/alonzo-genesis.json", npcAlonzoGenesisFileHash = Nothing}) (NodeHardForkProtocolConfiguration {npcTestEnableDevelopmentHardForkEras = False, npcTestShelleyHardForkAtEpoch = Nothing, npcTestShelleyHardForkAtVersion = Nothing, npcTestAllegraHardForkAtEpoch = Nothing, npcTestAllegraHardForkAtVersion = Nothing, npcTestMaryHardForkAtEpoch = Nothing, npcTestMaryHardForkAtVersion = Nothing, npcTestAlonzoHardForkAtEpoch = Nothing, npcTestAlonzoHardForkAtVersion = Nothing}), ncSocketPath = Just "/opt/cardano/cnode/sockets/node0.socket", ncDiffusionMode = InitiatorAndResponderDiffusionMode, ncSnapshotInterval = DefaultSnapshotInterval, ncTestEnableDevelopmentNetworkProtocols = False, ncMaxConcurrencyBulkSync = Nothing, ncMaxConcurrencyDeadline = Listening on http://127.0.0.1:12798

```

---

<div class="post-metadata">

**Author:** ![Huga\_Ligen](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/huga_ligen/32/47063_2.png) [@Huga\_Ligen](https://forum.cardano.org/u/Huga_Ligen)\
**Post date:** [3 December 2021 11:01 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/8 "2021-12-03T11:01:07Z")

</div>

Oh and files:

```auto
/opt/cardano/cnode/priv/pool/Sigma_Stake$ ls -a
. .. cold.vkey hot.skey hot.vkey kes.start op.cert pool.cert pool.config pool.id pool.id-bech32 poolmeta.json vrf.vkey

```

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [3 December 2021 11:05 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/9 "2021-12-03T11:05:26Z")

</div>

I can’t see the vrf.skey file

the node (to work as a Producer) should have:

- hot.skey
- vrf.skey
- op.cert

If you will copy it from other device don’t forget to change the permision  
chmod 400 vrf.skey

---

<div class="post-metadata">

**Author:** ![Huga\_Ligen](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/huga_ligen/32/47063_2.png) [@Huga\_Ligen](https://forum.cardano.org/u/Huga_Ligen)\
**Post date:** [3 December 2021 11:16 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/10 "2021-12-03T11:16:06Z")

</div>

Aha OK, so you need that secret key too. I will try that. I setup in offline mode and used the backup/restore but it only backed up my wallet keys. So I copied the pool keys manually to USB and moved to my core machine `{hot.vkey,hot.skey,op.cert,kes.start,cold.vkey,vrf.vkey}` I will add vrf.skey too, is that enough? I want to expose as few keys as I can.

---

<div class="post-metadata">

**Author:** ![Huga\_Ligen](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/huga_ligen/32/47063_2.png) [@Huga\_Ligen](https://forum.cardano.org/u/Huga_Ligen)\
**Post date:** [3 December 2021 11:28 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/11 "2021-12-03T11:28:24Z")

</div>

YES! Thank you so much! Working now, could not figure this out since there was no error or warning about that file missing. Good thing I started on testnet and not mainnet 😆

PS  
I had to do chown too for the file, before I did the service would not start  
DS

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [3 December 2021 11:30 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/12 "2021-12-03T11:30:32Z")

</div>

> [@Huga\_Ligen](#):
>
> t secret key

you are welcome

PS: if the node can find those 3 files it will not start as a Producer and also it will not generate errors.

Glade it’s working now

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [3 December 2021 11:36 UTC](https://forum.cardano.org/t/cntools-core-node-starts-as-relay/87555/13 "2021-12-03T11:36:48Z")

</div>

> [@Huga\_Ligen](#):
>
> will add vrf.skey too, is that enough? I want to expose as few keys as I can.

U will need only those 3 files on your live Producer
