Sonarr Plugin GUI Update Issues

Status
Not open for further replies.

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
@AdianIV
I found a clean solution, setting the XDG_CONFIG_HOME environmental variable to somewhere 'media' can write.
I'll push out an update, should be available tomorrow.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
@AdianIV
Please try the updated PBI tomorrow and tell me if it fixed both issues for you. I only tested the first one as I don't normally use Sonarr.
 

AdianIV

Dabbler
Joined
Feb 7, 2015
Messages
26
I was able to apply the new PBI and everything is in working order now.

Thanks so much for all your help, and for the fixed package! I wouldn't have been able to figure it out on my own, that's for sure.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I was able to apply the new PBI and everything is in working order now.

Thanks so much for all your help, and for the fixed package! I wouldn't have been able to figure it out on my own, that's for sure.
welcome, thanks for giving adequate information to figure out the issue.
 

ToBeFrank

Dabbler
Joined
Feb 20, 2015
Messages
41
I mean no offense, but I don't like this solution. Sonarr wants to store its config in its home dir. It should be running as user "sonarr" with a group of "media". The sonarr user should have a valid home dir. Doing it this way means any other media type software I install can share data using the media group, but is otherwise completely isolated from each other.
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I mean no offense, but I don't like this solution. Sonarr wants to store its config in its home dir. It should be running as user "sonarr" with a group of "media". The sonarr user should have a valid home dir. Doing it this way means any other media type software I install can share data using the media group, but is otherwise completely isolated from each other.
sonarr runs as the user 'media', there is no 'sonarr' user in this case.
it is standard practice on FreeBSD to have services run as users with no home directory.

having a home directory in no way facilitates sharing media with another plugin, it is irrelevant. the files sonarr works with is in no way tied to a home directory.

also, anything you want is possible, you can...
* set a home directory for sonarr
* change the user sonarr runs as
* create groups that share files
 

ToBeFrank

Dabbler
Joined
Feb 20, 2015
Messages
41
sonarr runs as the user 'media', there is no 'sonarr' user in this case.

That was my point, there should be.

having a home directory in no way facilitates sharing media with another plugin

I didn't say it did. Having a "media" group does that. IMO, having a home dir is way better than setting an environment variable. Unless you happen to know about the environment variable, it makes it a real pain to find the config. It's also how nzbdrone works on every other OS.

also, anything you want is possible, you can...
* set a home directory for sonarr
* change the user sonarr runs as
* create groups that share files

Can I do this at install time or will it always create a media user? I don't want a media user as I already have a media group to handle media.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
@ToBeFrank

having a different user for each plugin means finding a bunch of non-conflicting IDs in the ports tree's UIDs file. it's possible but I prefer the current setup.

you can delete the 'media' user. it's a containerized OS so you can really do whatever you like.
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
Not sure why this is really a problem since the other applications that Sonarr works with all generally need access to the same data....
 

tofagerl

Contributor
Joined
Aug 26, 2013
Messages
118
Any chance you could update the PBI? There's been quite a lot of changes lately, specifically v2.0.0.3154 was huge.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Any chance you could update the PBI? There's been quite a lot of changes lately, specifically v2.0.0.3154 was huge.
does in-app updating not work? I thought it used to
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Works for me. I just updated to 2.0.0.3212 - Jun 4 2015.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Works for me. I just updated to 2.0.0.3212 - Jun 4 2015.
thanks, I don't see too much of a reason to update the PBI then. there's always a chance I screw things up in the process
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
I'm curious what happens if the PBI does get updated and I've applied in-app updates and I click the Plug-In "Update" button in FreeNAS. Does it go Boom!?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I'm curious what happens if the PBI does get updated and I've applied in-app updates and I click the Plug-In "Update" button in FreeNAS. Does it go Boom!?
its worse than you think. if you've updated several times your freenas might downgrade itself to a windows home server!

but, really... it should just revert those program files so you'll be on the version of the plugin from the update. this could be bad if your plugin data (configs/databases) are expecting a newer version. but, you should be able to just in-app update and things will be in-line again.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
Windows Home Server! Awesome!!!
 

tofagerl

Contributor
Joined
Aug 26, 2013
Messages
118
Well, it didn't work for me. Tried again now, and still no go.

Update process failed: Access to the path "/var/db/sonarr/Backups/update/nzbdrone_backup_2015.06.10_11.51.15.zip" is denied.
 

tofagerl

Contributor
Joined
Aug 26, 2013
Messages
118
Aaaand now my settings were wiped out after I restarted the service.

Edit: Moved settings back from backup and after 20 minutes I actually managed to restart the service. (the -f switch in the rc-script made mono go kablooey)
Now update worked.
 
Last edited:

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
So i think there are lots of update issues with sonarr because it is meant for windows. I just did an update from .3154 to .3212 and the command that it uses to update is using windows syntax. If you take this update command and modify the forward slash for the optional arguments to be -- then it works and everything gets updated.

Code:
mono /tmp/nzbdrone_update/NzbDrone.Update.exe 86280 /tmp/nzbdrone_update /usr/pbi/sonarr-amd64/share/sonarr/NzbDrone/NzbDrone.exe /data=/var/db/sonarr /nobrowser


here are my logs from the failed update showing that this actually happens and I'm not sure how @depasseg actually got it to update because it is impossible.

Code:
15-6-10 11:36:37.7|Info|InstallUpdateService|Deleting old update files
15-6-10 11:36:37.8|Info|InstallUpdateService|Downloading update 2.0.0.3212
15-6-10 11:36:41.1|Info|InstallUpdateService|Verifying update package
15-6-10 11:36:41.2|Info|InstallUpdateService|Update package verified successfully
15-6-10 11:36:41.2|Info|InstallUpdateService|Extracting Update package
15-6-10 11:36:41.6|Info|InstallUpdateService|Update package extracted successfully
15-6-10 11:36:41.6|Info|BackupService|Starting Backup
15-6-10 11:36:41.7|Info|InstallUpdateService|Preparing client
15-6-10 11:36:41.7|Info|InstallUpdateService|Starting update client /tmp/nzbdrone_update/NzbDrone.Update.exe
15-6-10 11:36:41.8|Info|InstallUpdateService|NzbDrone will restart shortly.
15-6-10 11:36:41.8|Error|InstallUpdateService|Update process failed

System.ComponentModel.Win32Exception: ApplicationName='mono', CommandLine='/tmp/nzbdrone_update/NzbDrone.Update.exe 86280 /tmp/nzbdrone_update /usr/pbi/sonarr-amd64/share/sonarr/NzbDrone/NzbDrone.exe /data=/var/db/sonarr /nobrowser', CurrentDirectory='', Native error= Cannot find the specified file
  at System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0
  at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0
  at System.Diagnostics.Process.Start () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
  at NzbDrone.Common.Processes.ProcessProvider.Start (System.String path, System.String args, System.Action`1 onOutputDataReceived, System.Action`1 onErrorDataReceived) [0x00000] in <filename unknown>:0
  at NzbDrone.Core.Update.InstallUpdateService.InstallUpdate (NzbDrone.Core.Update.UpdatePackage updatePackage) [0x00000] in <filename unknown>:0


on a side note i think there is a permission issues someplace when running as the media user in the pbi but i'm still tracking that down and will be a new thread.
 
Status
Not open for further replies.
Top