AppFabric的客户端虚拟机问题 [英] AppFabric client Virtual Machine issue

查看:180
本文介绍了AppFabric的客户端虚拟机问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的AppFabric缓存群集服务器,我可以用我的dev的机器作为客户它的工作。为了模拟不同的Web服务器访问缓存的集群服务器,我创建了一个VMware虚拟机并安装了Visual Studio 2010和我的Web应用程序。从虚拟机作为客户端,当我试图让缓存,我得到以下错误...请帮助..感谢..

错误code:子状态:有一个临时故障。请稍后再试。 (一个或多个指定的缓存服务器不可用,这可能是网络繁忙或服务器引起的。对于导通premises缓存集群,也验证了以下条件:确保安全权限已被授予此客户帐户,并检查该AppFabric缓存服务是通过在所有缓存主机防火墙。另外在服务器上MAXBUFFERSIZE必须大于或等于从客户端发送的序列化的对象的大小。)

我注意到,内部异常是

服务器已拒绝客户端凭据。

所以..经过一番研究。我添加了以下行来我的配置

 < securityProperties模式=无的ProtectionLevel =无/>

所以,现在,我dataCacheClient的配置如下所示:

 < dataCacheClients>
    < dataCacheClient NAME =默认>
    < localCache
    isEnabled =真
    同步=NotificationBased
    objectCount =10000
    ttlValue =10/>
    <主机>
      <主机名=MyCacheClusterServerMachinecachePort =22233/>
    < /主机>
    < securityProperties模式=无的ProtectionLevel =无/>
  < / dataCacheClient>

以上的配置更改后..我收到以下错误:

套​​接字连接被中止。这可能是一个错误处理您的信息或接收超时造成的远程主机,或潜在的网络资源问题被超过。本地套接字超时是

我的code与出的配置如下。它从我的开发机器可以作为客户端,但不能从虚拟机作为客户端。我能ping从VM客户端缓存集群服务器。

 类节目
{
    静态无效的主要(字串[] args)
    {        无功配置=新DataCacheFactoryConfiguration();
        VAR服务器=新的List< D​​ataCacheServerEndpoint>();
        servers.Add(新DataCacheServerEndpoint(MyCacheClusterServerMachine,22233));
        config.Servers =服务器;
        VAR厂=新DataCacheFactory(配置);
        VAR缓存= factory.GetDefaultCache(); < ----这里的错误********
        VAR键=CachedObjectKey;
        VAR OBJ =缓存[关键]
        如果(OBJ == NULL)
        {
            OBJ =这里是缓存一个字符串;
            cache.Add(键,OBJ);
            Console.WriteLine(对象不在高速缓存中);
        }        OBJ = cache.Get(键);        Console.WriteLine(obj.ToString());
        到Console.ReadLine();
    }
}


解决方案

服务器已拒绝客户端凭据。

此问题是,一旦虚拟机加入到同一个域作为我的开发机器固定的。

we have AppFabric cache cluster server and I can work with it using my dev machine as client. In order to simulate different web servers accessing the cache cluster server, I created a VMWare Virtual Machine and installed Visual Studio 2010 and my web application. From the VM as client, when I try to get cache, I get the following error... Please help.. thanks..

ErrorCode:SubStatus:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.)

I noticed that the inner exception was

The server has rejected the client credentials.

So.. after some research.. I added the following line to my config

<securityProperties mode="None" protectionLevel="None" />

So now, my dataCacheClient config looks as follows:

  <dataCacheClients>
    <dataCacheClient name="default">
    <localCache
    isEnabled="true"
    sync="NotificationBased"
    objectCount="10000"
    ttlValue="5" />
    <hosts>
      <host name="MyCacheClusterServerMachine" cachePort="22233" />
    </hosts>
    <securityProperties mode="None" protectionLevel="None" />
  </dataCacheClient>

After the above config change.. I am getting the following error:

The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was

My code with out the config is as follows. It works from my dev machine as client but not from the VM as client. I am able to ping the cache cluster server from VM client.

class Program
{
    static void Main(string[] args)
    {

        var config = new DataCacheFactoryConfiguration();
        var servers = new List<DataCacheServerEndpoint>();
        servers.Add(new DataCacheServerEndpoint("MyCacheClusterServerMachine", 22233));
        config.Servers = servers;
        var factory = new DataCacheFactory(config);
        var cache = factory.GetDefaultCache();   <---- error here ********
        var key = "CachedObjectKey";
        var obj = cache[key];
        if (obj == null)
        {
            obj = "here is a string to cache";
            cache.Add(key, obj);
            Console.WriteLine("object was not in cache");
        }

        obj = cache.Get(key);

        Console.WriteLine(obj.ToString());
        Console.ReadLine();
    }
}

解决方案

The server has rejected the client credentials.

This issue was fixed as soon as VM was added to the same domain as my dev machine.

这篇关于AppFabric的客户端虚拟机问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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