Comments (10)
Would it be possible to have the postgresql-data volume follow my current mappings and be stored in
/srv/midarr/data
?
And how would I integrate mydocker-network
in the compose file?
I was able to achieve this by using the following docker-compose.yml edited to better fit the others I have.
version: "3.7"
services:
midarr:
container_name: midarr
image: ghcr.io/midarrlabs/midarr-server:latest
ports:
- "4000:4000"
environment:
- APP_URL=http://midarr:4000
- DB_USERNAME=my_user
- DB_PASSWORD=my_password
- DB_DATABASE=my_database
- DB_HOSTNAME=postgresql
- [email protected]
- SETUP_ADMIN_NAME=admin
- SETUP_ADMIN_PASSWORD=somepassword
- RADARR_BASE_URL=radarr:7878
- RADARR_API_KEY=d90f102c62b44fd8adf37f5a9870f123
- SONARR_BASE_URL=sonarr:8989
- SONARR_API_KEY=270f828df52441e8b209a7a1118c0123
volumes:
- /home/danny/storage/media/library:/media/library
networks:
- docker-network
depends_on:
postgresql:
condition: service_healthy
postgresql:
container_name: postgresql
image: postgres
environment:
- POSTGRES_USER=my_user
- POSTGRES_PASSWORD=my_password
- POSTGRES_DB=my_database
volumes:
- /srv/midarr/appdata:/var/lib/postgresql/data
networks:
- docker-network
healthcheck:
test: "exit 0"
networks:
docker-network:
external: true
After running docker system prune -a
and then recreating the container from scratch everything works as expected :) (love the UI so far <3)
After taking a more in depth look at the error logs I was experiencing previously and then taking into account the compose file you provided (mentioning that both radarr and sonarr data is required) I can confidently say that this was user error on my part. I only included the radarr API key and deleted the parts mentioning sonarr.
Here are the full logs from back when I was experiencing the issue:
[+] Running 2/1
✔ Container postgresql Created 0.1s
✔ Container midarr Created 0.0s
Attaching to midarr, postgresql
postgresql |
postgresql | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgresql |
postgresql |
postgresql | 2023-09-01 12:33:08.012 UTC [1] LOG: starting PostgreSQL 15.4 (Debian 15.4-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
postgresql | 2023-09-01 12:33:08.012 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
postgresql | 2023-09-01 12:33:08.013 UTC [1] LOG: listening on IPv6 address "::", port 5432
postgresql | 2023-09-01 12:33:08.015 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgresql | 2023-09-01 12:33:08.020 UTC [28] LOG: database system was shut down at 2023-09-01 10:42:08 UTC
postgresql | 2023-09-01 12:33:08.028 UTC [1] LOG: database system is ready to accept connections
midarr | Resolving Hex dependencies...
midarr | Resolution completed in 0.467s
midarr | Unchanged:
midarr | bcrypt_elixir 3.0.1
midarr | castore 1.0.3
midarr | certifi 2.9.0
midarr | comeonin 5.3.3
midarr | cors_plug 3.0.3
midarr | cowboy 2.10.0
midarr | cowboy_telemetry 0.4.0
midarr | cowlib 2.12.1
midarr | db_connection 2.5.0
midarr | decimal 2.1.1
midarr | ecto 3.10.1
midarr | ecto_sql 3.10.1
midarr | elixir_make 0.7.6
midarr | esbuild 0.7.1
midarr | excoveralls 0.17.0
midarr | exile 0.1.0
midarr | expo 0.4.1
midarr | exstream 0.20.0
midarr | extaima 0.3.0
midarr | extitles 0.1.0
midarr | file_system 0.2.10
midarr | floki 0.34.3
midarr | gettext 0.23.0
midarr | hackney 1.18.1
midarr | httpoison 2.1.0
midarr | idna 6.1.1
midarr | jason 1.4.1
midarr | metrics 1.0.1
midarr | mime 2.0.5
midarr | mimerl 1.2.0
midarr | oauth2 2.1.0
midarr | parse_trans 3.3.1
midarr | phoenix 1.7.7
midarr | phoenix_ecto 4.4.2
midarr | phoenix_html 3.3.2
midarr | phoenix_live_dashboard 0.7.2
midarr | phoenix_live_reload 1.4.1
midarr | phoenix_live_view 0.18.18
midarr | phoenix_pubsub 2.1.3
midarr | phoenix_template 1.0.2
midarr | phoenix_view 2.0.2
midarr | plug 1.14.2
midarr | plug_cowboy 2.6.1
midarr | plug_crypto 1.2.5
midarr | postgrex 0.17.2
midarr | ranch 1.8.0
midarr | scrivener 2.7.2
midarr | ssl_verify_fun 1.1.7
midarr | swoosh 1.11.5
midarr | tailwind 0.2.1
midarr | telemetry 1.2.1
midarr | telemetry_metrics 0.6.1
midarr | telemetry_poller 1.0.0
midarr | tesla 1.7.0
midarr | unicode_util_compat 0.7.0
midarr | websock 0.5.2
midarr | websock_adapter 0.5.3
midarr | All dependencies are up to date
midarr | psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
midarr | Is the server running locally and accepting connections on that socket?
midarr |
midarr | 12:33:42.564 [info] Migrations already up
midarr |
midarr | 12:33:44.105 [notice] Application media_server exited: MediaServer.Application.start(:normal, []) returned an error: shutdown: failed to start child: MediaServer.SeriesIndex
midarr | ** (EXIT) an exception was raised:
midarr | ** (Protocol.UndefinedError) protocol Enumerable not implemented for nil of type Atom. This protocol is implemented for the following type(s): DBConnection.PrepareStream, DBConnection.Stream, Date.Range, Ecto.Adapters.SQL.Stream, Exile.Stream, File.Stream, Function, GenEvent.Stream, HashDict, HashSet, IO.Stream, Jason.OrderedObject, List, Map, MapSet, Phoenix.LiveView.LiveStream, Postgrex.Stream, Range, Scrivener.Page, Stream
midarr | (elixir 1.14.3) lib/enum.ex:1: Enumerable.impl_for!/1
midarr | (elixir 1.14.3) lib/enum.ex:166: Enumerable.reduce/3
midarr | (elixir 1.14.3) lib/enum.ex:4307: Enum.filter/2
midarr | (media_server 4.0.0) lib/media_server_web/repositories/series.ex:17: MediaServerWeb.Repositories.Series.get_all/0
midarr | (elixir 1.14.3) lib/agent/server.ex:8: Agent.Server.init/1
midarr | (stdlib 3.17.2.2) gen_server.erl:423: :gen_server.init_it/2
midarr | (stdlib 3.17.2.2) gen_server.erl:390: :gen_server.init_it/6
midarr | (stdlib 3.17.2.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
midarr | {"Kernel pid terminate
midarr | d",application_controller,"{application_start_failure,media_server,{{shutdown,{failed_to_start_child,'Elixir.MediaServer.SeriesIndex',{#{'__exception__' => true,'__struct__' => 'Elixir.Protocol.Undef
midarr | inedError',description => <<>>,protocol => 'Elixir.Enumerable',value => nil},[{'Elixir.Enum
midarr | erable','impl_for!',1,[{file,\"lib/enum.ex\"},{line,1}]},{'Elixir.Enumerable',reduce,3,[{file,\"lib/enum.ex\"},{line,166}]},{'Elixir.Enum',filter,2,[{file,\"lib/enum.ex\"},{line,4307}]},{'Elix
midarr | ir.MediaServerWeb.Repos
midarr | itories.Series',get_all,0,[{file,\"lib/media_server_web/rep
midarr | ositories/series.ex\"},{line,17}]},{'Elixir.Agent.Server',init,1,[{file,\"lib/ag
midarr | ent/server.ex\"},{line,8}]},{gen_server,init_it,2,[{file,\
midarr | "
midarr | 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,[]]}}}"}
midarr | K
midarr | ernel pid terminated (application_controller) ({applic
midarr | ation_start_failure,media_server,{{shutdown,{failed_t
midarr | o_start_child,'Elixir.MediaServer.SeriesIndex',{#{'__exception__' => true,'__stru
midarr | ct__' => 'Elixir.Protocol.UndefinedErro
midarr | r',description => <<>>,protocol => 'Elixir.Enumerable',value => n
midarr | il},[{'Elixir.Enumerable','impl_for!',1,
midarr | [{file,"lib/enum.ex"},{line,1}]},{'Elixir.Enumerable',re
midarr | duce,3,[{file,"lib/enum.ex"},{line,166}]},{'Elixir.Enum
midarr | ',filter,2,[{file,"lib/enum.ex"},{line,4307}]},{'Eli
midarr | xir.MediaServerWeb.Repositories.Series',
midarr | get_all,0,[{file,"lib/media_server_web/repositories/ser
midarr | ies.ex"},{line,17}]},{'Elixir.Agent.Server',init,1,
midarr | [{file,"lib/agent/server.ex"},{line,8}]},{gen_server,ini
midarr | t_it,2,[{file,"gen_server.erl"},{line,423}]},{gen_
midarr | server,init_it,6,[{file,"gen_server.erl"},{line,390}]},{proc_lib,in
midarr | it_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}}},{'Elixir
midarr | .MediaServer.Appl
midarr | ication',start,[normal,[]]}}})
midarr |
midarr | Crash dump is being writte
midarr | n to: erl_crash.dump...
midarr | done
midarr | Database my_database ready
midarr | 12:33:47.251 [info] Running MediaServerWeb.Endpoint with cowboy 2.10.0 at :::4000 (http)
midarr | 12:33:47.273 [info] Access MediaServerWeb.Endpoint at http://localhost:4000
midarr | 12:33:47.371 [notice] Application media_server exited: MediaServer.Application.start(:normal, []) returned an error: shutdown: failed to start child: MediaServer.SeriesIndex
midarr | ** (EXIT) an exception was raised:
midarr | ** (Protocol.UndefinedError) protocol Enumerable not implemented for nil of type Atom. This protocol is implemented for the following type(s): DBConnection.PrepareStream, DBConnection.Stream, Date.Range, Ecto.Adapters.SQL.Stream, Exile.Stream, File.Stream, Function, GenEvent.Stream, HashDict, HashSet, IO.Stream, Jason.OrderedObject, List, Map, MapSet, Phoenix.LiveView.LiveStream, Postgrex.Stream, Range, Scrivener.Page, Stream
midarr | (elixir 1.14.3) lib/enum.ex:1: Enumerable.impl_for!/1
midarr | (elixir 1.14.3) lib/enum.ex:166: Enumerable.reduce/3
midarr | (elixir 1.14.3) lib/enum.ex:4307: Enum.filter/2
midarr | (media_server 4.0.0) lib/media_server_web/repositories/series.ex:17: MediaServerWeb.Repositories.Series.get_all/0
midarr | (elixir 1.14.3) lib/agent/server.ex:8: Agent.Server.init/1
midarr | (stdlib 3.17.2.2) gen_server.erl:423: :gen_server.init_it/2
midarr | (stdlib 3.17.2.2) gen_server.erl:390: :gen_server.init_it/6
midarr | (stdlib 3.17.2.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
midarr | {
midarr | "Kernel pid termi
midarr | nated",ap
midarr | p
midarr | l
midarr | i
midarr | c
midarr | a
midarr | tion_con
midarr | t
midarr | roller,"
midarr | {
midarr | applica
midarr | t
midarr | ion_star
midarr | t
midarr | _failur
midarr | e
midarr | ,media_
midarr | server,{{
midarr | s
midarr | hutdown,
midarr | {
midarr | failed_to
midarr | _
midarr | start_c
midarr | h
midarr | ild,'Elix
midarr | i
midarr | r.MediaSe
midarr | r
midarr | ver.Seri
midarr | e
midarr | sIndex',
midarr | {
midarr | #{'__e
midarr | x
midarr | c
midarr | eption__
midarr | '
midarr | => true,
midarr | '
midarr | __struc
midarr | t
midarr | __' => 'E
midarr | l
midarr | ixir.Pro
midarr | t
midarr | o
midarr | c
midarr | o
midarr | l.Undef
midarr | i
midarr | n
midarr | e
midarr | dError'
midarr | ,
midarr | d
midarr | e
midarr | script
midarr | i
midarr | o
midarr | n
midarr | => <<>
midarr | >
midarr | ,
midarr | p
midarr | rotoco
midarr | l
midarr |
midarr | =
midarr | >
midarr | 'Elixir.Enumerable',value => nil},[{'Elixir.Enumerable','impl_for!',1,[{f
midarr | il
midarr | e,\"lib/enum.ex\"},{line,1}]},{'Elixir.Enumerable',reduce,3,[{fil
midarr | e
midarr | ,
midarr | \"lib/enum.ex\"},{line,166}]},{'Elixir.Enum',filter,2,[{file,\"lib/enum.ex\"},{line,
midarr | 43
midarr | 07}]},{'Elixir.MediaServerWeb.Repositories.Series',get_all,0,[{file,\"lib/
midarr | med
midarr | ia_server_web/repositories/series.ex\"},{line,17}]},{'El
midarr | i
midarr | xir.Agent.Server',init,1,[{file,\"lib/agent/server.ex\"},{line,8
midarr | }
midarr | ]
midarr | },{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,4
midarr | 2
midarr | 3}]},{gen_server,init_it,6,[{file,\"gen_server.
midarr | er
midarr | l\"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,\"pro
midarr | c
midarr | _lib.erl\"},{line,226}]}]}}},{'Elixir.MediaServer.Applicat
midarr | i
midarr | o
midarr | n',start,[normal,[]]}}}"}
midarr | Kernel pid terminated
midarr | (ap
midarr | plication_controller) ({application_start_failure,media_server,{{shutdown,{failed_to_start_child,'Elixir.
midarr | MediaServer.SeriesIndex',
midarr | {#{'__exception__' => true,'__struct__' => 'Elixir.Protocol.UndefinedError',description
midarr | => <<>>,protocol => 'Elixir.Enumerabl
midarr | e',value => nil},[{'Elixir.Enumerable','impl_for!',1,[{file,"lib/enum.ex"},{l
midarr | ine,1}]},{'Elixir.Enumerable',reduce,3,[{file,"lib/enum.ex"},{line
midarr | ,
midarr | 166}
midarr | ]},{'Elixir.Enum',filter,2,[{file,"lib/enum.ex"},{line,4307}]},{'Elixir.MediaServerWeb.Repositories.Seri
midarr | es',get_all,0,[{file,"li
midarr | b/media_server_web/repositories/series.ex"},{line,17}]},{'Elixir.Agent.Server',ini
midarr | t,1,[{f
midarr | ile,"lib/agent/server.ex"},{line,8}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,423}]
midarr | }
midarr | ,{
midarr | gen_server,init_it,6,[{file,"gen_server.erl"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,"proc_li
midarr | b.erl"},{line,
midarr | 226}]}]}}},{'Elixir.MediaServer.Application',start,[normal,[]]}}})
midarr |
midarr | Cr
midarr | ash
midarr | dump
midarr | is bein
midarr | g written to:
midarr | erl_cra
midarr | sh.dump.
midarr | ..
midarr | done
midarr |
midarr exited with code 1
Thank you for helping me resolve an issue caused by me not properly reading and configuring a simple docker compose file facepalm
from midarr-server.
Success!!
Using the provied docker-compose.yml I was able to start the container and launch the web interface. Only had to add my media library and I am watching.
Would it be possible to have the postgresql-data volume follow my current mappings and be stored in /srv/midarr/data
?
And how would I integrate my docker-network
in the compose file?
from midarr-server.
Please feel free to reach out anytime with issues or feature ideas! I'm more than happy to help 🏄♂️
from midarr-server.
Hi sorry to hear you've had some issues.
Only time I managed to get a different output was when following the docker-compose.yml file in the master branch and I added a
/app
directory for midarr in but then got this outputError response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/app/entry.sh": stat /app/entry.sh: no such file or directory: unknown
^This is similar to the error logged by my Raspberry Pi before we added arm64
support. Our release build supports architectures amd64
and arm64
which I would have thought your machine falls under amd64
Could you try running Midarr on a more recent machine and see if that works?
I ran a fresh README docker compose on an Intel i7 ubuntu server without any issue.
from midarr-server.
Oh never mind, I misread the errors. It looks like Midarr does successfully build, but crashes when looking for the entry point script.
from midarr-server.
I tried forking the repo and running the docker-compose.yml and that one does start successfuly.
I believe I might be experiencing some sort of permission issue? For example recyclarr in the same /srv/recyclarr/... directory starts, but when I try to create a config file it fails to do so. I had to run sudo chown -R 1000:1000 /srv/recyclarr/appdata
and that fixed the issue.
However trying the same with midarr doesn't seem to help.
I am using hotio's docker images and he seems to have PUID and PGID under the environment tab in his compose files. Trying to add them in midarr doesn't help thoe.
from midarr-server.
I was able to replicate the issue. Midarr will crash if either your Radarr or Sonarr is unreachable. Please make sure their config are both set and correct.
from midarr-server.
Can you give this a try? Just put in your Radarr and Sonarr details:
version: "3.4"
volumes:
postgresql-data:
services:
midarr:
container_name: midarr
image: ghcr.io/midarrlabs/midarr-server:latest
ports:
- 4000:4000
environment:
- APP_URL=http://midarr:4000
- DB_USERNAME=my_user
- DB_PASSWORD=my_password
- DB_DATABASE=my_database
- DB_HOSTNAME=postgresql
- [email protected]
- SETUP_ADMIN_NAME=admin
- SETUP_ADMIN_PASSWORD=somepassword
- RADARR_BASE_URL=radarr:7878 # required
- RADARR_API_KEY=someApiKey # required
- SONARR_BASE_URL=sonarr:8989 # required
- SONARR_API_KEY=someApiKey # required
depends_on:
postgresql:
condition: service_healthy
postgresql:
container_name: postgresql
image: postgres
volumes:
- postgresql-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=my_user
- POSTGRES_PASSWORD=my_password
- POSTGRES_DB=my_database
healthcheck:
test: "exit 0"
from midarr-server.
Ah good to hear you were able to resolve this. Thank you for posting detailed info and for your feedback.
from midarr-server.
https://github.com/orgs/midarrlabs/projects/1/views/1?filterQuery=fail
I think this could have been easier to resolve if the error logs were more detailed as to what was failing, so I've added a couple tickets to account. Hopefully be in the next release 😄
from midarr-server.
Related Issues (20)
- Fix continues on continues index page without image
- Fix continues on home page without image
- Fix Z index priority when adding new playlist
- Fix Z index priority when adding movie to playlist
- Add attribution back to repository HOT 1
- Upgrade phoenix framework
- Fix historical Chromecast sessions hanging around HOT 1
- RFC: show monitored movies / series / episodes HOT 1
- Add episode watched status
- Add episode playback progress
- Add movie watched status
- Add movie playback progress
- AI driven description summaries HOT 2
- Fix unique constraint media_types_type_index
- Remove light theme
- [BUG]: Unable to start in podman HOT 9
- Unable to login HOT 4
- Postgresql - dependency failed to start HOT 17
- [BUG]: Media Sync API key HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from midarr-server.