Was able to recently set up SSL.
When I go to Configuration > Plugins and try to refresh list of local plugins
- I get : 502 Bad Gateway
Refreshing local plugins results in Bad Gateway 502
Monday, November 25, 2024 5:56:45 PM
TL;DR: Hosting via Windows Service might cause issue atm with StopApplication (IApplicationLifetime) and maybe we could open the discussion about incorporating dynamic loading/unloading of modules and their dependencies which might be in the works for .NET Core 3.0.
As per my previous reply regarding the Bad Gateway 502. I should have looked at the code. So the app domain is gracefully shut down, thus, there's nothing there for the reverse proxy. Poof. Bad Gateway in this case, unless I'm missing something else.
RE: ReloadList
https://github.com/grandnode/grandnode/blob/b83634811f3b0bf0c53f28fa44a5b67ee7328ce7/Grand.Core/WebHelper.cs
/// <summary>
/// Restart application domain
/// </summary>
public virtual void RestartAppDomain()
{
if(OperatingSystem.IsWindows())
File.SetLastWriteTimeUtc(CommonHelper.MapPath("~/web.config"), DateTime.UtcNow);
else
_applicationLifetime.StopApplication();
}
Perhaps not an issue while running as a console app on Windows, if GrandNode is running as a service there might be current complications with gracefully shutting down the app (StopApplication) as per: https://github.com/aspnet/Hosting/issues/1463
I suppose my question is, why is an application shutdown the adopted approach for uninstalling/installing/refreshing plugins? Perhaps a current limitation or the easiest approach and I am a fan of simple solutions. However, figured I would bring up a few things to keep in mind for future reference regarding dynamic loading/unloading of modules and their dependencies.
Dynamic loading:
https://natemcmaster.com/blog/2018/07/25/netcore-plugins/
Current limitations or future plans for dynamic unloading:
With the release of .NET Core 3.0, maybe taking a look at the following:
https://github.com/natemcmaster/DotNetCorePlugins/issues/16
w/ ref to:
https://github.com/dotnet/coreclr/issues/552
https://github.com/dotnet/coreclr/pull/18476
https://github.com/dotnet/corefx/issues/14724
https://github.com/dotnet/coreclr/projects/9
As per my previous reply regarding the Bad Gateway 502. I should have looked at the code. So the app domain is gracefully shut down, thus, there's nothing there for the reverse proxy. Poof. Bad Gateway in this case, unless I'm missing something else.
RE: ReloadList
https://github.com/grandnode/grandnode/blob/b83634811f3b0bf0c53f28fa44a5b67ee7328ce7/Grand.Core/WebHelper.cs
/// <summary>
/// Restart application domain
/// </summary>
public virtual void RestartAppDomain()
{
if(OperatingSystem.IsWindows())
File.SetLastWriteTimeUtc(CommonHelper.MapPath("~/web.config"), DateTime.UtcNow);
else
_applicationLifetime.StopApplication();
}
Perhaps not an issue while running as a console app on Windows, if GrandNode is running as a service there might be current complications with gracefully shutting down the app (StopApplication) as per: https://github.com/aspnet/Hosting/issues/1463
I suppose my question is, why is an application shutdown the adopted approach for uninstalling/installing/refreshing plugins? Perhaps a current limitation or the easiest approach and I am a fan of simple solutions. However, figured I would bring up a few things to keep in mind for future reference regarding dynamic loading/unloading of modules and their dependencies.
Dynamic loading:
https://natemcmaster.com/blog/2018/07/25/netcore-plugins/
Current limitations or future plans for dynamic unloading:
With the release of .NET Core 3.0, maybe taking a look at the following:
https://github.com/natemcmaster/DotNetCorePlugins/issues/16
w/ ref to:
https://github.com/dotnet/coreclr/issues/552
https://github.com/dotnet/coreclr/pull/18476
https://github.com/dotnet/corefx/issues/14724
https://github.com/dotnet/coreclr/projects/9
0
Bill,
If you add new plugin and want to reload list of it, application has to stop and start again. In the other case, you won't see new plugins on the list. By the time we found a solution, which will be effective and fine, users need to refresh page manually.
But we will look at your suggestions.
Best,
Patryk
If you add new plugin and want to reload list of it, application has to stop and start again. In the other case, you won't see new plugins on the list. By the time we found a solution, which will be effective and fine, users need to refresh page manually.
But we will look at your suggestions.
Best,
Patryk
Best regards,
Patryk
GrandNode Team
Patryk
GrandNode Team
0