<p>Make sure you are using the right <a href="https://github.com/input-output-hk/cardano-db-sync/blob/master/config/mainnet-config.yaml" rel="nofollow noreferrer">config file</a>. The error is indicating that the config file you are using does not have the NetworkName parameter.</p>

CC BY-SA 4.0
2022-01-10T02:33:11.423Z
how do I determine if it is the right one? its the one that comes default with cardano-node latest release repo.
noone392
CC BY-SA 4.0
2022-01-10T02:34:14.577Z
I linked the proper one in my answer. You need the config for db-sync not cardano-node
adjuric
CC BY-SA 4.0
2022-01-10T02:41:32.383Z
thank you that was pretty dumb of me for not check for that file name ....
noone392
CC BY-SA 4.0
2022-01-10T02:03:30.940Z
2022-01-10T02:03:30.940Z
adjuric
<p>You need to use a db-sync config file, not a cardano-node one. You can get the correct configuration file for mainnet/testnet networks here: <a href="https://hydra.iohk.io/build/8111119/download/1/index.html" rel="nofollow noreferrer">https://hydra.iohk.io/build/8111119/download/1/index.html</a>. That link is found in the cardano-node release notes under <code>downloads -&gt; configuration files</code></p>

CC BY-SA 4.0
2022-01-11T04:41:47.837Z
2022-01-11T04:41:47.837Z
Samuel Leathers
<p>When following the instruction here
<a href="https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/building-running.md" rel="nofollow noreferrer">https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/building-running.md</a>
I get an error at the last line</p>
<pre><code>PGPASSFILE=config/pgpass-mainnet db-sync-node/bin/cardano-db-sync \
    --config /home/user/relay/mainnet-config.yaml \
    --socket-path /home/user/relay/node.socket \
    --state-dir /home/user/relay/db \
    --schema-dir schema/
</code></pre>
<p>the error is</p>
<pre><code>FatalError {fatalErrorMessage = &quot;readSyncNodeConfig: Error parsing config: AesonException \&quot;Error in $: key \\\&quot;NetworkName\\\&quot; not found\&quot;&quot;}
</code></pre>
<p>Any any help or direction is appreaciated. Thank you</p>

<cardano-db-sync>
cardano-db-sync error
# cardano-db-sync error

(Asked by: username_0 on 2022-01-09)

When following the instruction here
https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/building-running.md
I get an error at the last line
PGPASSFILE=config/pgpass-mainnet db-sync-node/bin/cardano-db-sync \
    --config /home/user/relay/mainnet-config.yaml \
    --socket-path /home/user/relay/node.socket \
    --state-dir /home/user/relay/db \
    --schema-dir schema/

the error is
FatalError {fatalErrorMessage = "readSyncNodeConfig: Error parsing config: AesonException \"Error in $: key \\\"NetworkName\\\" not found\""}

Any any help or direction is appreaciated. Thank you

**Tags:** cardano-db-sync

---

## 2 answers

### Answer by username_1 on 2022-01-10. Score: 3 | Accepted answer

Make sure you are using the right [config file](https://github.com/input-output-hk/cardano-db-sync/blob/master/config/mainnet-config.yaml). The error is indicating that the config file you are using does not have the NetworkName parameter.

> **Comments:**
> **username_0**: how do I determine if it is the right one? its the one that comes default with cardano-node latest release repo.  
> **username_1**: I linked the proper one in my answer. You need the config for db-sync not cardano-node  
> **username_0**: thank you that was pretty dumb of me for not check for that file name ....  

---

### Answer by username_2 on 2022-01-11. Score: 1

You need to use a db-sync config file, not a cardano-node one. You can get the correct configuration file for mainnet/testnet networks here: <https://hydra.iohk.io/build/8111119/download/1/index.html>. That link is found in the cardano-node release notes under `downloads -> configuration files`


---

