Ombi
Ombi copied to clipboard
Updater
Need to finish the Auto updater
- The updater it's very basic and very error prone, it was a quick whip up.
- This needs refactoring to make it more stable and less error prone
- Need a new settings page to enable if we should auto update
- Need a new scheduled job to download the latest update (Not sure how we will do this yet) and fire off the auto update process.
Not sure if it would help but what about using the same type of code like Sonarr/Radarr for the AutoUpdater. Both of those are completely autonomous with nightly updates or master updates depending on the branch selected and it even restarts the program after the update. Just thoughts :)
Having the same update ability as Sonarr would be a god send. Personally having to download a zip file and extract it is just annoying. Sonarr does updates so well.
I think this has been mentioned before on the old 'V3 beta issues' but just thought I'd post it here: I've never gotten the 'Update' feature to work. I've tried both when running Ombi as a service and when manually running it through the terminal (it was suggested in the old thread running as a service may have caused an issue).
It always fails with the same issue in the log:
Oct 14 17:52:01 Ombi[24715]: warn: Hangfire.AutomaticRetryAttribute[0]
Oct 14 17:52:01 Ombi[24715]: Failed to process the job 'fc8880c0-d540-4d62-b549-791f6b035638': an exception occurred. Retry attempt 7 of 10 will be performed in 00:23:50.
Oct 14 17:52:01 Ombi[24715]: System.IO.InvalidDataException: End of Central Directory record could not be found.
Oct 14 17:52:01 Ombi[24715]: at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()
Oct 14 17:52:01 Ombi[24715]: at System.IO.Compression.ZipArchive.Init(Stream stream, ZipArchiveMode mode, Boolean leaveOpen)
Oct 14 17:52:01 Ombi[24715]: at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)
Oct 14 17:52:01 Ombi[24715]: at System.IO.Compression.ZipFile.Open(String archiveFileName, ZipArchiveMode mode, Encoding entryNameEncoding)
Oct 14 17:52:01 Ombi[24715]: at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__16.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 196
In the meantime I've been downloading the newer versions of ombi manually and copying over the database file, which seems to be working.
Currently running Ubuntu 16.04.3 LTS.
Made a change to fix the above error @Scorcher7986
now the windows system wont trigger the update from 3.0.2101
Logs?
I'm still not able to get update working on Fedora. I can see the file get downloaded and extracted into TempUpdate/ then get permission denied. I'm on version 3.0.2121.
info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000] Downloading the file linux.tar.gz from https://ci.appveyor.com/api/buildjobs/7j8s6wwkqi9s9746/artifacts/linux.tar.gz warn: Hangfire.AutomaticRetryAttribute[0] Failed to process the job '196': an exception occurred. Retry attempt 10 of 10 will be performed in 01:50:06. System.ComponentModel.Win32Exception (0x80004005): Permission denied at Interop.Sys.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Int32& lpChildPid, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__16.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 184
Set the permissions on the Ombi directory to 777 and retry?
Should have mentioned that I've tried that.
Running V3 on Ubuntu (Linux 4.10.0-37-generic #41~16.04.1-Ubuntu). I get notified that there is an update, and when I click on the update button it says "we triggered the update job". However, nothing appears to happen after that. I still get the same notification that says update available. I have checked file and folder permissions for the ombi folder (all user and group permissions are set to rwx). I have also confirmed my user is running the ombi processes. My logs don't appear to be updating since I've installed V3.
Not just on Fedora, can't update on Ubuntu 16.04 either. Same error:
Oct 18 13:00:36 Ombi[5909]: warn: Hangfire.AutomaticRetryAttribute[0]
Oct 18 13:00:36 Ombi[5909]: Failed to process the job '358': an exception occurred. Retry attempt 1 of 10 will be performed in 00:00:43.
Oct 18 13:00:36 Ombi[5909]: System.ComponentModel.Win32Exception (0x80004005): Permission denied
Oct 18 13:00:36 Ombi[5909]: at Interop.Sys.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boole
Oct 18 13:00:36 Ombi[5909]: at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
Oct 18 13:00:36 Ombi[5909]: at System.Diagnostics.Process.Start()
Oct 18 13:00:36 Ombi[5909]: at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__16.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Job
Can someone manually update to the latest version and then trigger an auto update (when it's available) and let me know how it does?
It looks like it was compiled 3 times with no changes in between. I grabbed 3.0.2140 and still can't update. I'm getting the same error that I was getting if I tried to run Ombi.Updater manually. I've tried renaming the file that it gets stuck on and it'll just get stuck on the next file.
bash-4.4$ [32762]: Process terminated successfully Found 0 processes with the name: Ombi
Unhandled Exception: System.IO.IOException: The process cannot access the file '/opt/ombi3/Ombi.Schedule.dll' because it is being used by another process. at System.IO.FileStream.Init(FileMode mode, FileShare share) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.UnixFileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) at Ombi.Updater.Installer.MoveFiles(StartupOptions options) in C:\projects\requestplex\src\Ombi.Updater\Installer.cs:line 75 at Ombi.Updater.Installer.Start(StartupOptions options) in C:\projects\requestplex\src\Ombi.Updater\Installer.cs:line 37 at Ombi.Updater.Program.Main(String[] args) in C:\projects\requestplex\src\Ombi.Updater\Program.cs:line 20
Also seems to break Ombi. After restart:
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'Ombi.Schedule, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null'. An attempt was made to load a program with an incorrect format.
at Ombi.DependencyInjection.IocExtensions.RegisterJobs(IServiceCollection services) at Ombi.DependencyInjection.IocExtensions.RegisterApplicationDependencies(IServiceCollection services) in C:\projects\requestplex\src\Ombi.DependencyInjection\IocExtensions.cs:line 62 at Ombi.Startup.ConfigureServices(IServiceCollection services) in C:\projects\requestplex\src\Ombi\Startup.cs:line 125 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services) at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices() at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication() at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build() at Ombi.Program.Main(String[] args) in C:\projects\requestplex\src\Ombi\Program.cs:line 64
Ok thanks for the update
@mattohm is it possible something is restarting the Ombi process?
As part of the auto updater we kill the Ombi process so we can replace the .dll's with the new ones, the reason we need to kill Ombi is so that the files are not in use.
I also see the line: Found 0 processes with the name: Ombi
What is the process name for Ombi? Maybe that's why, we couldn't find it to kill it.
It's killing Ombi. I can manually rename/remove files. I think the updater is holding them open for some reason.
Updater now stop work for me.
info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
Product Version 3.0.2141-DotNetCore
info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
Version 3.0.2141
info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
Branch DotNetCore
info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
Service Version 3.0.2142
info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
OS Information: Microsoft Windows 10.0.16299 X64
info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
We are Windows
info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
Downloading the file windows.zip from https://ci.appveyor.com/api/buildjobs/mag4e6s0m8v88n70/artifacts/windows.zip
after this ombi crash or just dont start process again.
When i try to lunch ombi, it again try to update and again and again. have to manual update from 2138 to 2141
I've just manually updated from 2151 to 2162, hopefully the 'Made the updater work again' commit has fixed things. I'll let you know once there's a new version to update to.
Just a sidenote, I noticed a new feature was introduced around 2151 being 'If you are getting any permissions issues, you can specify a user for the update process to run under', however it looks like this feature is unsupported on linux, or atleast unsupported on Ubuntu 16.04.3 LTS. Maybe a disclaimer about this on the settings page would be good.
Oct 22 13:56:32 Ombi[23851]: info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
Oct 22 13:56:32 Ombi[23851]: Product Version 3.0.2151-DotNetCore
Oct 22 13:56:32 Ombi[23851]: info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
Oct 22 13:56:32 Ombi[23851]: Version 3.0.2151
Oct 22 13:56:33 Ombi[23851]: info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
Oct 22 13:56:33 Ombi[23851]: Branch DotNetCore
Oct 22 13:56:39 Ombi[23851]: info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
Oct 22 13:56:39 Ombi[23851]: Service Version 3.0.2162
Oct 22 13:56:39 Ombi[23851]: info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
Oct 22 13:56:39 Ombi[23851]: OS Information: Linux 4.4.0-93-generic #116-Ubuntu SMP Fri Aug 11 21:17:51 UTC 2017 X64
Oct 22 13:56:39 Ombi[23851]: info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
Oct 22 13:56:39 Ombi[23851]: We are linux
Oct 22 13:56:39 Ombi[23851]: info: Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater[6000]
Oct 22 13:56:39 Ombi[23851]: Downloading the file linux.tar.gz from https://ci.appveyor.com/api/buildjobs/6mtq3ne42y7fdolq/artifacts/linux.tar.gz
Oct 22 13:56:57 Ombi[23851]: warn: Hangfire.AutomaticRetryAttribute[0]
Oct 22 13:56:57 Ombi[23851]: Failed to process the job '945': an exception occurred. Retry attempt 1 of 1 will be performed in 00:00:42.
Oct 22 13:56:57 Ombi[23851]: System.PlatformNotSupportedException: Starting a process with a different identity is not supported on this platform.
Oct 22 13:56:57 Ombi[23851]: at System.Diagnostics.ProcessStartInfo.set_UserName(String value)
Oct 22 13:56:57 Ombi[23851]: at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__16.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 196
I've also now added the ability to run a user defined script to update the process. If that is enabled it will run the script every time there is an update available.
Is it possible to set the startup listening port after the update or auto-update?
The current update process downloads the new windows.zip file in the command prompt, stops the running .exe and exits the command session for the restart.
Ombi.exe then starts up again automatically but headless, only to be seen in Task Manager and running on the default port 5000.
This is the state after the update: https://i.imgur.com/t8jch7f.png
Meaning I have to stop it in task manager, then run ombi.exe --host http://*:3579
again from the command window every time.
For this reason I've had to disable auto-updates, otherwise it will update itself and not reconnect online again.
If this isn't possible, I could just alter my port forwarding to 5000 rather than 3579 for now. However, this will mean I won't be able to see the console of Ombi, which allows me to see what's currently running, processing and what has failed in red. These items are not shown in the logs for some reason.
Good point about the startup arguments! I forgot to add those!
I am having issues with the updater not working at all and the only thing that works is stopping process, copying everything over, an restarting. Just wanted to bring it up in case you wanted to see some logs/etc.
I am also experiencing similar issues, most commonly with the auto-updater updating the program, but now not returning to Task Manger and starting again. And if I turn automatic updates off, the Update button stayed greyed out after checking for updates for some reason. Also, @tidusjar please can you advise how to add the startup arguments to the updater?
Hey guys, if you have issues with the updater please post some logs and include your OS.
@MrDragonsEye Any startup arguments that you use to launch Ombi is passed into the updater automatically.
If the auto updater is disabled then the update button is disabled, since that runs the auto updater.
Windows 10 Pro, all updates installed
2017-10-28 02:01:19.952 -04:00 [Warning] Failed to process the job '1282': an exception occurred. Retry attempt 1 of 1 will be performed in 00:00:27. System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__16.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 198 2017-10-28 02:01:54.136 -04:00 [Information] 1 scheduled job(s) enqueued. 2017-10-28 02:02:30.832 -04:00 [Error] Failed to process the job '1282': an exception occurred. System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__16.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 198 2017-10-28 08:01:21.515 -04:00 [Warning] Failed to process the job '1325': an exception occurred. Retry attempt 1 of 1 will be performed in 00:00:41. System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__16.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 198 2017-10-28 08:02:10.929 -04:00 [Information] 1 scheduled job(s) enqueued. 2017-10-28 08:02:45.298 -04:00 [Error] Failed to process the job '1325': an exception occurred. System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__16.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 198 2017-10-28 14:01:13.976 -04:00 [Warning] Failed to process the job '1368': an exception occurred. Retry attempt 1 of 1 will be performed in 00:00:15. System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__16.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 198 2017-10-28 14:01:42.723 -04:00 [Information] 1 scheduled job(s) enqueued. 2017-10-28 14:02:05.501 -04:00 [Error] Failed to process the job '1368': an exception occurred. System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__16.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 198 2017-10-28 16:24:58.573 -04:00 [Information] Hangfire Server stopped. 2017-10-28 16:28:26.017 -04:00 [Information] Start installing Hangfire SQL objects... 2017-10-28 16:28:26.091 -04:00 [Information] Hangfire SQL objects installed. 2017-10-28 16:28:26.110 -04:00 [Information] Starting Hangfire Server 2017-10-28 16:28:26.112 -04:00 [Information] Using job storage: 'SQLite Server: Ombi.db' 2017-10-28 16:28:26.113 -04:00 [Information] Using the following options for Hangfire Server: 2017-10-28 16:28:26.113 -04:00 [Information] Worker count: 1 2017-10-28 16:28:26.113 -04:00 [Information] Listening queues: 'default' 2017-10-28 16:28:26.113 -04:00 [Information] Shutdown timeout: 1.00:00:00 2017-10-28 16:28:26.113 -04:00 [Information] Schedule polling interval: 00:00:15
Tried with the most recent version this morning:
2017-10-29 02:01:14.058 -04:00 [Warning] Failed to process the job '1456': an exception occurred. Retry attempt 1 of 1 will be performed in 00:00:25. System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__18.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 218 2017-10-29 02:01:48.873 -04:00 [Information] 1 scheduled job(s) enqueued. 2017-10-29 02:02:22.032 -04:00 [Error] Failed to process the job '1456': an exception occurred. System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__18.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 218 2017-10-29 08:01:25.796 -04:00 [Warning] Failed to process the job '1499': an exception occurred. Retry attempt 1 of 1 will be performed in 00:00:39. System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__18.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 218 2017-10-29 08:02:05.880 -04:00 [Information] 1 scheduled job(s) enqueued. 2017-10-29 08:02:33.148 -04:00 [Error] Failed to process the job '1499': an exception occurred. System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__18.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 218
On ubuntu...
2017-10-28 18:11:58.431 -05:00 [Warning] Failed to process the job '2277': an exception occurred. Retry attempt 1 of 1 will be performed in 00:00:29. System.NullReferenceException: Object reference not set to an instance of an object. at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.RunScript(UpdateSettings settings, String downloadUrl) in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 233 at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__17.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 212 2017-10-28 18:12:29.749 -05:00 [Information] 1 scheduled job(s) enqueued. 2017-10-28 18:17:18.395 -05:00 [Warning] Failed to process the job '2279': an exception occurred. Retry attempt 1 of 1 will be performed in 00:00:30. System.NullReferenceException: Object reference not set to an instance of an object. at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.RunScript(UpdateSettings settings, String downloadUrl) in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 233 at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__17.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 212 2017-10-28 18:17:59.821 -05:00 [Information] 1 scheduled job(s) enqueued. 2017-10-28 18:18:08.509 -05:00 [Error] Failed to process the job '2279': an exception occurred. System.NullReferenceException: Object reference not set to an instance of an object. at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.RunScript(UpdateSettings settings, String downloadUrl) in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 233 at Ombi.Schedule.Jobs.Ombi.OmbiAutomaticUpdater.<Update>d__17.MoveNext() in C:\projects\requestplex\src\Ombi.Schedule\Jobs\Ombi\OmbiAutomaticUpdater.cs:line 212
Fixed that @Unimatrix0 .
Slightly revised what we pass the script: https://github.com/tidusjar/Ombi/wiki/Update-Settings
I removed the ProcessId since it's not really relevant (it was mainly for the Internal Ombi Updater)
I have issue with updater.
OS: Windows 10 in log is nothing special to see log-20171108.txt
i try multiple update settings setup processname and login and pass and also try without them, but every time only download extract files and kill ombi... i have it run manualy after.