การเข้าถึงถูกปฏิเสธขณะพยายามเริ่มคลัสเตอร์แคชของ appfabric จาก PowerShell

ฉันมีโค้ดบางส่วนที่ใช้ appfabric และได้รับข้อผิดพลาดเกี่ยวกับความไม่พร้อมใช้งานของเซิร์ฟเวอร์ ทำตามคำแนะนำที่ http://msdn.microsoft.com/en-us/library/ff921031.aspx ฉันพบว่าคลัสเตอร์แคชของฉันหยุดทำงาน ฉันเปิด 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 มากกว่านี้เคยเห็นสิ่งนี้มาก่อนหรือไม่

-ขอบคุณ


person William    schedule 07.09.2011    source แหล่งที่มา


คำตอบ (6)


ลองบันทึก Microsoft, Windows, Application Server-System Services และ Admin บางครั้งบันทึกนี้จะให้ข้อมูลเพิ่มเติมบางอย่างที่ไม่มีอยู่ในบันทึกเหตุการณ์ปกติ สำหรับข้อมูลเพิ่มเติมเกี่ยวกับการตรวจสอบคลัสเตอร์แคช โปรดดูเครื่องมือตรวจสอบสุขภาพ

เกี่ยวกับปัญหาของคุณ สิ่งเดียวที่ฉันจะพูดคือหลังจากเริ่มคลัสเตอร์แคชแล้ว คลัสเตอร์แคชจะโหลดการกำหนดค่า และเนื่องจากล้มเหลว จะทำให้ AppFabric Caching Service เสียหายในที่สุด (คุณจะเห็นข้อมูลดังกล่าวในบันทึกเหตุการณ์ที่กล่าวถึงข้างต้น)

ตรวจสอบให้แน่ใจว่าคุณได้กำหนดค่า AppFabric Caching Service ให้ทำงานภายใต้บัญชีที่มีสิทธิ์เข้าถึงไฟล์การกำหนดค่า DistributedCacheService.exe.config รวมถึงที่เก็บการกำหนดค่า (DB การกำหนดค่า Velocity หรือ XML การกำหนดค่า)

person David Pokluda    schedule 08.09.2011
comment
การให้สิทธิ์บัญชีบริการแก่ไฟล์ DistributedCacheService.exe.config ที่อยู่ภายใต้ \Program Files\AppFabric 1.1 สำหรับ Windows Server\ ทำเคล็ดลับสำหรับฉัน ขอบคุณเดฟ! - person peanutbutter_lou; 21.03.2013

คุณต้องเรียกใช้ "การดูแลระบบแคช Windows PowerShell" ในฐานะผู้ดูแลระบบ

person hakksor    schedule 12.09.2011

คุณได้ตรวจสอบแล้วว่าการเข้าสู่ระบบ AppFabricCachingService มีสิทธิ์อ่าน DistributedCacheService.exe.config หรือไม่

ในกรณีของฉัน ฉันใช้ผู้ให้บริการ XML และมีส่วนแบ่งการกำหนดค่าชื่อ "CacheConfig" เซิร์ฟเวอร์ของฉันไม่ได้เข้าร่วมกับโดเมน ดังนั้นฉันจึงกำหนดค่าผู้ใช้ "AppFabric" ในเครื่องสำหรับโฮสต์แคช ฉันใช้ PowerShell เพื่อสคริปต์การกำหนดค่า:

Register-CacheHost -Provider XML -ConnectionString "\\MY-HOST\CacheConfig" -Account "AppFabric" -CachePort 22233 -ClusterPort 22234  -ArbitrationPort 22235 -ReplicationPort 22236 -HostName MY-HOST
Add-CacheHost -Provider XML -ConnectionString "\\MY-HOST\CacheConfig" -Account "AppFabric"
#...
Start-CacheCluster
#...

เมื่อฉันรันสคริปต์คำสั่ง Start-CacheCluster ล้มเหลวโดยมีข้อผิดพลาดการเข้าถึงถูกปฏิเสธเช่นเดียวกับในคำถามของคุณ จากนั้น ฉันตรวจสอบการเข้าสู่ระบบ AppFabricCachingService และพบว่ามีการตั้งค่าเป็น บริการเครือข่าย เมื่อฉันตรวจสอบสิทธิ์ของไฟล์บน C:\Windows\System32\AppFabric\DistributedCacheService.exe.config ฉันพบว่ามีสิทธิ์ในการอ่านสำหรับผู้ใช้ AppFabric แต่ไม่มีสิทธิ์สำหรับ NETWORK บริการ. สิ่งนี้ทำให้ฉันทราบว่าแอปเพล็ต Register-CacheHost หรือ Add-CacheHost ถือว่าบัญชีโฮสต์แคชและบัญชีบริการจะเหมือนกัน

ในกรณีของฉัน ฉันได้เพิ่มสิทธิ์ในการอ่านไฟล์สำหรับ บริการเครือข่าย และนั่นช่วยแก้ไขปัญหาได้

person DanielLarsenNZ    schedule 27.03.2012

ต่อไปนี้ไม่ใช่ปัญหาที่แน่นอนของคุณ แต่อาจช่วยได้: http://social.msdn.microsoft.com/Forums/en-US/velocity/thread/4fd844f6-3530-4115-8982-d7562e699627/ #6bf2825a-cd1d-4659-b6ce-375a0fb0ab38

person s1mm0t    schedule 18.10.2011

ฉันยังประสบปัญหาเนื่องจากเซิร์ฟเวอร์ AppFabric ของฉันประสบกับสิ่งที่ไม่ทราบ ฉันใช้เวลามากในการหาวิธีแก้ปัญหา ในที่สุดวิธีเดียวที่ฉันพยายามสำเร็จคือการถอนการติดตั้ง / ติดตั้ง AppFabric ใหม่ และกำหนดการตั้งค่าอีกครั้ง หวังว่านี่จะช่วยได้!

person Jeff T.    schedule 30.01.2015

ฉันมีปัญหาเดียวกัน เพราะฉันติดตั้งบริการแคชของ appfabric มากกว่าหนึ่งครั้ง แต่ละครั้งที่มีการเปลี่ยนแปลง HostId จะต้องเป็น HostId เดียวกันกับไฟล์ ClusterConfig.xml และ DistributedCacheService.exe.config

person vast    schedule 15.03.2016