Ombi-app / Ombi

Want a Movie or TV Show on Plex/Emby/Jellyfin? Use Ombi!
http://ombi.io
GNU General Public License v2.0
3.7k stars 395 forks source link

Assembly with same name is already loaded #3905

Closed johnwchambers closed 3 years ago

johnwchambers commented 3 years ago

Tried to upgrade Ombi from 4.0.681 to 4.0.739 and the server never starts. Checking /var/log/messages shows the below errors. When I revert back to 4.0.681 I have no issues with the service starting and all features functioning.

Dec  4 00:09:28 multimedia Ombi: Hello, welcome to Ombi
Dec  4 00:09:28 multimedia Ombi: Valid options are:
Dec  4 00:09:28 multimedia Ombi: Ombi 4.0.739
Dec  4 00:09:28 multimedia Ombi: Copyright (C) 2020 Ombi
Dec  4 00:09:28 multimedia Ombi: --host       (Default: http://*:5000) Set to a semicolon-separated (;) list of
Dec  4 00:09:28 multimedia Ombi: URL prefixes to which the server should respond. For example,
Dec  4 00:09:28 multimedia Ombi: http://localhost:123. Use "localhost" to indicate that the server
Dec  4 00:09:28 multimedia Ombi: should listen for requests on any IP address or hostname using
Dec  4 00:09:28 multimedia Ombi: the specified port and protocol (for example,
Dec  4 00:09:28 multimedia Ombi: http://localhost:5000). The protocol (http:// or https://) must
Dec  4 00:09:28 multimedia Ombi: be included with each URL. Supported formats vary between
Dec  4 00:09:28 multimedia Ombi: servers.
Dec  4 00:09:28 multimedia Ombi: --storage    Storage path, where we save the logs and database
Dec  4 00:09:28 multimedia Ombi: --baseurl    The base URL for reverse proxy scenarios
Dec  4 00:09:28 multimedia Ombi: --demo       Demo mode, you will never need to use this, fuck that fruit
Dec  4 00:09:28 multimedia Ombi: company...
Dec  4 00:09:28 multimedia Ombi: --migrate    Will run the migrations then exit the application
Dec  4 00:09:28 multimedia Ombi: --help       Display this help screen.
Dec  4 00:09:28 multimedia Ombi: --version    Display version information.
Dec  4 00:09:29 multimedia Ombi: We are running on http://*:5000
Dec  4 00:09:29 multimedia Ombi: /opt/Ombi
Dec  4 00:09:29 multimedia Ombi: Unhandled exception. System.IO.FileLoadException: Assembly with same name is already loaded
Dec  4 00:09:29 multimedia Ombi: at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
Dec  4 00:09:29 multimedia Ombi: at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute.AssemblyLoadContextWrapper.LoadFromAssemblyPath(String assemblyPath)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute.GetRelatedAssemblies(Assembly assembly, Boolean throwOnError, Func`2 fileExists, AssemblyLoadContextWrapper assemblyLoadContext)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute.GetRelatedAssemblies(Assembly assembly, Boolean throwOnError)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.GetAssemblyClosure(Assembly assembly)+MoveNext()
Dec  4 00:09:29 multimedia Ombi: at System.Linq.Enumerable.ConcatIterator`1.MoveNext()
Dec  4 00:09:29 multimedia Ombi: at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateDefaultParts(String entryAssemblyName)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.Extensions.DependencyInjection.MvcCoreServiceCollectionExtensions.GetApplicationPartManager(IServiceCollection services)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.Extensions.DependencyInjection.MvcCoreServiceCollectionExtensions.AddMvcCore(IServiceCollection services)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllersCore(IServiceCollection services)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllersWithViewsCore(IServiceCollection services)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddControllersWithViews(IServiceCollection services)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddMvc(IServiceCollection services)
Dec  4 00:09:29 multimedia Ombi: at Ombi.Startup.ConfigureServices(IServiceCollection services)
Dec  4 00:09:29 multimedia Ombi: at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
Dec  4 00:09:29 multimedia Ombi: at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass13_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
Dec  4 00:09:29 multimedia Ombi: at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
Dec  4 00:09:29 multimedia Ombi: at Microsoft.Extensions.Hosting.HostBuilder.Build()
Dec  4 00:09:29 multimedia Ombi: at Ombi.Program.Main(String[] args)
Dec  4 00:09:29 multimedia Ombi: at Ombi.Program.<Main>(String[] args)
Dec  4 00:09:29 multimedia abrt-hook-ccpp: Process 16799 (Ombi) of user 1006 killed by SIGABRT - dumping core
Dec  4 00:09:30 multimedia systemd: ombi.service: main process exited, code=dumped, status=6/ABRT
Dec  4 00:09:30 multimedia systemd: Unit ombi.service entered failed state.
Dec  4 00:09:30 multimedia systemd: ombi.service failed.
Dec  4 00:09:30 multimedia abrt-server: Executable '/opt/Ombi/Ombi' doesn't belong to any package and ProcessUnpackaged is set to 'no'
Dec  4 00:09:30 multimedia abrt-server: 'post-create' on '/var/spool/abrt/ccpp-2020-12-04-00:09:29-16799' exited with 1
Dec  4 00:09:30 multimedia abrt-server: Deleting problem directory '/var/spool/abrt/ccpp-2020-12-04-00:09:29-16799'

Other info

Systemd ombi.service configuration is below as well:

[Unit]
Description=Ombi - PMS Requests System
Wants=plexmediaserver.service sonarr.service radarr.service
After=network-online.target plexmediaserver.service sonarr.service radarr.service

[Service]
User=ombi
Group=mediamgmt
WorkingDirectory=/opt/Ombi/
ExecStart=/opt/Ombi/Ombi
Type=simple
TimeoutStopSec=30
Restart=on-failure
RestartSec=5
UMask=0002

[Install]
WantedBy=multi-user.target
ombi-bot commented 3 years ago

Hello, Please use the Github template to report an issue. If this is a feature request, please take a look at the readme.
Thanks,
Ombi Bot

johnwchambers commented 3 years ago

Should have searched through the closed tickets more, found my fix in #3881. Thanks!