mdhiggins / sonarr-sma

Sonarr docker based on linuxserver/sonarr with SMA built in using python3
MIT License
39 stars 19 forks source link

postSonarr.sh doesn't have executable permission #45

Closed powerdude closed 1 year ago

powerdude commented 1 year ago

I'm not certain what, if anything, has gone wrong, but it seems postSonarr.sh and maybe others, have lost permissions. Here's what I see in portainer when I connect to the container and do ls -l:

image

Is there something else that needs to be done? I'm going to run a chmod +x postSonarr.sh, but wanted to see if there's something else to do.

powerdude commented 1 year ago

I should add I started seeing this in sonarr:

[Warn] NotificationService: Unable to send OnDownload notification to: SMA 
02/04/2023 1:19:09 PM
02/04/2023 1:19:09 PM
[v4.0.0.363] System.ComponentModel.Win32Exception (13): An error occurred trying to start process '/usr/local/sma/postSonarr.sh' with working directory '/app/sonarr/bin'. Permission denied
02/04/2023 1:19:09 PM
   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
02/04/2023 1:19:09 PM
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
02/04/2023 1:19:09 PM
   at System.Diagnostics.Process.Start()
02/04/2023 1:19:09 PM
   at NzbDrone.Common.Processes.ProcessProvider.Start(String path, String args, StringDictionary environmentVariables, Action`1 onOutputDataReceived, Action`1 onErrorDataReceived) in C:\BuildAgent\work\13f3e374fa512e16\src\NzbDrone.Common\Processes\ProcessProvider.cs:line 185
02/04/2023 1:19:09 PM
   at NzbDrone.Common.Processes.ProcessProvider.StartAndCapture(String path, String args, StringDictionary environmentVariables) in C:\BuildAgent\work\13f3e374fa512e16\src\NzbDrone.Common\Processes\ProcessProvider.cs:line 216
02/04/2023 1:19:09 PM
   at NzbDrone.Core.Notifications.CustomScript.CustomScript.ExecuteScript(StringDictionary environmentVariables) in C:\BuildAgent\work\13f3e374fa512e16\src\NzbDrone.Core\Notifications\CustomScript\CustomScript.cs:line 309
02/04/2023 1:19:09 PM
   at NzbDrone.Core.Notifications.CustomScript.CustomScript.OnDownload(DownloadMessage message) in C:\BuildAgent\work\13f3e374fa512e16\src\NzbDrone.Core\Notifications\CustomScript\CustomScript.cs:line 147
02/04/2023 1:19:09 PM
   at NzbDrone.Core.Notifications.NotificationService.Handle(EpisodeImportedEvent message) in C:\BuildAgent\work\13f3e374fa512e16\src\NzbDrone.Core\Notifications\NotificationService.cs:line 171
powerdude commented 1 year ago

well, changing that file got me further, but now I get an error because it can't find ffmpeg

