AppFabric 1.1 - 缓存问题(崩溃的Windows服务) [英] AppFabric 1.1 - problem with caching (crashing windows service)

查看:105
本文介绍了AppFabric 1.1 - 缓存问题(崩溃的Windows服务)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一台计算机(域名注册的Windows 7企业版)上安装了AppFabric 1.1 x64(主机+缓存)。安装和配置完美无缺(集群只有一台机器,配置存储在SQL中),我在本地运行所有
(包括SQL Server 2008 R2)。当我想启动"AppFabric缓存服务"时出现问题。 - 几秒钟后崩溃并且以下条目出现在管理事件中(在事件查看器中):



错误应用程序名称:DistributedCacheService。 exe,版本:1.0.4632.0,时间戳:0x4eafeccf

错误模块名称:KERNELBASE.dll,版本:6.1.7601.17651,时间戳:0x4e21213c

异常代码:0xe0434352

故障偏移:0x000000000000cacd

故障处理id:0x1928

错误应用程序启动时间:0x01ccb8c5266c0fd5

错误应用程序路径:C:\Program Files \\ \\ AppFabric 1.1 for Windows Server \DistributedCacheService.exe

错误模块路径:C:\ Windows \ system32 \ KERNELBASE.dll

报告编号:6457890a-24b8-11e1-b051-70f1a19c8456




应用程序:DistributedCacheService.exe

框架版本:v4.0.30319

描述:由于未处理的异常,进程终止。

异常信息:System.UriFormatException

堆叠:

    at Microsoft.ApplicationServer.Caching.VelocityWindowsService.StartServiceCallback(System.Object)

   在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缓存服务崩溃,异常{System。 UriFormatException:无效的URI:无法解析主机名。

   在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()

   在System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()}中。检查调试日志以获取更多信息

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


Get-CacheHost



HostName:CachePort服务名称           服务状态版本信息

-------------------- ------------            -------------- ------------
$
MW7GM0B50ROMDQ:22233 AppFabricCachingService DOWN          3 [3,3] [1,3]


Get-CacheHostConfig



cmdlet Get-CacheHostConfig在命令管道位置1

供应以下参数的值:

主机名:MW7GM0B50ROMDQ

CachePort:22233



HostName       :MW7GM0B50ROMDQ

ClusterPort    :22234

CachePort      :22233

ArbitrationPort:22235

ReplicationPort:22236
$
尺寸           :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 ...
等等


服务开始得很好,但遗憾的是,当我验证集合时使用Get-CacheHost,我收到:

  HostName:CachePort服务名称服务状态版本信息
-------------------- ---------- - -------------- ------------
MW7GM0B50ROMDQ。< domain part>:22233 AppFabricCachingService UP 0 [0,0] [ 0,0]


如果查看版本号,您会发现它很可能是不合适的。不幸的是,当我尝试手动更新此信息时(‘ Update-CacheHostAllowedVersions’),我看起来奇怪‘访问被拒绝’错误:

  Update-CacheHostAllowedVersions:ErrorCode< ERRCAdmin026>:SubStatus< ES0001>:远程注册表访问在主机MW7GM0B50ROMDQ上失败。< domain part>。检查所需权限是否可用且主机是否未关闭。


我必须做一些测试,以确定它是真的有问题还是只是烦恼。



I have a test installation of AppFabric 1.1 x64 (Hosting + Cache) on a single machine (domain-registered, Windows 7 Enterprise). Installation and configuration went flawlessly (cluster with just 1 machine, configuration stored in SQL), I'm running everything locally (including SQL Server 2008 R2). Problem occurs when I want to start "AppFabric Caching Service" - it crashes after few seconds and following entries appear in Administrative Events (in Event Viewer):

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

Here's the output from basic PowerShell commands:

Get-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

Caching Service is set up to be running as Network Service.

Do you have any clue what may be wrong? I've seen "Invalid URI: The hostname could not be parsed." message, but name in configuration seems to be perfectly ok (even if it looks odd, it's a proper name of my computer). Any help would be appreciated.

P.S. I had AppFabric 1.0 before and it seemed to work fine. I've uninstalled it before installing AppFabric 1.1.

解决方案

I've managed to find out what was the reason.

In my Windows host file I had several entries for loopback IP: localhost, {machine name} and {machine name FQDN}. When I removed all but {machine name FQDN}, configuration wizard was able to set up a proper configuration.

This was the easy way, but I learned that later...

My first (and more painful) way to fix the problem was to remove Caching Service configuration manually and re-create it from scratch using PowerShell cmdlets:

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

Service starts proplerly, but sadly, when I verify setup with Get-CacheHost, I receive:

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

If you look at version number, you'd see that it's most likely improper. Unfortunately, when I try to update this info manually (‘Update-CacheHostAllowedVersions’), I get odd looking ‘access-denied’ errors:

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.

I have to make some more tests to find out if it's really a problem or just annoyance.


这篇关于AppFabric 1.1 - 缓存问题(崩溃的Windows服务)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