1 Reply Latest reply on Apr 11, 2014 9:27 PM by user4124536

    Managing ASP.NET Session State : could not establish a connection to one of the following addresses: [XX.XXX.XX.XXX:9099]; make sure the "remote-addresses" configuration element contains an address and port of a running TcpAcceptor

    1156630

      Hi,

       

      I am trying to implement Oracle Coherence 12c to manage ASP.NET Session State. by following the documentation link [22 Managing ASP.NET Session State], however I am unable to get my application to connect to the standalone Coherence Server. I think it is config issue on the server side however I am unable to zero in on it,

       

      Any help would be appreciated.

       

      Client : cache-config.xml

       

      <?xml version="1.0"?>
      <cache-config xmlns="http://schemas.tangosol.com/cache"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://schemas.tangosol.com/cache
         assembly://Coherence/Tangosol.Config/cache-config.xsd">
        <caching-scheme-mapping>
          <cache-mapping>
            <cache-name>dist-contact-cache</cache-name>
            <scheme-name>extend-direct</scheme-name>
          </cache-mapping>
          <cache-mapping>
            <cache-name>aspnet-session-storage</cache-name>
            <scheme-name>extend-direct</scheme-name>
          </cache-mapping>
          <cache-mapping>
            <cache-name>aspnet-session-overflow</cache-name>
            <scheme-name>extend-direct</scheme-name>
          </cache-mapping>
        </caching-scheme-mapping>
        <caching-schemes>
          <remote-cache-scheme>
            <scheme-name>extend-direct</scheme-name>
            <service-name>ExtendTcpCacheService</service-name>
            <initiator-config>
              <tcp-initiator>
                <remote-addresses>
                  <socket-address>
                    <address>localhost</address>
                    <port>9099</port>
                  </socket-address>
                </remote-addresses>
              </tcp-initiator>
              <outgoing-message-handler>
                <request-timeout>30s</request-timeout>
              </outgoing-message-handler>
            </initiator-config>
          </remote-cache-scheme>
        </caching-schemes>
      </cache-config>
      

       

      Client : coherence.xml


      <?xml version="1.0"?>
      <coherence xmlns="http://schemas.tangosol.com/coherence">
        <logging-config>
          <destination>stderr</destination>
          <severity-level>5</severity-level>
          <message-format>{date} &lt;{level}&gt; (thread={thread}): {text}</message-format>
          <character-limit>8192</character-limit>
        </logging-config>
      </coherence>
      

       

      Client : web.config


      <?xml version="1.0"?>
      <configuration>
        <configSections>
          <section name="coherence" type="Tangosol.Config.CoherenceConfigHandler,Coherence, Version=12.1.2.0, Culture=neutral,PublicKeyToken=0ADA89708FDF1F9A"/>
        </configSections>
        <coherence>
          <cache-factory-config>web://~/Config/coherence.xml</cache-factory-config>
          <cache-config>web://~/Config/cache-config.xml</cache-config>
          <pof-config>web://~/Config/pof-config.xml</pof-config>
        </coherence>
        <appSettings/>
        <connectionStrings/>
        <system.web>
          <globalization culture="en-US" uiCulture="en-US"/>
          <sessionState mode="Custom" customProvider="CoherenceSessionProvider" timeout="20" >
            <providers>
              <add name="CoherenceSessionProvider" type="Tangosol.Web.CoherenceSessionStore, Coherence,Version=12.1.2.0, Culture=neutral,PublicKeyToken=0ADA89708FDF1F9A" model="split" externalAttributeSize="512" serializer="pof"/>
            </providers>
          </sessionState>
          <compilation debug="true" defaultLanguage="c#">
            <assemblies>
              <add assembly="Coherence, Version=12.1.2.0, Culture=neutral,PublicKeyToken=0ADA89708FDF1F9A"/>
            </assemblies>
          </compilation>
          <authentication mode="Windows"/>
          <customErrors mode="Off"/>
        </system.web>
      </configuration>
      

       

      Server : examples-cache-config.xml

       

      <?xml version="1.0"?>
      <cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"
                    xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config coherence-cache-config.xsd">
        <caching-scheme-mapping>
          <cache-mapping>
            <cache-name>contacts</cache-name>
            <scheme-name>ExamplesPartitionedPofScheme</scheme-name>
          </cache-mapping>
          <cache-mapping>
            <cache-name>security</cache-name>
            <scheme-name>ExamplesPartitionedPofScheme</scheme-name>
          </cache-mapping>
            </caching-scheme-mapping>
        <caching-schemes>
          <distributed-scheme>
            <scheme-name>ExamplesPartitionedPofScheme</scheme-name>
            <service-name>PartitionedPofCache</service-name>
            <thread-count>5</thread-count>
            <backing-map-scheme>
              <local-scheme>
                <!-- each node will be limited to 32MB -->
                <high-units>32M</high-units>
                <unit-calculator>binary</unit-calculator>
              </local-scheme>
            </backing-map-scheme>
            <autostart>true</autostart>
          </distributed-scheme>
              <!--
          Proxy Service scheme that allows remote clients to connect to the
          cluster over TCP/IP.
          -->
          <proxy-scheme>
            <scheme-name>examples-proxy</scheme-name>
            <service-name>extend-direct</service-name>
            <thread-count system-property="tangosol.coherence.extend.threads">2</thread-count>
            <acceptor-config>
              <tcp-acceptor>
                <local-address>
                  <address system-property="tangosol.coherence.extend.address">localhost</address>
                  <port system-property="tangosol.coherence.extend.port">9099</port>
                </local-address>        
              </tcp-acceptor>
          </acceptor-config>
             <autostart system-property="tangosol.coherence.extend.enabled">true</autostart>
          </proxy-scheme>
           <!--
          Invocation Service scheme.
          -->
          <invocation-scheme>
            <scheme-name>examples-invocation</scheme-name>
            <service-name>InvocationService</service-name>
            <autostart system-property="tangosol.coherence.invocation.autostart">true</autostart>
          </invocation-scheme>
       </caching-schemes>
      </cache-config>
      

       

      Server :examples-extend-cache-config.xml


      <?xml version="1.0"?>
      <cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"
                    xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config coherence-cache-config.xsd">
        <defaults>
          <serializer>pof</serializer>
        </defaults>
        <caching-scheme-mapping>
          <cache-mapping>
            <cache-name>dist-*</cache-name>
            <scheme-name>dist-default</scheme-name>
          </cache-mapping>
          <cache-mapping>
            <cache-name>aspnet-session-storage</cache-name>
            <scheme-name>aspnet-session-scheme</scheme-name>
          </cache-mapping>
          <cache-mapping>
            <cache-name>aspnet-session-overflow</cache-name>
            <scheme-name>aspnet-session-overflow-scheme</scheme-name>
          </cache-mapping>
          <cache-mapping>
            <cache-name>dist-extend</cache-name>
            <scheme-name>extend-dist</scheme-name>
          </cache-mapping>
        </caching-scheme-mapping>
        <caching-schemes>
          <remote-cache-scheme>
            <scheme-name>extend-dist</scheme-name>
            <service-name>ExtendTcpCacheService</service-name>
            <initiator-config>
              <tcp-initiator>
                <remote-addresses>
                  <socket-address>
                    <address system-property="tangosol.coherence.proxy.address">localhost</address>
                    <port system-property="tangosol.coherence.proxy.port">9099</port>
                  </socket-address>
                </remote-addresses>
              </tcp-initiator>
           </initiator-config>
          </remote-cache-scheme>
         <remote-invocation-scheme>
            <scheme-name>examples-remote-invocation</scheme-name>
            <service-name>InvocationService</service-name>
            <initiator-config>
              <tcp-initiator>
                <remote-addresses>
                  <socket-address>
                    <address>localhost</address>
                    <port>9099</port>
                  </socket-address>
                </remote-addresses>
              </tcp-initiator>
            </initiator-config>
          </remote-invocation-scheme>
          <distributed-scheme>
            <scheme-name>aspnet-session-scheme</scheme-name>
            <service-name>AspNetSessionCache</service-name>
            <serializer>
              <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
              <init-params>
                <init-param>
                  <param-type>string</param-type>
                  <param-value>coherence-pof-config.xml</param-value>
                </init-param>
              </init-params>
            </serializer>
            <backing-map-scheme>
              <local-scheme>
                <class-name>com.tangosol.net.cache.LocalCache</class-name>
                <listener>
                  <class-scheme>
                    <class-name>
                      com.tangosol.net.internal.AspNetSessionStoreProvider$SessionCleanupListener
                    </class-name>
                    <init-params>
                      <init-param>
                        <param-type>com.tangosol.net.BackingMapManagerContext</param-type>
                        <param-value>{manager-context}</param-value>
                      </init-param>
                    </init-params>
                  </class-scheme>
                </listener>
              </local-scheme>
            </backing-map-scheme>
            <autostart>true</autostart>
          </distributed-scheme>
          <distributed-scheme>
            <scheme-name>aspnet-session-overflow-scheme</scheme-name>
            <scheme-ref>dist-default</scheme-ref>
            <service-name>AspNetSessionCache</service-name>
            <autostart>true</autostart>
          </distributed-scheme>
          <distributed-scheme>
            <scheme-name>dist-default</scheme-name>
            <lease-granularity>member</lease-granularity>
            <backing-map-scheme>
              <local-scheme/>
            </backing-map-scheme>
            <autostart>true</autostart>
          </distributed-scheme>
          <proxy-scheme>
            <service-name>ExtendTcpProxyService</service-name>
            <acceptor-config>
              <tcp-acceptor>
                <local-address>
                  <address>localhost</address>
                  <port>9099</port>
                </local-address>
              </tcp-acceptor>
            </acceptor-config>
            <autostart>true</autostart>
          </proxy-scheme>
        </caching-schemes>
      </cache-config>