An error was reported when I started the aeternitry program for the first time

An error was reported when I started the aeternitry program for the first time

Not allowed to write in Mnesia dir”,"/home/aeternity/node/data/mnesia

os : ubuntu 18.04

[email protected]:~# docker run -p 3013:3013 -p 3015:3015 -v ~/.aeternity/maindb:/home/aeternity/node/data/mnesia aeternity/aeternity
Exec: /home/aeternity/node/erts-10.7.2.3/bin/erlexec -boot /home/aeternity/node/releases/5.9.1/aeternity -mode embedded -boot_var SYSTEM_LIB_DIR /home/aeternity/node/lib -config /home/aeternity/node/releases/5.9.1/sys.config -args_file /home/aeternity/node/releases/5.9.1/vm.args – console -noinput
Root: /home/aeternity/node
/home/aeternity/node
06:54:40.000 [info] Setup running …
06:54:40.005 [info] Directories verified. Res = ok
06:54:40.005 [info] Setup phase 100
06:54:40.005 [info] Searching for config file aeternity.{json,yaml} in directory /home/aeternity/.aeternity/aeternity
06:54:40.006 [info] Searching for config file aeternity.{json,yaml} in directory /home/aeternity/node
06:54:40.006 [info] Searching for config file epoch.{json,yaml} in directory /home/aeternity/.epoch/epoch
06:54:40.007 [info] Searching for config file epoch.{json,yaml} in directory /home/aeternity/node
06:54:40.007 [info] No config file specified; using default settings
06:54:40.007 [info] aeu_env:read_config()-> ok
06:54:40.007 [info] Setup phase 101
06:54:40.012 [info] OS env config:
06:54:40.012 [info] Map fr OS env config: #{}
06:54:40.012 [info] aeu_env:apply_os_env()-> no_change
06:54:40.012 [info] Setup phase 110
06:54:40.013 [info] aecore_app:check_env()-> ok
06:54:40.013 [info] aec_dev_reward:ensure_env()-> ok
06:54:40.014 [info] aehttp_app:check_env()-> ok
06:54:40.014 [info] aec_consensus:check_env()-> ok
06:54:40.014 [info] aec_hard_forks:ensure_env()-> ok
06:54:40.014 [info] aec_mining:check_env()-> ok
06:54:40.014 [info] Setup phase 200
06:54:40.017 [error] CAUGHT error:{case_clause,{error,“Not allowed to write in Mnesia dir”,"/home/aeternity/node/data/mnesia"}} / [{mnesia_bup,create_schema,3,[{file,“mnesia_bup.erl”},{line,361}]},{aec_db,ensure_schema_storage_mode,1,[{file,"/app/apps/aecore/src/aec_db.erl"},{line,1133}]},{aec_db,check_db,0,[{file,"/app/apps/aecore/src/aec_db.erl"},{line,1005}]},{setup,’-try_apply/4-fun-0-’,3,[{file,"/app/_build/default/lib/setup/src/setup.erl"},{line,1128}]}]
06:54:40.017 [error] aec_db:check_db()-> ERROR: {case_clause,{error,“Not allowed to write in Mnesia dir”,"/home/aeternity/node/data/mnesia"}}

