none
AppFabric error

    Question

  • Hi, I am still getting this error: ErrorCode<ERRCA0022>:SubStatus<ES0006>:There is a temporary failure, please retry after some time. (One or more specified Cache servers are unavailable, which could be caused by busy network or servers. Please ensure security permission has been granted for this client account on cluster and ensure that Cache service is allowed through firewall on all cache hosts. Retry later.)

    I have tried to solve it according to this issue: http://social.msdn.microsoft.com/Forums/en-GB/velocity/thread/6f4c875d-6e99-4c3d-a578-63153a707d55 but without any results.

    I have installed AppFaric Beta 2 on the Win 2008 server + .NET Framework 4 RC. The cache is running fine if I am connecting to it from another application server but if I use the cache server as application server as well the application are not able to connect to caching services resulting in the above mentioned error. Apparently, the Appfabric Beta 2 is well installed but I do not know why I am not able to connect to it from apps running on IIS 7 on the same machine.

    Thanks for your advice.

    Thursday, April 01, 2010 6:58 AM

All replies

  • Please double check if you have disabled security on the client. In beta2, use DataCacheFactoryConfiguration's SecurityProperties to modify security settings. If it still fails, post your code and cluster config.

    -Sanjay

    Thursday, April 01, 2010 10:04 AM
  • Hi,

    I thank yu for your response. Our administartor and I have checked the security on the client (no firewall, ...). My code follows:

    public

     

     

    class AppFabricCache

    {

     

     

    //private DataCacheFactory cacheFactory;

     

     

    private DataCache cache;

     

     

    public AppFabricCache(string cacheName)

    {

     

     

    // Declare array for cache host(s).

     

     

    DataCacheServerEndpoint[] servers = new DataCacheServerEndpoint[1];

    servers[0] =

     

    new DataCacheServerEndpoint("dev-extra-cache", 22233);

     

     

    // Setup the DataCacheFactory configuration.

     

     

    DataCacheFactoryConfiguration factoryConfig = new DataCacheFactoryConfiguration();

    factoryConfig.Servers = servers;

    factoryConfig.LocalCacheProperties =

     

    new DataCacheLocalCacheProperties(100000, new TimeSpan(0, 15, 0), DataCacheLocalCacheInvalidationPolicy.TimeoutBased);

     

     

    // Create a configured DataCacheFactory object.

     

     

    DataCacheFactory mycacheFactory = new DataCacheFactory(factoryConfig);

     

     

     

    // Get a cache client for the cache "NamedCache1".

    cache = mycacheFactory.GetDefaultCache();

     

    }

     

     

    public void Add(string key, object value)

    {

    cache.Add(key, value);

    }

     

     

    public void Add(string key, object value, int timeoutInMinutes)

    {

     

     

    if (cache.Get(key) == null)

    {

    cache.Add(key, value,

     

    new TimeSpan(0, timeoutInMinutes, 0));

    }

     

     

    else

    {

    cache.Put(key, value,

     

    new TimeSpan(0, timeoutInMinutes, 0));

    }

    }

     

     

    public object Item(string key)

    {

     

     

    object retValue = cache.Get(key);

     

     

    return retValue;

    }

     

     

    public void Remove(string key)

    {

    cache.Remove(key);

    }

     

     

    public int Count()

    {

     

     

    return 0;

    }

    }

    And my cluster config:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <configSections>
            <section name="dataCache" type="Microsoft.ApplicationServer.Caching.DataCacheSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </configSections>
        <dataCache size="Small">
            <caches>
                <cache type="partitioned" consistency="strong" name="default">
                    <policy>
                        <eviction type="lru" />
                        <expiration defaultTTL="100" isExpirable="true" />
                    </policy>
                </cache>
            </caches>
            <hosts>
                <host replicationPort="22236" arbitratorPort="22235" clusterPort="22234"
                    hostId="442301588" size="225" leadHost="true" account="MNET\dev-extra-cache$"
                    cacheHostName="AppFabricCachingService" name="dev-extra-cache"
                    cachePort="22233" />
            </hosts>
        </dataCache>
    </configuration>

    Monday, April 12, 2010 7:08 AM
  • Looks like there is no client authorized to connect. Run

                   Grant-CacheAllowedClientAccount -Account <domain\username>

    from Powershell to add the client in the list.

    Monday, April 12, 2010 1:28 PM
  • Looks like there is no client authorized to connect. Run

                   Grant-CacheAllowedClientAccount -Account <domain\username>

    from Powershell to add the client in the list.

    Monday, April 12, 2010 1:28 PM
  • Hi,

    thank you for your prompt advice but it doesn't seem to work anyway.

    My current cluster config:

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <configSections>
            <section name="dataCache" type="Microsoft.ApplicationServer.Caching.DataCacheSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </configSections>
        <dataCache size="Small">
            <caches>
                <cache type="partitioned" consistency="strong" name="default">
                    <policy>
                        <eviction type="lru" />
                        <expiration defaultTTL="100" isExpirable="true" />
                    </policy>
                </cache>
            </caches>
            <hosts>
                <host replicationPort="22236" arbitratorPort="22235" clusterPort="22234"
                    hostId="442301588" size="225" leadHost="true" account="MNET\dev-extra-cache$"
                    cacheHostName="AppFabricCachingService" name="dev-extra-cache"
                    cachePort="22233" />
            </hosts>
            <advancedProperties>
                <securityProperties>
                    <authorization>
                        <allow users="cz\srvsuite" />
                    </authorization>
                </securityProperties>
            </advancedProperties>
        </dataCache>
    </configuration>

    The "cz\srvsuite" is the <domain\username> account of the client ( the account of the running web application )

     

    Tuesday, April 13, 2010 6:35 AM