Closed Jipok closed 4 months ago
On second run:
...
All dependencies are up to date
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
20:37:32.175 [info] Migrations already up
20:37:33.641 [notice] Application media_server exited: MediaServer.Application.start(:normal, []) returned an error: shutdown: failed to start child: MediaServer.MoviesIndex
** (EXIT) an exception was raised:
** (FunctionClauseError) no function clause matching in String.valid?/2
(elixir 1.15.7) lib/string.ex:1827: String.valid?(nil, :default)
(media_server 4.2.0) lib/media_server_web/repositories/movies.ex:3: MediaServerWeb.Repositories.Movies.get/1
(media_server 4.2.0) lib/media_server_web/repositories/movies.ex:22: MediaServerWeb.Repositories.Movies.get_all/0
(elixir 1.15.7) lib/agent/server.ex:8: Agent.Server.init/1
(stdlib 3.17.2.4) gen_server.erl:423: :gen_server.init_it/2
(stdlib 3.17.2.4) gen_server.erl:390: :gen_server.init_it/6
(stdlib 3.17.2.4) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
{"Kernel pid terminated",application_controller,"{application_start_failure,media_server,{{shutdown,{failed_to_start_child,'Elixir.MediaServer.MoviesIndex',{function_clause,[{'Elixir.String','valid?',[nil,default],[{file,\"lib/string.ex\"},{line,1827}]},{'Elixir.MediaServerWeb.Repositories.Movies',get,1,[{file,\"lib/media_server_web/repositories/movies.ex\"},{line,3}]},{'Elixir.MediaServerWeb.Repositories.Movies',get_all,0,[{file,\"lib/media_server_web/repositories/movies.ex\"},{line,22}]},{'Elixir.Agent.Server',init,1,[{file,\"lib/agent/server.ex\"},{line,8}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,423}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,226}]}]}}},{'Elixir.MediaServer.Application',start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,media_server,{{shutdown,{failed_to_start_child,'Elixir.MediaServer.MoviesIndex',{function_clause,[{'Elixir.String','valid?',[nil,default],[{file,"lib/string.ex"},{line,1827}]},{'Elixir.MediaServerWeb.Repositories.Movies',get,1,[{file,"lib/media_server_web/repositories/movies.ex"},{line,3}]},{'Elixir.MediaServerWeb.Repositories.Movies',get_all,0,[{file,"lib/media_server_web/repositories/movies.ex"},{line,22}]},{'Elixir.Agent.Server',init,1,[{file,"lib/agent/server.ex"},{line,8}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,423}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}}},{'Elixir.MediaServer.Application',start,[normal,[]]}}})
Crash dump is being written to: erl_crash.dump...done
I see that it cannot connect to the database. But I don't understand why.
In any case, why was a separate database needed in the first place? Why can't you use sqlite or an analogue. Even if you have tens of thousands of movies, sqlite should not become a bottleneck. But using postgresql makes it inconvenient for the user. Forces the use of docker/podman. And also postgresql will at one point change the database format again and since you are using the latest
, this will lead to a very inconvenient ābreakageā. Few users are able to migrate a database to a new version.
On second run:
... All dependencies are up to date psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket? 20:37:32.175 [info] Migrations already up 20:37:33.641 [notice] Application media_server exited: MediaServer.Application.start(:normal, []) returned an error: shutdown: failed to start child: MediaServer.MoviesIndex ** (EXIT) an exception was raised: ** (FunctionClauseError) no function clause matching in String.valid?/2 (elixir 1.15.7) lib/string.ex:1827: String.valid?(nil, :default) (media_server 4.2.0) lib/media_server_web/repositories/movies.ex:3: MediaServerWeb.Repositories.Movies.get/1 (media_server 4.2.0) lib/media_server_web/repositories/movies.ex:22: MediaServerWeb.Repositories.Movies.get_all/0 (elixir 1.15.7) lib/agent/server.ex:8: Agent.Server.init/1 (stdlib 3.17.2.4) gen_server.erl:423: :gen_server.init_it/2 (stdlib 3.17.2.4) gen_server.erl:390: :gen_server.init_it/6 (stdlib 3.17.2.4) proc_lib.erl:226: :proc_lib.init_p_do_apply/3 {"Kernel pid terminated",application_controller,"{application_start_failure,media_server,{{shutdown,{failed_to_start_child,'Elixir.MediaServer.MoviesIndex',{function_clause,[{'Elixir.String','valid?',[nil,default],[{file,\"lib/string.ex\"},{line,1827}]},{'Elixir.MediaServerWeb.Repositories.Movies',get,1,[{file,\"lib/media_server_web/repositories/movies.ex\"},{line,3}]},{'Elixir.MediaServerWeb.Repositories.Movies',get_all,0,[{file,\"lib/media_server_web/repositories/movies.ex\"},{line,22}]},{'Elixir.Agent.Server',init,1,[{file,\"lib/agent/server.ex\"},{line,8}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,423}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,226}]}]}}},{'Elixir.MediaServer.Application',start,[normal,[]]}}}"} Kernel pid terminated (application_controller) ({application_start_failure,media_server,{{shutdown,{failed_to_start_child,'Elixir.MediaServer.MoviesIndex',{function_clause,[{'Elixir.String','valid?',[nil,default],[{file,"lib/string.ex"},{line,1827}]},{'Elixir.MediaServerWeb.Repositories.Movies',get,1,[{file,"lib/media_server_web/repositories/movies.ex"},{line,3}]},{'Elixir.MediaServerWeb.Repositories.Movies',get_all,0,[{file,"lib/media_server_web/repositories/movies.ex"},{line,22}]},{'Elixir.Agent.Server',init,1,[{file,"lib/agent/server.ex"},{line,8}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,423}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}}},{'Elixir.MediaServer.Application',start,[normal,[]]}}}) Crash dump is being written to: erl_crash.dump...done
Hi there!
20:37:32.175 [info] Migrations already up
means your database connection is all good
(media_server 4.2.0) lib/media_server_web/repositories/movies.ex:3: MediaServerWeb.Repositories.Movies.get/1
This is attempting to setup your movie index by reaching out to your configured Radarr, which I can see you have commented out in your docker-compose.yaml
?
Both Radarr and Sonarr are required for Midarr to run. Do you have these up and running too?
I see that it cannot connect to the database. But I don't understand why.
In any case, why was a separate database needed in the first place? Why can't you use sqlite or an analogue. Even if you have tens of thousands of movies, sqlite should not become a bottleneck. But using postgresql makes it inconvenient for the user. Forces the use of docker/podman. And also postgresql will at one point change the database format again and since you are using the
latest
, this will lead to a very inconvenient ābreakageā. Few users are able to migrate a database to a new version.
https://github.com/midarrlabs/midarr-server/issues?q=is%3Aissue+is%3Aclosed+sqlite
A few reference issues linked above for context. Midarr did support sqlite at an earlier stage, however now only supports postgres.
Both Radarr and Sonarr are required for Midarr to run. Do you have these up and running too?
Apparently I misunderstood the purpose of the project. I have a lot of movies/series on my hard drive. I wanted to make a web interface with a player. Midarr is not suitable for this?
Unfortunately no sorry. Radarr and Sonarr are required.
If I start empty Radarr and Sonarr, will I be able to display my local library?
My docker-compose.yaml:
Error on
podman-compose up
:Full log: https://snips.sh/f/vj0aO9FoVJ
Images: