Coordinator Bootstrap fails [mainnetdb/tangle.db: permission denied]
Closed this issue · 2 comments
Fredi100 commented
I was following the instructions for setting up a private tangle. When i reached the step where I had to bootstrap the coordinator, it failed due to the tangle.db file not being accessible.
Parameters loaded:
{
"coordinator": {
"address": "NJKRULRSYBV9FOATKCNFCCMEFSMRVWPWHMZARQKEOGJFZWC9WWQGGWGARMMTWRIMWAZBHEFRNMVXZ9RK9",
"checkpoints": {
"maxtrackedtails": 10000,
"maxtrackedtransactions": 10000
},
"intervalseconds": 60,
"merkletreedepth": 20,
"merkletreefilepath": "coordinator/tree",
"milestonemerkletreehashfunc": "BLAKE2b-512",
"mwm": 5,
"securitylevel": 2,
"statefilepath": "coordinator/state",
"tipsel": {
"heaviestbranchselectiondeadlinemilliseconds": 100,
"maxheaviestbranchtipspercheckpoint": 10,
"minheaviestbranchunconfirmedtransactionsthreshold": 20,
"randomtipspercheckpoint": 3
}
},
"dashboard": {
"basicauth": {
"enabled": false,
"username": ""
},
"bindaddress": "127.0.0.1:8087",
"dev": false,
"theme": "default"
},
"db": {
"debug": false,
"path": "mainnetdb"
},
"httpapi": {
"basicauth": {
"enabled": false,
"username": ""
},
"bindaddress": "127.0.0.1:14265",
"excludehealthcheckfromauth": false,
"limits": {
"bodylengthbytes": 1000000,
"findtransactions": 1000,
"gettrytes": 1000,
"requestslist": 1000
},
"permitremoteaccess": [
"getNodeInfo",
"getBalances",
"checkConsistency",
"getTipInfo",
"getTransactionsToApprove",
"getInclusionStates",
"getNodeAPIConfiguration",
"wereAddressesSpentFrom",
"broadcastTransactions",
"findTransactions",
"storeTransactions",
"getTrytes",
"attachToTangle",
"interruptAttachingToTangle"
],
"permittedroutes": [
"healthz"
],
"whitelistedaddresses": []
},
"logger": {
"disablecaller": true,
"encoding": "console",
"level": "info",
"outputpaths": [
"stdout"
]
},
"mqtt": {
"config": "mqtt_config.json"
},
"network": {
"autopeering": {
"bindaddress": "0.0.0.0:14626",
"entrynodes": [
"FvfwJuCMoWJvcJLSYww7whPxouZ9WFJ55uyxTxKxJ1ez@enter.hornet.zone:14626",
"EkSLZ4uvSTED1x6KaGzqxoGxjbytt2rPVfbJk1LRLCGL@enter.manapotion.io:18626",
"iotaMk9Rg8wWo1DDeG7fwV9iJ41hvkwFX8w6MyTQgDu@enter.thetangle.org:14627",
"12w9FrzMdDQ42aBgFrv1siHuJMhuZ4SMVHRFSS7Zb72W@entrynode.iotatoken.nl:14626",
"DboTc1v61Xdyvggj8VRszy92ScUTLgfwZaHvXsU8zr7e@entrynode.einfachiota.de:14626",
"31Tz9meznQMm7qSDUgyMmYVeHUCGA7za5Suvbom5hpE9@bender.iota.autopeering.com:14626"
],
"inboundpeers": 2,
"maxdroppedpacketspercentage": 0,
"outboundpeers": 2,
"runasentrynode": false,
"saltlifetime": 30,
"seed": ""
},
"gossip": {
"bindaddress": "0.0.0.0:15600",
"reconnectattemptintervalseconds": 60
},
"preferipv6": false
},
"node": {
"alias": "Coordinator",
"disableplugins": [],
"enableplugins": [
"Coordinator"
],
"showaliasingetnodeinfo": false
},
"peerslist": [],
"profiling": {
"bindaddress": "127.0.0.1:6060"
},
"prometheus": {
"bindaddress": "127.0.0.1:9312",
"fileservicediscovery": {
"enabled": false,
"path": "target.json",
"target": "127.0.0.1:9312"
},
"gometrics": true,
"processmetrics": true,
"promhttpmetrics": true
},
"snapshots": {
"global": {
"index": 0,
"path": "snapshot/snapshot.csv",
"spentaddressespaths": []
},
"loadtype": "global",
"local": {
"depth": 50,
"downloadurls": [
"https://ls.manapotion.io/export.bin",
"https://x-vps.com/export.bin",
"https://dbfiles.iota.org/mainnet/hornet/latest-export.bin"
],
"intervalsynced": 50,
"intervalunsynced": 1000,
"path": "snapshot/export.bin"
},
"pruning": {
"delay": 60480,
"enabled": true
}
},
"spammer": {
"address": "HORNET99INTEGRATED99SPAMMER999999999999999999999999999999999999999999999999999999",
"autostart": false,
"bundlesize": 1,
"cpumaxusage": 0.5,
"depth": 1,
"message": "Spamming with HORNET tipselect, thank you for using HORNET playbook",
"tag": "HORNET99INTEGRATED99SPAMMER99PLAYBOOK99RULES",
"tagsemilazy": "",
"tpsratelimit": 0.1,
"valuespam": false,
"workers": 0
},
"spentaddresses": {
"enabled": true
},
"tipsel": {
"belowmaxdepth": 15,
"maxdeltatxoldestrootsnapshotindextolsmi": 13,
"maxdeltatxyoungestrootsnapshotindextolsmi": 8,
"nonlazy": {
"maxapprovers": 2,
"maxreferencedtipageseconds": 3,
"retentionrulestipslimit": 20,
"spammertipsthreshold": 0
},
"semilazy": {
"maxapprovers": 2,
"maxreferencedtipageseconds": 3,
"retentionrulestipslimit": 20,
"spammertipsthreshold": 30
}
},
"useprofile": "auto",
"warpsync": {
"advancementrange": 50
},
"zmq": {
"bindaddress": "127.0.0.1:5556",
"protocol": "tcp"
}
}
peers []
maxPeers [5]
acceptAnyConnection [false]
The following plugins are enabled: Coordinator
██╗ ██╗ ██████╗ ██████╗ ███╗ ██╗███████╗████████╗
██║ ██║██╔═══██╗██╔══██╗████╗ ██║██╔════╝╚══██╔══╝
███████║██║ ██║██████╔╝██╔██╗ ██║█████╗ ██║
██╔══██║██║ ██║██╔══██╗██║╚██╗██║██╔══╝ ██║
██║ ██║╚██████╔╝██║ ██║██║ ╚████║███████╗ ██║
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝ ╚═╝
v0.5.6
2020-12-30T19:44:43Z INFO CLI Profile mode 'auto', Using profile '2gb'
2020-12-30T19:44:43Z INFO CLI Loading plugins ...
2020-12-30T19:44:43Z INFO Node Loading Plugin: CLI ... done
2020-12-30T19:44:43Z INFO Node Loading Plugin: Graceful Shutdown ... done
2020-12-30T19:44:43Z INFO Node Loading Plugin: Profiling ... done
panic: could not open new DB: open mainnetdb/tangle.db: permission denied
goroutine 1 [running]:
github.com/gohornet/hornet/pkg/model/tangle.boltDB(0x1318f53, 0x9, 0x131931f, 0x9, 0x1110160)
/__w/hornet/hornet/pkg/model/tangle/tangle.go:37 +0x105
github.com/gohornet/hornet/pkg/model/tangle.ConfigureDatabases(0x1318f53, 0x9)
/__w/hornet/hornet/pkg/model/tangle/tangle.go:45 +0x85
github.com/gohornet/hornet/plugins/database.configure(0xc0000995c0)
/__w/hornet/hornet/plugins/database/plugin.go:118 +0x92
github.com/iotaledger/hive.go/node.pluginCaller(0x110a5e0, 0x21444a0, 0xc0003cd230, 0x1, 0x1)
/github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/node/events.go:14 +0x62
github.com/iotaledger/hive.go/events.(*Event).Trigger(0xc00024ac30, 0xc0003cd230, 0x1, 0x1)
/github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/events/event.go:32 +0x10b
github.com/iotaledger/hive.go/node.(*Node).configure(0xc0005b88a0, 0xc0000dae70, 0x15, 0x16)
/github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/node/node.go:93 +0xf6
github.com/iotaledger/hive.go/node.New(0xc000487ef8, 0x1, 0x1, 0x11c0360)
/github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/node/node.go:38 +0x153
github.com/iotaledger/hive.go/node.Run(0xc000487ef8, 0x1, 0x1, 0xc00018e580)
/github/home/go/pkg/mod/github.com/iotaledger/hive.go@v0.0.0-20201016154508-2514b782563a/node/node.go:51 +0x3f
main.main()
/__w/hornet/hornet/main.go:67 +0x190
nuriel77 commented
You might have changed permissions on the mainnetdb
.
Try to run sudo chown hornet.hornet /var/lib/hornet -R
to make hornet
the owner of all the hornet related directories.
Fredi100 commented
Oh wow. I see the problem now. I was deleting the whole mainnetdb
folder instead of only its content and then recreating it with a different user. Changing the permissions did fix the problem now. Thank you very much.