尝试恢复ActorService的备份并收到以下错误:Method not found: 'Void System.Fabric.RestoreSettings..ctor(Boolean, Boolean)'
没有内在的例外。
这是一个自定义actor服务,它扩展了ActorService
并实现了一个扩展IActorService
的接口
我已经检查了传入的backupFolder,它是有效的并且在其中有备份。鉴于它已经恢复,我认为它并不相关,但这是从Azure blob存储中检索到的备份
这是抛出异常的行:
await restoreCtx.RestoreAsync(restoreRescription, cancellationToken);
这是它所处的方法:
protected override async Task<bool> OnDataLossAsync(RestoreContext restoreCtx, CancellationToken cancellationToken)
{
try
{
string backupFolder;
backupFolder = await this.backupManager.RestoreLatestBackupToTempLocation(cancellationToken);
RestoreDescription restoreRescription = new RestoreDescription(backupFolder, RestorePolicy.Force);
await restoreCtx.RestoreAsync(restoreRescription, cancellationToken);
DirectoryInfo tempRestoreDirectory = new DirectoryInfo(backupFolder);
tempRestoreDirectory.Delete(true);
return true;
}
catch (Exception e)
{
ActorEventSource.Current.Message("Restoration failed: " + "{0} {1}" + e.GetType() + e.Message);
throw;
}
}
答案 0 :(得分:1)
正如@VaclavTurecek所建议的那样,问题在于Service Fabric Nuget软件包是在服务器上安装的运行时之前的版本(在本例中是我的本地机器)。通过Web平台安装程序进行更新已解决了该问题。