简体   繁体   English

AppFabric无法创建DataCache(LMTRepopulationJob FAILS)

[英]AppFabric unable to create a DataCache (LMTRepopulationJob FAILS)

Well first of all, I am learning sharepoint 2013 and I have been following a few tutorials, so far I just setup a farm and everything seems to be working properly except for this service that is being logged into the event viewer every 5 minutes: 首先,我正在学习sharepoint 2013,我一直在学习一些教程,到目前为止我只是设置了一个农场,除了每5分钟登录到事件查看器的服务外,一切似乎都正常工作:

The Execute method of job definition Microsoft.Office.Server.UserProfiles.LMTRepopulationJob (ID 1e573155-b7f6-441b-919b-53b2f05770f7) threw an exception. 作业定义的执行方法Microsoft.Office.Server.UserProfiles.LMTRepopulationJob(ID 1e573155-b7f6-441b-919b-53b2f05770f7)引发了异常。 More information is included below. 更多信息包括在下面。

Unexpected exception in FeedCacheService.BulkLMTUpdate: Unable to create a DataCache. FeedCacheService.BulkLMTUpdate中出现意外异常:无法创建DataCache。 SPDistributedCache is probably down.. SPDistributedCache可能已关闭..

I found out that this is a job that is configured to execute every 5 minutes 我发现这是一个配置为每5分钟执行一次的工作

在此输入图像描述

But regarding the assumption that the SPDistributedCache is probably down, I already verified it and it is running 但是关于SPDistributedCache可能已关闭的假设,我已经验证了它并且它正在运行

在此输入图像描述

在此输入图像描述

As you can see, it is actually running, also I checked the host cache via SP powershell ( get-cachehost and get-cacheclusterhealth ) and still all seems fine 正如你所看到的,它实际上正在运行,我也通过SP powershell( get-cachehostget-cacheclusterhealth )检查了主机缓存,但仍然看起来都很好

在此输入图像描述

Yet when I execute the command get-cache I am getting only the default value, and for what I have read there should be listed another cache types like: 然而,当我执行命令get-cache我只得到默认值,而对于我所读到的内容,应该列出另外的缓存类型,如:

DistributedAccessCache_XXXXXXXXXXXXXXXXXXXXXXXXX DistributedBouncerCache_XXXXXXXXXXXXXXXXXXXXXXXX DistributedSearchCache_XXXXXXXXXXXXXXXXXXXXXXXXX DistributedServerToAppServerAccessTokenCache_XXXXXXX DistributedViewStateCache_XXXXXXXXXXXXXXXXXXXXXXX DistributedAccessCache_XXXXXXXXXXXXXXXXXXXXXXXXX DistributedBouncerCache_XXXXXXXXXXXXXXXXXXXXXXXX DistributedSearchCache_XXXXXXXXXXXXXXXXXXXXXXXXX DistributedServerToAppServerAccessTokenCache_XXXXXXX DistributedViewStateCache_XXXXXXXXXXXXXXXXXXXXXXX

Among others which I think probably should include DataCache 其中我认为可能应该包括DataCache

在此输入图像描述

Until now I already tried a few workaround but without success 到目前为止,我已经尝试了一些解决方法,但没有成功

Restart-Service AppFabricCachingService
Remove-SPDistributedCacheServiceInstance
Add-SPDistributedCacheServiceInstance
Restart-CacheCluster

Even this script that it seems to work on many cases to repair the AppFabric Caching Service 甚至这个脚本似乎可以在很多情况下修复AppFabric缓存服务

$SPFarm = Get-SPFarm
$cacheClusterName = "SPDistributedCacheCluster_" + $SPFarm.Id.ToString()
$cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local
$cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName);
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq $env:computername}
$serviceInstance.Delete()
Add-SPDistributedCacheServiceInstance
$cacheClusterInfo.CacheHostsInfoCollection

Well if anyone has any suggestion, I will appreciate very much, thank you in advance! 好吧,如果有人有任何建议,我将非常感谢,提前谢谢你!

This is a generic error message, meaning that the real issue isn't known (hence the word "Probably"). 这是一个通用的错误消息,意味着真正的问题是未知的(因此“可能”一词)。

I believe that the key to solving this problem when it is not the Probably , is in looking in the ULS log for the events that have occurred just before it. 我认为解决这个问题的关键在于它不是可能的,就是在ULS日志中查找之前发生的事件。 Events of type "Unexpected", do not appear in the events log and are often seen before a generaic type of error. 类型为“Unexpected”的事件不会出现在事件日志中,并且经常出现在一般类型的错误之前。

