Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fails on FreeNAS #468

Closed
ormanya opened this issue Jan 26, 2017 · 11 comments
Closed

Update fails on FreeNAS #468

ormanya opened this issue Jan 26, 2017 · 11 comments
Labels
Status: Cannot Reproduce Issue cannot be reproduced with the current information. Type: Bug Issue is a bug

Comments

@ormanya
Copy link

ormanya commented Jan 26, 2017

I installed 0.2.0.210 on FreeNAS using the instructions on the wiki here. When I try to update to 0.0.0.266 via the gui, the new package downloads ok, and starts the updater, but then the update fails as follows:

[Info] InstallUpdateService: Updater Arguments: 23123 /tmp/radarr_update /usr/local/Radarr/Radarr.exe  
[Debug] mono: Starting mono --debug /tmp/radarr_update/Radarr.Update.exe 23123 /tmp/radarr_update /usr/local/Radarr/Radarr.exe  
[Error] CommandExecutor: Error occurred while executing task ApplicationUpdate 

[v0.2.0.210] System.ComponentModel.Win32Exception (0x80004005): ApplicationName='mono', CommandLine='--debug /tmp/radarr_update/Radarr.Update.exe 23123 /tmp/radarr_update /usr/local/Radarr/Radarr.exe ', CurrentDirectory='', Native error= Cannot find the specified file
  at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x001ee] in <bd46d4d4f7964dfa9beea098499ab597>:0 

@onedr0p
Copy link
Contributor

onedr0p commented Jan 26, 2017

Usually Permissions, or Mono version problem. Can you double check your perms? Cannot find the specified file leads me to think it couldn't write to the folder.

@ormanya
Copy link
Author

ormanya commented Jan 26, 2017

Mono version is 4.6.2 (Stable 4.6.2.7/08fd525 Tue Jan 17 01:47:51 UTC 2017)

Permissions are as follows:
/tmp/radarr_update 755 (contents are 644)
/usr/local/Radarr 755 (contents are 700)
/usr/local/Radarr/Radarr.exe 700

Ownership for everything is root:wheel and since this is running in a FreeBSD jail, mono runs as root
https://puu.sh/tBzVM/5fff606be5.png

@galli-leo
Copy link
Contributor

/tmp/radarr_update contents should be 755 or else the updater exe cannot be executed.

@galli-leo galli-leo added Type: Bug Issue is a bug Status: Cannot Reproduce Issue cannot be reproduced with the current information. labels Jan 28, 2017
@zenxedo
Copy link

zenxedo commented Jan 28, 2017

Same permissions as OP, changed /tmp/radarr_update contents to 755. Still failing to update.

@Firemad03
Copy link

@mow4cash did you try chmod -R 755 /tmp/radarr_update ? or you did only chmod 755 /tmp/radarr_update ?

@zenxedo
Copy link

zenxedo commented Jan 29, 2017

The problem is Radarr keeps changing the permissions to 644 when you start the updater.
I manually changed the permission to -R 755 after the zip was downloaded and ran
mono /tmp/radarr_update/Radarr.Update.exe 2383 /tmp/radarr_update /usr/local/Radarr/Radarr.exe

The update was successful. I then had to restore my backup. Now I get this error database disk image is malformed database disk image is malformed

@ormanya
Copy link
Author

ormanya commented Jan 30, 2017

I am finding the same issue where all permissions are reset when update is run from within the app.

When I ran the updater manually it worked, but initially looked like all my settings were nuked. I tried restarting from within radarr, but still was all default settings. However, upon killing Radarr and manually restarting, everything seems ok and is running new version. This works for now, but would be nice if within app update worked.

@ormanya
Copy link
Author

ormanya commented Jan 31, 2017

I have changed radarr to run in the FreeNAS jail as a non-root user and chowned the application and tmp folders for the non-root user. Now the updates work. It appears the issue only happens when radarr runs as root. This might be intentional since typically it is not a good idea to run services like this as root (although this is not necessarily the case in a FreeBSD jail)

@topper59
Copy link

topper59 commented Feb 1, 2017

How did you change the user you were running Radarr as? I thought maybe changing the startup command to su USER -c "command" would work but no luck

@ormanya
Copy link
Author

ormanya commented Feb 1, 2017

I created a daemon script in /etc/rc.d https://ghostbin.com/paste/nbzkt

Of course you will also need to create the new user and change ownership of the appropriate folders.

It is based on the latest sonarr script in FreeBSD ports. Note that the code is still a work in progress (a bunch of stuff commented out).

@Firemad03
Copy link

#521 : "ln -s /usr/local/bin/mono /bin did the trick now I can update Radarr with GUI "

That's what I found on Freenas inside a jail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Cannot Reproduce Issue cannot be reproduced with the current information. Type: Bug Issue is a bug
Projects
None yet
Development

No branches or pull requests

6 participants