You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
命令行:
E:\publish\ScheduleMaster\Worker1>dotnet Hos.ScheduleMaster.QuartzHost.dll
Security Warning: The negotiated TLS 1.0 is an insecure protocol and is supported for backward compa
tibility only. The recommended protocol version is TLS 1.2 and later.
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
Now listening on: https://localhost:5001
info: Hos.ScheduleMaster.QuartzHost.AppStart.AppLifetimeHostedService[0]
Hosted service OnStarted
info: Hos.ScheduleMaster.QuartzHost.AppStart.AppLifetimeHostedService[0]
enabled auto register...
info: Hos.ScheduleMaster.QuartzHost.AppStart.ConfigurationRefreshService[0]
ConfigurationRefresh Finished.
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: E:\publish\ScheduleMaster\Worker1
info: Hos.ScheduleMaster.QuartzHost.AppStart.ConfigurationRefreshService[0]
ConfigurationRefresh Finished.
The text was updated successfully, but these errors were encountered:
作者您好,刚学习这个作品,在使用前期遇到一些问题,请作者指点。
1、在master-node的appconfig中配置了port,启动后仍是30000端口。是否是因为启动代码中使用了固定30000端口?如要在配置文件中获取端口,需做什么修改?
源码:
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup();
webBuilder.UseUrls("http://*:30000");
})
2、work-node配置文件中配置了port,为何启动时要带参数urls来限定端口?
文档说明:
dotnet Hos.ScheduleMaster.QuartzHost.dll --urls http://*:30001
3、直接执行dotnet Hos.ScheduleMaster.QuartzHost.dll,使用了随机端口,如何使用配置文件中的port?
命令行:
E:\publish\ScheduleMaster\Worker1>dotnet Hos.ScheduleMaster.QuartzHost.dll
Security Warning: The negotiated TLS 1.0 is an insecure protocol and is supported for backward compa
tibility only. The recommended protocol version is TLS 1.2 and later.
info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://localhost:5000
info: Microsoft.Hosting.Lifetime[0]
Now listening on: https://localhost:5001
info: Hos.ScheduleMaster.QuartzHost.AppStart.AppLifetimeHostedService[0]
Hosted service OnStarted
info: Hos.ScheduleMaster.QuartzHost.AppStart.AppLifetimeHostedService[0]
enabled auto register...
info: Hos.ScheduleMaster.QuartzHost.AppStart.ConfigurationRefreshService[0]
ConfigurationRefresh Finished.
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: E:\publish\ScheduleMaster\Worker1
info: Hos.ScheduleMaster.QuartzHost.AppStart.ConfigurationRefreshService[0]
ConfigurationRefresh Finished.
The text was updated successfully, but these errors were encountered: