AppFabric 1.1缓存(崩溃的Windows服务)

问题描述:

我在单台机器(域注册的Windows 7企业版)上安装了AppFabric 1.1 x64(Hosting + Cache)。安装和配置完美无瑕(只有一台机器的集群,存储在SQL中的配置),我在本地运行一切(包括SQL Server 2008 R2)。当我要开始“AppFabric缓存服务”出现问题 - 它崩溃了几秒钟后,并输入以下内容出现在管理事件(在事件查看器):AppFabric 1.1缓存(崩溃的Windows服务)

Faulting application name: DistributedCacheService.exe, version: 1.0.4632.0, time stamp: 0x4eafeccf 
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e21213c 
Exception code: 0xe0434352 
Fault offset: 0x000000000000cacd 
Faulting process id: 0x1928 
Faulting application start time: 0x01ccb8c5266c0fd5 
Faulting application path: C:\Program Files\AppFabric 1.1 for Windows Server\DistributedCacheService.exe 
Faulting module path: C:\Windows\system32\KERNELBASE.dll 
Report Id: 6457890a-24b8-11e1-b051-70f1a19c8456 

Application: DistributedCacheService.exe 
Framework Version: v4.0.30319 
Description: The process was terminated due to an unhandled exception. 
Exception Info: System.UriFormatException 
Stack: 
    at Microsoft.ApplicationServer.Caching.VelocityWindowsService.StartServiceCallback(System.Object) 
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 
    at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() 
    at System.Threading.ThreadPoolWorkQueue.Dispatch() 
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() 

AppFabric Caching service crashed with exception {System.UriFormatException: Invalid URI: The hostname could not be parsed. 
    at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) 
    at Microsoft.ApplicationServer.Caching.ServiceConfigurationManager.InitializeThisHostData() 
    at Microsoft.ApplicationServer.Caching.ServiceConfigurationManager.InitializeDataFromGlobalConfig() 
    at Microsoft.ApplicationServer.Caching.VelocityWindowsService.StartService(Boolean deleteTKT) 
    at Microsoft.ApplicationServer.Caching.VelocityWindowsService.StartServiceCallback(Object context) 
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) 
    at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() 
    at System.Threading.ThreadPoolWorkQueue.Dispatch() 
    at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()}. Check debug log for more information 

下面是基本PowerShell命令的输出:

获取-CacheHost

HostName : CachePort Service Name   Service Status Version Info 
-------------------- ------------   -------------- ------------ 
MW7GM0B50ROMDQ:22233 AppFabricCachingService DOWN   3 [3,3][1,3] 

GET-CacheHostConfig

cmdlet Get-CacheHostConfig at command pipeline position 1 
Supply values for the following parameters: 
HostName: MW7GM0B50ROMDQ 
CachePort: 22233 

HostName  : MW7GM0B50ROMDQ 
ClusterPort  : 22234 
CachePort  : 22233 
ArbitrationPort : 22235 
ReplicationPort : 22236 
Size   : 3994 MB 
ServiceName  : AppFabricCachingService 
HighWatermark : 99% 
LowWatermark : 90% 
IsLeadHost  : True 

缓存服务被设置为被作为网络服务运行。

你有什么线索可能是错的吗?我见过“URI无效:主机名无法解析。”消息,但配置中的名称似乎完全正常(即使它看起来很奇怪,它是我的计算机的专有名称)。任何帮助,将不胜感激。

P.S.我之前有过AppFabric 1.0,它似乎工作正常。我在安装AppFabric 1.1之前卸载了它。

我设法找出是什么原因。

在我的Windows主机文件中,我有几个用于回送IP的条目:localhost,{machine name}和{machine name FQDN}。当我除去{机器名称FQDN}以外的所有内容时,配置向导能够设置正确的配置。

这是最简单的方式,但我得知后...

我来解决这个问题第一(和更痛苦)的方式是手动删除缓存服务的配置,并从头开始使用PowerShell重新创建的cmdlet:

Import-Module ApplicationServer 
Import-Module DistributedCacheAdministration 
Import-Module DistributedCacheConfiguration 
New-CacheCluster ... 
Register-CacheHost ... 
Add-CacheHost ... 
Add-CacheAdmin ... 
etc. 

服务启动proplerly,但可悲的是,当我验证与获取-CacheHost设置,我得到:

HostName : CachePort      Service Name   Service Status Version Info 
--------------------      ------------   -------------- ------------ 
MW7GM0B50ROMDQ.<domain part>:22233   AppFabricCachingService UP    0 [0,0][0,0] 

如果你看一下版本数字,你会发现这很可能是不恰当的。不幸的是,当我尝试手动更新此信息(“更新-CacheHostAllowedVersions”),我得到奇怪的看着“访问被拒绝”的错误:

Update-CacheHostAllowedVersions : ErrorCode<ERRCAdmin026>:SubStatus<ES0001>:Remote registry access failed on host MW7GM0B50ROMDQ.<domain part>. Check if the required permissions are available and the host is not down. 

我必须做一些测试,以找出是否这真是一个问题或只是烦恼。

+0

我已经成功地树立了正确的版本信息,但遗憾的是... ,客户端连接导致AppFabric缓存服务崩溃并带来一个有趣的评论:“无效的枚举值'AdditionalRoutingProps'无法反序列化到类型'Microsoft.ApplicationServer.Caching.NamedCacheProp erty'”。我已经向微软提出了这个问题,也许他们能够提供帮助。 –

+0

问题解决。 GAC中的AppFabric DLL仍然是安装在1.0发行版中的DLL。只能在Program Files的AppFabric目录中找到1.1个DLL(或者你选择安装它的任何地方)。 总结 - 我是(并非故意)试图访问1.1客户端的服务器。更新项目中的引用后,一切正常。 –

+0

谢谢!这救了我,从HOSTS文件中删除条目解决了我的问题。我有一个只有{machinename}的条目,一旦删除了一切开始工作。 – Dribbel

我遇到了类似/相同的问题,但修复HOST并没有帮助。我的问题的核心是我的服务器有很长的(8 +字符)名称。在配置高速缓存时修剪了它。

第一个有用的提示是Get-CacheHost输出名称不正确。然后,解决方案很简单:

  1. Export-CacheClusterConfig -Path <path>\config.xml
  2. 编辑文件和修复您的主机
  3. Import-CacheClusterConfig -Path <path>\config.xml
  4. Start-CacheCluster
+0

就我而言,我的台式电脑已被移到另一个域。解决方法与主机名是dns名称相同。 –