02/04/2023 2:54:19 PM
[Error] postSonarr.sh: Traceback (most recent call last): 
02/04/2023 2:54:19 PM
[Error] postSonarr.sh:   File "/usr/local/sma/postSonarr.py", line 201, in <module> 
02/04/2023 2:54:19 PM
[Error] postSonarr.sh:     mp = MediaProcessor(settings) 
02/04/2023 2:54:19 PM
[Error] postSonarr.sh:   File "/usr/local/sma/resources/mediaprocessor.py", line 43, in __init__ 
02/04/2023 2:54:19 PM
[Error] postSonarr.sh:     self.converter = Converter(settings.ffmpeg, settings.ffprobe) 
02/04/2023 2:54:19 PM
[Error] postSonarr.sh:   File "/usr/local/sma/converter/__init__.py", line 26, in __init__ 
02/04/2023 2:54:19 PM
[Error] postSonarr.sh:     self.ffmpeg = FFMpeg(ffmpeg_path=ffmpeg_path, 
02/04/2023 2:54:19 PM
[Error] postSonarr.sh:   File "/usr/local/sma/converter/ffmpeg.py", line 489, in __init__ 
02/04/2023 2:54:19 PM
[Error] postSonarr.sh:     raise FFMpegError("ffmpeg binary not found: " + self.ffmpeg_path) 
02/04/2023 2:54:19 PM
[Error] postSonarr.sh: converter.ffmpeg.FFMpegError: ffmpeg binary not found: ffmpeg 
mdhiggins commented 1 year ago

You'll need to use the s6v2 tag for Sonarr for now. Linuxserver updated all of its fleet to s6v3 which sma-mod has been updated to be compatible with but Sonarr:latest is the last image still on the old version which isn't backwards compatible

All your issues stem from the startup script not loading because of the s6 change

powerdude commented 1 year ago

Hmm, I just tried and got an error for that tag. It doesn't seem to be listed at https://hub.docker.com/r/mdhiggins/sonarr-sma/tags either

powerdude commented 1 year ago

Also, I had been using your develop tag in order to get v4 stuff.

mdhiggins commented 1 year ago

Hm can you post the docker logs of the container starting. Maybe the start up script isn't firing for some reason

powerdude commented 1 year ago
02/05/2023 3:03:04 PM
[mod-init] Attempting to run Docker Modification Logic
02/05/2023 3:03:04 PM
[mod-init] Applying gilbn/theme.park:sonarr files to container
02/05/2023 3:03:05 PM
[mod-init] gilbn/theme.park:sonarr applied to container
02/05/2023 3:03:05 PM
cont-init: info: running /etc/cont-init.d/98-themepark
02/05/2023 3:03:05 PM
---------------------------
02/05/2023 3:03:05 PM
|  Sonarr theme.park Mod  |
02/05/2023 3:03:05 PM
---------------------------
02/05/2023 3:03:05 PM
Variables set:
02/05/2023 3:03:05 PM
'TP_DOMAIN'=theme-park.dev
02/05/2023 3:03:05 PM
'TP_COMMUNITY_THEME'=
02/05/2023 3:03:05 PM
'TP_SCHEME'=
02/05/2023 3:03:05 PM
'TP_ADDON'=
02/05/2023 3:03:05 PM
'TP_THEME'=organizr
02/05/2023 3:03:05 PM
02/05/2023 3:03:05 PM
Changing to Hotio file path!
02/05/2023 3:03:05 PM
No scheme set, defaulting to https
02/05/2023 3:03:05 PM
grep: /app/bin/UI/index.html: No such file or directory
02/05/2023 3:03:05 PM
---------------------------
02/05/2023 3:03:05 PM
|  Adding the stylesheet  |
02/05/2023 3:03:05 PM
---------------------------
02/05/2023 3:03:05 PM
sed: /app/bin/UI/index.html: No such file or directory
02/05/2023 3:03:05 PM
sed: /app/bin/UI/index.html: No such file or directory
02/05/2023 3:03:05 PM
sed: /app/bin/UI/login.html: No such file or directory
02/05/2023 3:03:05 PM
sed: /app/bin/UI/login.html: No such file or directory
02/05/2023 3:03:05 PM
Stylesheet set to organizr
02/05/2023 3:03:05 PM
cont-init: info: /etc/cont-init.d/98-themepark exited 0
02/05/2023 3:03:05 PM
[migrations] started
02/05/2023 3:03:05 PM
[migrations] no migrations found
02/05/2023 3:03:05 PM
02/05/2023 3:03:05 PM
-------------------------------------
02/05/2023 3:03:05 PM
          _         ()
02/05/2023 3:03:05 PM
         | |  ___   _    __
02/05/2023 3:03:05 PM
         | | / __| | |  /  \
02/05/2023 3:03:05 PM
         | | \__ \ | | | () |
02/05/2023 3:03:05 PM
         |_| |___/ |_|  \__/
02/05/2023 3:03:05 PM
02/05/2023 3:03:05 PM
02/05/2023 3:03:05 PM
Brought to you by linuxserver.io
02/05/2023 3:03:05 PM
-------------------------------------
02/05/2023 3:03:05 PM
02/05/2023 3:03:05 PM
To support the app dev(s) visit:
02/05/2023 3:03:05 PM
Sonarr: https://sonarr.tv/donate
02/05/2023 3:03:05 PM
02/05/2023 3:03:05 PM
To support LSIO projects visit:
02/05/2023 3:03:05 PM
https://www.linuxserver.io/donate/
02/05/2023 3:03:05 PM
-------------------------------------
02/05/2023 3:03:05 PM
GID/UID
02/05/2023 3:03:05 PM
-------------------------------------
02/05/2023 3:03:05 PM
02/05/2023 3:03:05 PM
User uid:    1000
02/05/2023 3:03:05 PM
User gid:    1000
02/05/2023 3:03:05 PM
-------------------------------------
02/05/2023 3:03:05 PM
02/05/2023 3:03:05 PM
s6-rc-oneshot-run: fatal: unable to exec /etc/s6-overlay/s6-rc.d/init-gid-video/run: Permission denied
02/05/2023 3:03:05 PM
s6-rc: warning: unable to start service init-gid-video: command exited 126
02/05/2023 3:03:05 PM
---------------------------
02/05/2023 3:03:05 PM
|  Sonarr theme.park Mod  |
02/05/2023 3:03:05 PM
---------------------------
02/05/2023 3:03:05 PM
Variables set:
02/05/2023 3:03:05 PM
'TP_DOMAIN'=theme-park.dev
02/05/2023 3:03:05 PM
'TP_COMMUNITY_THEME'=
02/05/2023 3:03:05 PM
'TP_SCHEME'=
02/05/2023 3:03:05 PM
'TP_ADDON'=
02/05/2023 3:03:05 PM
'TP_THEME'=organizr
02/05/2023 3:03:05 PM
02/05/2023 3:03:05 PM
Changing to Hotio file path!
02/05/2023 3:03:05 PM
No scheme set, defaulting to https
02/05/2023 3:03:05 PM
grep: /app/bin/UI/index.html: No such file or directory
02/05/2023 3:03:05 PM
sed: /app/bin/UI/index.html: No such file or directory
02/05/2023 3:03:05 PM
---------------------------
02/05/2023 3:03:05 PM
|  Adding the stylesheet  |
02/05/2023 3:03:05 PM
---------------------------
02/05/2023 3:03:05 PM
sed: /app/bin/UI/index.html: No such file or directory
02/05/2023 3:03:05 PM
sed: /app/bin/UI/login.html: No such file or directory
02/05/2023 3:03:05 PM
sed: /app/bin/UI/login.html: No such file or directory
02/05/2023 3:03:05 PM
Stylesheet set to organizr
02/05/2023 3:03:05 PM
[custom-init] No custom files found, skipping...
02/05/2023 3:03:06 PM
[Info] Bootstrap: Starting Sonarr - /app/sonarr/bin/Sonarr - Version 4.0.0.369 
02/05/2023 3:03:06 PM
[Debug] Bootstrap: Console selected 
02/05/2023 3:03:06 PM
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
02/05/2023 3:03:06 PM
[Debug] Microsoft.Extensions.Hosting.Internal.Host: Hosting starting 
02/05/2023 3:03:06 PM
[Info] AppFolderInfo: Data directory is being overridden to [/config] 
02/05/2023 3:03:07 PM
[Info] MigrationController: *** Migrating data source=/config/sonarr.db;cache size=-10000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 *** 
02/05/2023 3:03:07 PM
[Info] MigrationController: *** Migrating data source=/config/logs.db;cache size=-10000;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 *** 
02/05/2023 3:03:07 PM
[Info] Microsoft.Hosting.Lifetime: Now listening on: http://[::]:8989 
02/05/2023 3:03:08 PM
[Info] Microsoft.Hosting.Lifetime: Application started. Press Ctrl+C to shut down. 
02/05/2023 3:03:08 PM
[Info] Microsoft.Hosting.Lifetime: Hosting environment: Production 
02/05/2023 3:03:08 PM
[Info] Microsoft.Hosting.Lifetime: Content root path: /app/sonarr/bin 
02/05/2023 3:03:38 PM
[Info] SceneMappingService: Updating Scene mappings 
02/05/2023 3:03:38 PM
[Info] ImportListSyncService: Starting Import List Sync 
02/05/2023 3:03:38 PM
[Info] ImportListSyncService: Processing 0 list items 
02/05/2023 3:03:38 PM
[Info] ImportListSyncService: Import List Sync Completed. Items found: 0, Series added: 0 
02/05/2023 3:03:38 PM
[Info] RssSyncService: Starting RSS Sync 
mdhiggins commented 1 year ago

Hm looks like the needed execute permissions didn't carry over when I migrated this from the radarr container, just pushed an update, give it a fresh pull once the container rebuild finishes and see if its fixed

Edit: build done, good to pull down the image

powerdude commented 1 year ago

Yayy, I now see this in the log...

02/06/2023 8:19:55 AM
[90-sma-config] Updating SMA from github master
02/06/2023 8:19:55 AM
[90-sma-config] Downloading and installing FFMpeg from https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz

and I was able to do a manual import.