2 Replies Latest reply: Apr 30, 2013 1:35 PM by 1006186 RSS

    Oracle Coherence does not work with .Net 4 MVC4  WebAPI

    1006186
      Hi,

      I'm able to get the "ContactCache.Web" example to work fine with the cache server, however Coherence seems to be incompatible with .Net 4 MVC4 WebAPI.

      Can someone provide an example or guidance to help me get it to work? I haven't seen a new .Net release of Coherence since .Net 2 and am concerned that a new version may need to be released to support .Net 4 MVC4 WebAPI????

      I'm getting:

      could not establish a connection to one of the following addresses: [xxx.xxx.xxx.xxx:9099]; make sure the "remote-addresses" configuration element contains an address and port of a running TcpAcceptor


      After numerous attempts to get an example to cache "GetAllProducts" by taking the code from

      http://code.msdn.microsoft.com/ASP-NET-Web-API-Tutorial-468ee148

      So the web.config/cache-config.xml/coherence.xml/global.asax.cs/pof-config.xml match the ContactCache.Web exactly. So if you ask me to post that, I can - but it'll be exactly the same as what is there already with 3.7.1 in the examples folder.


      The local cache server is running ....


      2013-04-29 11:20:57.077/5.887 Oracle Coherence GE 3.7.1.0 <Info> (thread=main, m
      ember=1):
      Services
      (
      ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Vers
      ion=3.7.1, OldestMemberId=1}
      InvocationService{Name=Management, State=(SERVICE_STARTED), Id=1, Version=3.1,
      OldestMemberId=1}
      PartitionedCache{Name=AspNetSessionCache, State=(SERVICE_STARTED), LocalStorag
      e=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPart
      itions=0}
      PartitionedCache{Name=DistributedCache, State=(SERVICE_STARTED), LocalStorage=
      enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartit
      ions=0}
      ReplicatedCache{Name=ReplicatedCache, State=(SERVICE_STARTED), Id=4, Version=3
      .0, OldestMemberId=1}
      ProxyService{Name=ExtendTcpProxyService, State=(SERVICE_STARTED), Id=5, Versio
      n=3.7, OldestMemberId=1}
      )

      Started DefaultCacheServer...


      Thanks in advance!

      Edited by: 1003183 on Apr 29, 2013 11:37 AM

      Edited by: 1003183 on Apr 29, 2013 11:40 AM

      Edited by: 1003183 on Apr 29, 2013 4:59 PM

      Edited by: 1003183 on Apr 29, 2013 5:01 PM

      Edited by: 1003183 on Apr 30, 2013 11:29 AM

      Edited by: 1003183 on Apr 30, 2013 11:32 AM
        • 1. Re: Oracle Coherence does not work with .Net 4 MVC4  WebAPI
          Jonathan.Knight
          Hi

          The error +"could not establish a connection to one of the following addresses: [xxx.xxx.xxx.xxx:9099]"+ would suggest that either the extend proxy service is not running or the configuration on the client is wrong or the extend proxy has bound to a different socket address than expected.

          I can see from the snippet of log you posted that there is a Proxy running
          ProxyService{Name=ExtendTcpProxyService, State=(SERVICE_STARTED), Id=5, Version=3.7, OldestMemberId=1}
          Is the proxy listening on the correct address the client is trying to connect to? Somewhere below the snippet of log you posted you should see something like this...
          2013-04-30 08:10:36.508/10.094 Oracle Coherence GE 3.7.1.7 <Info> (thread=Proxy:ExtendTcpProxyService:TcpAcceptor, member=1): TcpAcceptor now listening for connections on xx.xx.xx.xx:9099
          The socket address that the TcpAcceptor is listening on should match the address in the client. If the TcpAcceptor address matches the address in the client error message then something else is wrong.

          JK
          • 2. Re: Oracle Coherence does not work with .Net 4 MVC4  WebAPI
            1006186
            JK,

            I didn't change any of my code, but for some magical reason this afternoon, it started working. I think as you mentioned above something must have bound to the socket. I'm still baffled why examples connected to port 9099 would work while others would not.

            Are there any other tips or logging tidbits you could recommend for debugging connection issues?

            Is there a way to monitor/ drop connections from the cache server side?

            Thanks!

            Edited by: 1003183 on Apr 30, 2013 11:33 AM

            Edited by: 1003183 on Apr 30, 2013 11:35 AM