In many cases you might see something like "File not Found". 在许多情况下,您可能会看到类似“未找到文件”的内容。 This usually means that the noted file is not in the assembly cache. 这通常意味着所提到的文件不在程序集缓存中。 Since the distributed Cache utilizes the AppFabric, which is outside of Sharepoint, then the only way for Sharepoint to find it's file, is to look in the assembly cache. 由于分布式缓存利用了Sharepoint之外的AppFabric,因此Sharepoint找到它的文件的唯一方法是查看程序集缓存。 The sharepoint pre Installer should have put the files there, but it might have failed or maybe someone uninstalled the App Fabric and re Installed it manually, which would have removed the files from the assembly and not put them back. sharepoint预安装程序应该将文件放在那里,但它可能已经失败,或者有人卸载了App Fabric并重新安装了它,这将从程序集中删除文件而不是将它们放回去。

Before Restart-CacheCluster you could specify the connection to your SharePoint Database (The catalog name could be not the same) Restart-CacheCluster之前,您可以指定与SharePoint数据库的连接(目录名称可能不同)

Use-CacheCluster -ConnectionString "Data Source=(SharePoint DB Server)
\\(Optional Instance);Initial Catalog=CacheClusterConfigurationDB;
Integrated Security=True" -ProviderType System.Data.SqlClient

NOTE: It doesn't work permanently 注意:它不会永久工作

NOTE 2: If you don't have named instance on DB Server, just put the name of your server without "\\". 注意2:如果您在数据库服务器上没有命名实例,只需将服务器名称放在“\\”下即可。

If you don't have a catalog, you could follow this script 如果您没有目录,则可以按照此脚本进行操作

***
Remove-Cache default
New-Cache SharePointCache
Get-CacheConfig SharePointCache
Set-CacheConfig SharePointCache -NotificationsEnabled True
***
New-CacheCluster -Provider System.Data.SqlClient -ConnectionString  "Data     Source=(SharePoint DB Server)\\(Optional Instance);Initial Catalog=CacheClusterConfigurationDB;Integrated Security=True" -Size Small

Register-CacheHost -Provider System.Data.SqlClient -ConnectionString  "Data Source=(SharePoint DB Server)\\(Optional Instance);Initial Catalog=CacheClusterConfigurationDB;Integrated Security=True"  -Account "Domain\spservices_account" -CachePort 22233 -ClusterPort 22234  -ArbitrationPort 22235 -ReplicationPort 22236 -HostName  [Name_of_your_server]

Add-CacheHost -Provider System.Data.SqlClient -ConnectionString  "Data Source=(SharePoint DB Server)\\(Optional Instance);Initial Catalog=CacheClusterConfigurationDB;Integrated Security=True" -Account "Domain\spservices_account"

Add-CacheAdmin -Provider System.Data.SqlClient -ConnectionString  "Data Source=(SharePoint DB Server)\\(Optional Instance);Initial Catalog=CacheClusterConfigurationDB;Integrated Security=True" 

Use-CacheCluster

You could specify or check your database configuration in regedit 您可以在regedit中指定或检查数据库配置

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppFabric\V1.0\Configuration

Look for ConnectionString string value, and set your connection string 查找ConnectionString字符串值,并设置连接字符串

Data Source=(SharePoint DB Server)\(Optional Instance);Initial Catalog=CacheClusterConfigurationDB;Integrated Security=True

To query the status of the server you could use: 要查询您可以使用的服务器的状态:

Get-SPServiceInstance | ? {($_.service.tostring()) -eq “SPDistributedCacheService Name=AppFabricCachingService”} | select Server, Status
Get-SPServer | ? {($_.ServiceInstances | % TypeName) -contains "Distributed Cache"} | % Address
Get-AFCache | Format-Table –AutoSize
Get-CacheHost

Aditional: If you need to change your service account, you could do this procedure: 条件:如果您需要更改服务帐户,可以执行以下步骤:

$f = Get-SPFarm
$svc = $f.Services | ? {$_.Name -eq "AppFabricCachingService"}
$acc = Get-SPManagedAccount -Identity "Domain\spservices_account"
$svc.ProcessIdentity.CurrentIdentityType = "SpecificUser"
$svc.ProcessIdentity.ManagedAccount = $acc
$svc.ProcessIdentity.Update()
$svc.ProcessIdentity.Deploy()

have you changed the distributed cache account from the farm account? 您是否从场帐户更改了分布式缓存帐户? what build number are you on? 你打算用什么编号? is this a single server farm? 这是一个单一的服务器场吗?

off the top of my head, the only thing left is this: 在我的头顶,唯一剩下的是这个:

Grant-CacheAllowedClientAccount -Account "domain\\ProfileserviceWebAppIdentity" Grant-CacheAllowedClientAccount -Account“domain \\ ProfileserviceWebAppIdentity”

i would do an iisreset and restart the owstimer service after you run this command. 运行此命令后,我会执行iisreset并重新启动owstimer服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM