Not able to run phx server

I’m getting this error when I try to run server

Application tzdata exited: exited in: Tzdata.App.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (MatchError) no match of right hand side value: {:error, {:shutdown, {:failed_to_start_child, Tzdata.EtsHolder, {:function_clause, [{String, :replace, [nil, ".v2.ets", "", []], [file: 'lib/string.ex', line: 1410]}, {Tzdata.EtsHolder, :load_release, 0, [file: 'lib/tzdata/ets_holder.ex', line: 55]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 374]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 342]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}}}
            (tzdata 1.0.3) lib/tzdata/tzdata_app.ex:17: Tzdata.App.start/2
            (kernel 6.5.2) application_master.erl:277: :application_master.start_it_old/4
** (Mix) Could not start application tzdata: exited in: Tzdata.App.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (MatchError) no match of right hand side value: {:error, {:shutdown, {:failed_to_start_child, Tzdata.EtsHolder, {:function_clause, [{String, :replace, [nil, ".v2.ets", "", []], [file: 'lib/string.ex', line: 1410]}, {Tzdata.EtsHolder, :load_release, 0, [file: 'lib/tzdata/ets_holder.ex', line: 55]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 374]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 342]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}}}
            (tzdata 1.0.3) lib/tzdata/tzdata_app.ex:17: Tzdata.App.start/2
            (kernel 6.5.2) application_master.erl:277: :application_master.start_it_old/4

I tried killing running beam which was running but didn’t work

This might be a long shot but have you tried updating the library?

Additionally, fully rebuild your app: rm -rf _build deps && mix compile and see if that fixes it.

I’m also getting the same error. Is it because there is already elixir server pid is running. I don’t know what is causing this

Please suggest anything

Tried another Erlang version?

rm -rf _build deps && mix compile apparently this works. But I have to do it two-three times. I want to know how the error lead to this?

Might be related to some small compilation bugs in OTP 22 that might have been fixed in the meantime.

Did you try with OTP 23?

This is it

Erlang/OTP 22 [erts-10.7.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe] [dtrace]

Elixir 1.10.3 (compiled with Erlang/OTP 21)

This is likely not at all related but have you noticed that you installed an Elixir compiled with OTP 21 while you have OTP 22 installed? No biggie but you’re missing out on some functionality. :stuck_out_tongue:

If you can afford it, just upgrade to OTP 23.0.2 and then install Elixir 1.10.3 (compiled with OTP 23!), and then try again.

3 Likes