I have an umbrella application and I can’t seem to find a way to start it (it’s not mine, I’m just working on it)
If I try to run the phoenix app inside it or try to run migrations I’ve got the following error:
[error] GenServer #PID<0.1165.0> terminating
** (CaseClauseError) no case clause matching: [10, 4, 4, 18, 4]
(postgrex) lib/postgrex/utils.ex:69: Postgrex.Utils.parse_version/1
(postgrex) lib/postgrex/protocol.ex:641: Postgrex.Protocol.bootstrap_send/6
(postgrex) lib/postgrex/protocol.ex:475: Postgrex.Protocol.handshake/2
(db_connection) lib/db_connection/connection.ex:134: DBConnection.Connection.connect/2
(connection) lib/connection.ex:622: Connection.enter_connect/5
(stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
It seems like it can’t connect to the database but the config is the same as in one of my working app (only the db name is different).
If I try to take a look in iex I’ve got a different error:
** (Mix) Could not start application logger: Logger.App.start(:normal, []) returned an error: shutdown: failed to start child: Logger.WatcherSupervisor
** (EXIT) an exception was raised:
** (MatchError) no match of right hand side value: {:error, {{{:case_clause, {:EXIT, {:undef, [{LoggerFileBackend, :init, [{LoggerFileBackend, :error_log}], []}, {:gen_event, :server_add_handler, 4, [file: 'gen_event.erl', line: 473]}, {:gen_event, :handle_msg, 6, [file: 'gen_event.erl', line: 318]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}}, [{Logger.Watcher, :init, 1, [file: 'lib/logger/watcher.ex', line: 28]}, {: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]}]}, {:child, :undefined, {Logger.WatcherSupervisor, {Logger, {LoggerFileBackend, :error_log}}}, {Logger.Watcher, :start_link, [{Logger, {LoggerFileBackend, :error_log}, {LoggerFileBackend, :error_log}}]}, :transient, 5000, :worker, [Logger.Watcher]}}}
(logger) lib/logger/watcher_supervisor.ex:14: anonymous fn/2 in Logger.WatcherSupervisor.start_link/1
(elixir) lib/enum.ex:1925: Enum."-reduce/3-lists^foldl/2-0-"/3
(logger) lib/logger/watcher_supervisor.ex:13: Logger.WatcherSupervisor.start_link/1
(stdlib) supervisor.erl:379: :supervisor.do_start_child_i/3
(stdlib) supervisor.erl:365: :supervisor.do_start_child/2
(stdlib) supervisor.erl:349: anonymous fn/3 in :supervisor.start_children/2
(stdlib) supervisor.erl:1157: :supervisor.children_map/4
(stdlib) supervisor.erl:315: :supervisor.init_children/2
I’m using Elixir 1.7.1 with OTP 21 if it matters.