06:54:40.018 [error] Abort on error is set. Terminating sequence
06:54:40.018 [error] Caught exception:
{case_clause,{error,“Not allowed to write in Mnesia dir”,"/home/aeternity/node/data/mnesia"}}
[{setup,try_apply,4,[{file,"/app/build/default/lib/setup/src/setup.erl"},{line,1144}]},{lists,foreach,2,[{file,“lists.erl”},{line,1338}]},{setup,run_setup,0,[{file,"/app/_build/default/lib/setup/src/setup.erl"},{line,957}]},{setup,run_setup,0,[{file,"/app/_build/default/lib/setup/src/setup.erl"},{line,939}]},{setup_srv,handle_call,3,[{file,"/app/_build/default/lib/setup/src/setup_srv.erl"},{line,42}]},{gen_server,try_handle_call,4,[{file,“gen_server.erl”},{line,661}]},{gen_server,handle_msg,6,[{file,“gen_server.erl”},{line,690}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,249}]}]
06:54:40.018 [error] gen_server setup_srv terminated with reason: no case clause matching {error,“Notallowed to write in Mnesia dir”,"/home/aeternity/node/data/mnesia"} in setup:run_setup/0 line 946
06:54:40.018 [error] CRASH REPORT Process setup_srv with 0 neighbours crashed with reason: no case clause matching {error,“Not allowed to write in Mnesia dir”,"/home/aeternity/node/data/mnesia"} in setup:run_setup/0 line 946
06:54:40.018 [error] Supervisor setup_sup had child setup_srv started with setup_srv:start_link() at <0.1320.0> exit with reason no case clause matching {error,“Not allowed to write in Mnesia dir”,"/home/aeternity/node/data/mnesia"} in setup:run_setup/0 line 946 in context child_terminated
06:54:40.019 [error] CRASH REPORT Process <0.1317.0> with 0 neighbours exited with reason: bad returnvalue: {{setup_app,start_phase,[run_setup,normal,]},{‘EXIT’,{{{case_clause,{error,“Not allowed to write in Mnesia dir”,"/home/aeternity/node/data/mnesia"}},[{setup,run_setup,0,[{file,"/app/_build/default/lib/setup/src/setup.erl"},{line,946}]},{setup_srv,handle_call,3,[{file,"/app/_build/default/lib/setup/src/setup_srv.erl"},{line,42}]},{gen_server,try_handle_call,4,[{file,“gen_server.erl”},{line,661}]},{gen_server,handle_msg,6,[{file,“gen_server.erl”},{line,690}]},{proc_lib,init_p_do_apply,3,[{…},…]}]},…}}} in application_master:init/4 line 138
06:54:40.019 [info] Application setup exited with reason: bad return value: {{setup_app,start_phase,[run_setup,normal,]},{‘EXIT’,{{{case_clause,{error,“Not allowed to write in Mnesia dir”,"/home/aeternity/node/data/mnesia"}},[{setup,run_setup,0,[{file,"/app/_build/default/lib/setup/src/setup.erl"},{line,946}]},{setup_srv,handle_call,3,[{file,"/app/_build/default/lib/setup/src/setup_srv.erl"},{line,42}]},{gen_server,try_handle_call,4,[{file,“gen_server.erl”},{line,661}]},{gen_server,handle_msg,6,[{file,“gen_server.erl”},{line,690}]},{proc_lib,init_p_do_apply,3,[{…},…]}]},…}}}
{“Kernel pid terminated”,application_controller,"{application_start_failure,setup,{bad_return_value,{{setup_app,start_phase,[run_setup,normal,Kernel pid terminated (application_controller) ({application_start_failure,setup,{bad_return_value,{{setup_app,start_phase,[run_setup,normal,]},{‘EXIT’,{{{case_clause,{error,“Not allowed to write in
]},{‘EXIT’,{{{case_clause,{error,“Not allowed to write in Mnesia dir”,”/home/aeternity/node/data/mnesia"}},[{setup,run_setup,0,[{file,"/app/_build/default/lib/setup/src/setup.erl"},{line,946}]},{setup_srv,handle_call,3,[{file,"/app/_build/default/lib/setup/src/setup_srv.erl"},{line,42}]},{gen_server,try_handle_call,4,[{file,“gen_server.erl”},{line,661}]},{gen_server,handle_msg,6,[{file,“gen_server.erl”},{line,690}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,249}]}]},{gen_server,call,[setup_srv,run_setup,infinity]}}}}}}"}

Crash dump is being written to: erl_crash.dump…done

Try giving writing permissions on that folder, maybe there is some more elegant solution @dimitar.chain @gorbak25 ?

Looks like it, maybe @dincho.chain can also help

this happened to me also by following the exact guide for ubuntu, so maybe there is some step we are missing or worth mentioning, my reputation precedes me and I did chmod 777 which I know is as bad as doing sudo su for everything :smiley: (don’t do it)

2 Likes

try sudo chown -R 1000:1000 ~/.aeternity/maindb to fix the permissions for the db folder

3 Likes

thanks @philipp.chain , it‘s working

1 Like

How do we integrate this to the node installation guide @philipp.chain ?

1 Like