尝试从 powershell 启动 appfabric 缓存集群时访问被拒绝
我有一些使用 appfabric 的代码并收到服务器不可用错误。按照 http://msdn.microsoft.com/en-us/library/ff921031.aspx< 中的说明进行操作/a> 我发现我的缓存集群已关闭。我以管理员身份打开 powershell 并运行 Start-CacheCluster。几分钟后,我收到一条错误消息:
Start-CacheCluster : Could not start cluster: ErrorCode<ERRCAdmin025>:SubStatus
<ES0001>:Time-out occurred in starting the cluster.
At line:1 char:19
+ Start-CacheCluster <<<<
+ CategoryInfo : NotSpecified: (:) [Start-CacheCluster], DataCach
eException
+ FullyQualifiedErrorId : ERRCAdmin025,Microsoft.ApplicationServer.Caching
.Commands.StartCacheClusterCommand
检查事件日志显示:
Service cannot be started. System.TypeInitializationException: The type initializer for 'Microsoft.ApplicationServer.Caching.ConfigManager' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Fabric.Common.ConsoleSink' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Access to the path 'C:\Windows\System32\AppFabric\DistributedCacheService.exe.config' is denied. (C:\Windows\System32\AppFabric\DistributedCacheService.exe.config) ---> System.UnauthorizedAccessException: Access to the path 'C:\Windows\System32\AppFabric\DistributedCacheService.exe.config' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBU...
有更多 AppFabric 经验的人以前见过这个吗?
-谢谢
I have some code that uses appfabric and was getting server unavailability errors. Following the instructions at http://msdn.microsoft.com/en-us/library/ff921031.aspx I found that my cache cluster was down. I opened up powershell as an administrator and ran Start-CacheCluster. After a few minutes I receive an error message:
Start-CacheCluster : Could not start cluster: ErrorCode<ERRCAdmin025>:SubStatus
<ES0001>:Time-out occurred in starting the cluster.
At line:1 char:19
+ Start-CacheCluster <<<<
+ CategoryInfo : NotSpecified: (:) [Start-CacheCluster], DataCach
eException
+ FullyQualifiedErrorId : ERRCAdmin025,Microsoft.ApplicationServer.Caching
.Commands.StartCacheClusterCommand
Checking the event logs reveals this:
Service cannot be started. System.TypeInitializationException: The type initializer for 'Microsoft.ApplicationServer.Caching.ConfigManager' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Microsoft.Fabric.Common.ConsoleSink' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Access to the path 'C:\Windows\System32\AppFabric\DistributedCacheService.exe.config' is denied. (C:\Windows\System32\AppFabric\DistributedCacheService.exe.config) ---> System.UnauthorizedAccessException: Access to the path 'C:\Windows\System32\AppFabric\DistributedCacheService.exe.config' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBU...
Has anyone with more AppFabric experience seen this before?
-Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
尝试
Microsoft
、Windows
、应用程序服务器系统服务
和Admin
日志。有时,此日志将为您提供一些常规事件日志中不存在的更多信息。有关缓存群集监控的详细信息,请参阅运行状况监控工具。关于你的问题。我唯一想说的是,在启动缓存集群后,它会加载配置,并且由于失败,它最终将使 AppFabric 缓存服务崩溃(您将在上面提到的事件日志中看到该信息)。
确保将 AppFabric 缓存服务配置为在有权访问配置文件
DistributedCacheService.exe.config
以及配置存储库(Velocity 配置 DB 或配置 XML)的帐户下运行。Try
Microsoft
,Windows
,Application Server-System Services
andAdmin
log. Sometimes this log will give you some more info that is not present in the regular eventlog. For more information about cache cluster monitoring see Health Monitoring Tools.Regarding your issue. The only think I would say is that after starting the cache cluster it loads configuration and because it fails, it will eventually crash the AppFabric Caching Service (you will see that information in the eventlog mentioned above).
Make sure you have AppFabric Caching Service configured to run under an account that has access to the configuration file
DistributedCacheService.exe.config
as well as to the configuration repository (Velocity configuration DB or configuration XML).您需要以管理员身份运行“缓存管理 Windows PowerShell”。
You need to run the "Caching administration Windows PowerShell" as Administrator.
您是否检查过 AppFabricCachingService 登录是否具有对 DistributedCacheService.exe.config 的读取权限?
就我而言,我使用的是 XML 提供程序,并且有一个名为“CacheConfig”的配置共享。我的服务器未加入域,因此我为缓存主机配置了本地“AppFabric”用户。我正在使用 PowerShell 编写配置脚本:
当我运行脚本时,
Start-CacheCluster
语句失败,并出现与您的问题相同的访问被拒绝错误。然后,我检查了 AppFabricCachingService 登录,发现它已设置为 NETWORK SERVICE。检查C:\Windows\System32\AppFabric\DistributedCacheService.exe.config上的文件权限时,发现AppFabric用户有读取权限,但没有NETWORK权限服务。这向我表明 Register-CacheHost 或 Add-CacheHost 小程序假定缓存主机帐户和服务帐户相同。就我而言,我为NETWORK SERVICE文件添加了读取权限,这解决了问题。
Have you checked that the AppFabricCachingService logon has read access to DistributedCacheService.exe.config?
In my case, I am using an XML provider and have a config share named "CacheConfig". My server is not joined to a domain so I have configured a local "AppFabric" user for the cache host. I am using PowerShell to script the config:
When I ran the script the
Start-CacheCluster
statement failed with the same access denied error as in your question. I then checked the AppFabricCachingService logon and found it was set to NETWORK SERVICE. When I checked the file permissions on C:\Windows\System32\AppFabric\DistributedCacheService.exe.config, I found that there was a read permission for the AppFabric user, but no permissions for NETWORK SERVICE. This indicates to me that the Register-CacheHost or Add-CacheHost applet assumes that the cache host account and the service account will be the same.In my case I added a read permission to the file for NETWORK SERVICE and that fixed the problem.
以下不是您的确切问题,但可能会有所帮助: http://social.msdn.microsoft.com/Forums/en-US/velocity/thread/4fd844f6-3530-4115-8982-d7562e699627/#6bf2825a-cd1d-4659-b6ce-375a0fb0ab38
The following isn't your exact problem, but may help: http://social.msdn.microsoft.com/Forums/en-US/velocity/thread/4fd844f6-3530-4115-8982-d7562e699627/#6bf2825a-cd1d-4659-b6ce-375a0fb0ab38
我也遇到了这个问题,因为我的 AppFabric 服务器遇到了未知的问题。我花了很多时间来寻找解决方案。最后,我成功尝试的唯一方法是卸载/重新安装AppFabric。并再次配置设置。希望这有帮助!
I also ran into the problem since my AppFabric server suffered something unknown. I spent much time for finding the solution. Finally the only way I tried successfully is to uninstall / re-install the AppFabric. And configure the settings once again. Hope this helps !
我遇到了同样的问题,因为我多次安装了 appfabric 缓存服务。每次更改 hostId 时,它必须与 ClusterConfig.xml 和 DistributedCacheService.exe.config 文件相同的 hostId
I had same issue cause I installed appfabric cache service more than one times. Each times hostId was changed it must be same hostId with ClusterConfig.xml and DistributedCacheService.exe.config file