Cardano-node: Missing protocolMagicId


Someone to know how to fix this problem?


What is the content of mainnet-config.json?

This is the content

Do you have the three genesis file downloaded and placed into /home/cardano/cnode/config folder? Cardano Configurations

I only have 2 for mainnet and 2 for testnet

But you’re using none of those for --config parameter value. You could also simplify the command line by suppressing the path prefix for files in current directory, or by using relative paths. The simpler the command line, the easier it is to read and pinpoint issues…

Let’s say your current and home directory is /home/cardano then instead of using /home/cardano/config/file you could simply use ./config/file or even config/file. That’s one of the points of the URL I sent you. In every Linux directory you will find at least 2 files (well directories but on UNIX everything is a file), one is `.’ (means current directory) and the other is `..’ (means parent directory).

1 Like

yes, so the path of the config file in your command is faulty, that is the correct one:
cardano-node run --topology /home/cardano/cnode/config/mainnet-topology.json --database-path /home/cardano/cnode/db --socket-path /home/cardano/cnode/sockets/node.socket --host-addr --port 3001 --config /home/cardano/relay/config/mainnet-config.json
or if you change the current directory to /home/cardano/cnode/db by cd /home/cardano/cnode command, then you leave that path from the command as @raph_cardano suggested:
cardano-node run --topology config/mainnet-topology.json --database-path db --socket-path sockets/node.socket --host-addr --port 3001 --config config/mainnet-config.json

cardano-node run --topology /home/cardano/cnode/config/mainnet-topology.json --database-path /home/cardano/cnode/db --socket-path /home/cardano/cnode/sockets/node.socket --host-addr --port 3001 --config /home/cardano/cnode/config/mainnet-config.json

The screenshot is wrong, later I fixed that

This was my command, I think it’s ok, I have the config file in /home/cardano/cnode/config/mainnet-config.json

but still giving me protocolmagicid error

So then download the alonsoGenesis json file into config folder and start again…

I installed alonzo genesis mainnet and testnet but still giving me protocolmagicid error

1 Like

In the documentation there are 1 file that I don’t know if I used or not

so, please remove everything from db folder again, and start again:
rm -rf /home/cardano/cnode/db/* if does not help then maybe you will create that file manually…

now something changed but still giving me error I think

Let me guess, new topic?

wow - that is an error indeed - what is the content of the db folder now?
ls -la /home/cardano/cnode/db/

total 8
drwxrwxr-x 2 cardano cardano 4096 jun 1 14:34 .
drwxrwxr-x 8 cardano cardano 4096 may 27 17:29 …
this is the content

hmm cardano user is the owner of folder, but your user is is alberto…
I think time to remove the db folder itself:
sudo rm -rf /home/cardano/cnode/db
then create it again
mkdir /home/cardano/cnode/db
then check the owner - should be alberto - ls -la /home/cardano/cnode/db

if yes, start again

I get permission denied all the time, is there any way to remove the permissions and not have to put sudo su to modify the cardano folder?

total 8
drwxr-xr-x 2 root root 4096 jun 1 14:50 .
drwxrwxr-x 8 cardano cardano 4096 jun 1 14:50 …

The owner it’s not alberto

yes - I dont know where this cardano user came from, but you can modify the ownership the folder by:
sudo chown -R alberto:alberto /home/cardano/cnode


just realized then you are operating everything in home folder of cardano user… probably better to switch the user to cardano from alberto!

1 Like

RUNNING! thank you very much

Now I have some questions, the port will always be 3001? and which host should I put to launch a token to the mainnet?

How can I stop the node?

Thanks for the help it is really much appreciated, cardano has a good community