Coherence Extend remote address port in TCP Connection

Hi,
From the log below, I see remote address port is picked some random port(48552). (currently i disabled the firewall), If i enable the firewall it could be an issue, is there any way i can specify the remote ports that tcp connection use?
2011-02-24 13:18:18.076/1280.207 Oracle Coherence GE 3.6.0.1 <D6> (thread=Proxy:ExtendTcpProxyService:TcpAcceptor, member=13): Opened: TcpConnection(Id=0x0000012E56A3CA1B0A1F96B688F7EEBCEDA2AA9397203393CF480379B3963D86, Open=true, LocalAddress=10.31.150.182:9099, RemoteAddress=10.31.150.182:48552)
One more question,
I have two proxy servers, is it possible to configure the client to make two connection (redundant) one for first proxy and another for second proxy. is it make sense?
Thanks
Prab
Edited by: 833796 on Feb 24, 2011 2:35 AM

Hi Prab
The random port is what normally is called an ephemeral port for the client and is usually not a problem for firewalls since this is expected behavior. If you want to control the client port you can do this by adding the <local-address> to the tcp-initiator element.
As for the second question, it doesn't quite work to do as you suggest. The proxy contains state for the client, as this is not replicable between the proxies one cannot continue where the other one left off.
Thanks
/Charlie

Similar Messages

  • Coherence*Extend remote-addresses

    We're trying to use multiple addresses for our Coherence*Extend clients to provide load-balancing and redundancy. To accomplish this, we've configured our clients with multiple socket-address entries:
    <remote-addresses>
    <socket-address>
    <address>proxyHost1</address>
    <port>9099</port>
    </socket-address>
    <socket-address>
    <address>proxyHost2</address>
    <port>9099</port>
    </socket-address>
    <socket-address>
    <address>proxyHost3</address>
    <port>9099</port>
    </socket-address>
    </remote-addresses>
    This works fine for failure situations, however, in our testing it appears that the client will connect to the nodes in a round-robin method starting with the last defined host. So, with the above configuration every client will connect to proxyHost3, and only connect to proxyHost2 if host3's connection failed. We could maintain a separate configuration file across all of our nodes shuffling the order, however this could be problematic and would not be preferred.
    Is there a better way to effectively distribute the client connections across our pool of proxies?
    Thanks,
    -Allen

    Hi Allen,
    The Coherence*Extend TCP/IP client randomizes the list of socket addresses before attempting the initial connect, so I'm not sure why you always see your clients connect to the last address in the list. I ran a quick test using both the Java and .NET client, but could not reproduce what you are seeing. Are you sure that the proxyHostX host names resolve to different IP addresses on the test client machine?
    Regards,
    Jason

  • Excessive Port 80 TCP Connections?  How many connections are normal?

    Hi. I'm running MacOS X 10.3.9 on a Mac Powerbook (with all of Apple's latest Security Updates installed. It is a virgin installation and no other software programs have been installed). I then installed Norton Personal Firewall 3.0.2 in order to monitor all my ports.
    By default, Norton Personal Firewall (NPF) is not set to log the number of outgoing connections for port 80, although port 80 is the port typically used by most web browsers to contact other sites on the web. If you disable port 80, then your browser will not be able to function or access the web. Therefore it is mandatory that you leave that port open. But what if some unknown hacker wrote a Trojan program to specifically ferry information out of your computer and back to him using that port, then there'd be no way to stop it once the Trojan was in place. If you disabled the port to prevent it, then you'd also disable yourself from the web. If you opened the port for your browser, then the trojan would have free and open access. At least that is the theory that has me wondering about the seemingly high number of outgoing port 80 connections displayed in my NPF logging window. Therefore, I'd very much like to find out if other users who are running a version of Panther with NPF are experiencing the same high connections behavior on port 80.
    To create the scenario for this behavior, basically you just open your NPF panel and enable all logging for port 80 (by default it is disabled). For those of you who don't specifically know how to do this, the following is the directions . . .
    . . . Open your NPF Service Settings pane. From this pane, highlight the service called Web Sharing Port 80. Click the Edit button at the bottom of the selection window. A new pane will then show the controls named Ports, Logging, and Notification. Bring forward the Logging controls and enable both checkboxes for Allowed and Denied for the Outgoing direction. Click Save and close the window.
    Once the above is done, close all other windows and open your NPF Logging window on your desktop and keep it visible for you to look at. Clear all existing entries in the log so you'll start with a clean slate. With everything set up and a web connection available, open your Safari browser (or any browser) to an online web site. On my computer, my Safari bowser is set to open to Apple's website - www.apple.com. Once the browser is open, Apple's website is then displayed.
    The result . . . surprisingly, after only a few seconds, a HUGE number of port 80 TCP connections to that website address start to show up and flow into my log. In a matter of only 3 or 4 seconds, at least 250 separate TCP connection entries will show up in my log, and they all have the same web address. If I then click on anything on the page or surf to any other website, the log entries will change to the new site address and start up again, and in some cases, in a matter of less than a minute the number of entries can easily reach into the thousands. I've seen 20,000 entries or more flow into my log after a couple of minutes. And the only way to stop the madness and the entries is to disconnect from the web. Those many entries and this behavior does not seem normal to me, no matter what port is selected and no matter what log settings are enabled. A dozen to 15 or 20 entries for a given site I can understand (I've been told some browsers can open at least 10 connections at a time), but hundreds to thousands, I cannot. I can't understand why any program under any circumstance would need to generate those many log entries in such a short time frame. My problem is I have nothing to compare this data to, I only have my suspicions and have no way of knowing whether this behavior is normal or not. So I am asking for others to make a comparison on their computer if you are running any version of Panther and Norton Personal Firewall and give me your results so I can determine what is normal or not. I've heard of certain hacker attacks called TCP flooding and other forms of attacks, and I don't want my computer to have been secretly taken over by a hacker or the initiator of such attacks unknowingly. Furthermore, this is not anything an average user would even normally notice, simply because Port 80 logging is not usually enabled in NPF. Nevertheless, I need to find out the root of this problem and learn whether this is normal. Other than these high number of connection entries, my web surfing seems normal and I haven't yet experienced any seeming sluggishness accessing sites. Any help anyone can offer I would appreciate. Thanks to everyone in advance.
    Here are some images of my own settings and results:
    http://homepage.mac.com/starshone/misc/Port80Settings.jpg
    http://homepage.mac.com/starshone/misc/Port80Log.jpg
      Mac OS X (10.3.9)  

    But all those connections are how the web works. Each HTML page has dozens or more links. Each graphic or other page element is a new HTTP request on port 80 back to the originating server (or another server even). So it's normal to have a lot of port 80 connections going out if you surf the web.
    You can see the individual elements that make up a page in Safari by going to the "Window" menu and showing the "Activity" window. I see CNN's web site tonight has 113 items on its home page. Apple's is 41. My home page is 10. So it's easy to get a lot of connections.
    Some applications also use port 80 to check for updates, so you might see the occasional port 80 connection even when you're not surfing the web. These are also nothing to worry about.
    charlie

  • Tracing TCP Source/Destination Addresses/Ports for ongoing connections

    On Solaris 10 U4 through U7, I'm trying the following just to perform basic tracking of TCP source/destination addresses and ports, using code similar to what is available in tcpsnoop_snv and tcptop_snv.
    The odd thing is that the addresses/ports appear to be zeroed out - are they being cached outside of the conn_t data structure?
    #!/usr/sbin/dtrace -Cs
    #pragma D option switchrate=10hz
    #pragma D option bufsize=512k
    #pragma D option aggsize=512k
    #include <sys/file.h>
    #include <inet/common.h>
    #include <sys/byteorder.h>
    #include <sys/socket.h>
    #include <sys/socketvar.h>
    /* First pass, for all TCP Read/Write actions, collect source/destination
       IP + Port - after a few secs, print them all out */
    fbt:ip:tcp_send_data:entry
      /* Outgoing TCP */
      self->connp = (conn_t *)args[0]->tcp_connp;
    fbt:ip:tcp_rput_data:entry
      /* Incoming TCP */
      self->connp = (conn_t *)arg0;
    fbt:ip:tcp_send_data:entry,
    fbt:ip:tcp_rput_data:entry
    /self->connp/
      /* fetch ports */
    #if defined(_BIG_ENDIAN)
      self->lport = self->connp->u_port.tcpu_ports.tcpu_lport;
      self->fport = self->connp->u_port.tcpu_ports.tcpu_fport;
    #else
      self->lport = BSWAP_16(self->connp->u_port.tcpu_ports.tcpu_lport);
      self->fport = BSWAP_16(self->connp->u_port.tcpu_ports.tcpu_fport);
    #endif
      /* fetch IPv4 addresses */
      this->fad12 =
        (int)self->connp->connua_v6addr.connua_faddr._S6_un._S6_u8[12];
      this->fad13 =
        (int)self->connp->connua_v6addr.connua_faddr._S6_un._S6_u8[13];
      this->fad14 =
        (int)self->connp->connua_v6addr.connua_faddr._S6_un._S6_u8[14];
      this->fad15 =
        (int)self->connp->connua_v6addr.connua_faddr._S6_un._S6_u8[15];
      this->lad12 =
        (int)self->connp->connua_v6addr.connua_laddr._S6_un._S6_u8[12];
      this->lad13 =
        (int)self->connp->connua_v6addr.connua_laddr._S6_un._S6_u8[13];
      this->lad14 =
        (int)self->connp->connua_v6addr.connua_laddr._S6_un._S6_u8[14];
      this->lad15 =
        (int)self->connp->connua_v6addr.connua_laddr._S6_un._S6_u8[15];
    /* At this point, this->{f|l}ad1{2345}->connua_v6addr.connua_{f|l}addr._S6_un.S6_u8
        are empty - where is this data? */
    }

    http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/css11500series/v7.50/command/reference/CmdGrpC.html#wp1139667
    portmap [base-port base_number|disable|enable|number-of-ports number|vip-address-range number]
    disable
    Instructs the CSS to perform Network Address Translation (NAT) only on the source IP addresses and not on the source ports of UDP traffic hitting a particular source group. This option does not affect TCP flows.
    For applications with high-numbered assigned ports (for example, SIP and WAP), we recommend that you preserve those port numbers by configuring destination services in source groups. Destination services cause the CSS to NAT the client source ports, but not the destination ports.
    Note If you disable flows for a UDP port using the flow-state table and configure the portmap disable command in a source group, traffic for that port that matches on the source group does not successfully traverse the CSS.
    The CSS maintains but ignores any base-port or number-of ports (see the options above) values configured in the source group. If you later reenable port mapping for that source group, any configured base-port or number-of ports values will take effect. The default behavior for a configured source group is to NAT both the source IP address and the source port for port numbers greater than 1023.
    There is no possibility to disable it for TCP.
    We need to source nat the port to guarantee that the server response comes back on the same module/CPU and the internal packet allocation algorithm is based on src and dst ports.µ
    Gilles:

  • How to specify source IP address when opening TCP connection?

    Hi ! 
    We are building a system in which a server communicates with a multi-homed Linux client with three network interfaces.  All interfaces are routable to the server, but the server only accepts connections from one of those interfaces.
    We need the server to specify different local source addresses for each client but the Open_TCP_Connection vi does not provide the capability to specify the local source address.  Is there a way in LabVIEW open a TCP client connection and specify the source address?
    Thanks,
    -John

    What you are describing would mean that your server machine is creating client to communicate with another server. Client never accept a connection. They alwasy connect to a server.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Coherence *Extend configuration

    Hello,
    To enable Coherence Extend, we should define a proxy-scheme in our cluster cache-config that defines a coherence *extend proxy-service, containing a tcp-acceptor with a local  address and port.
    Can there be only 1 such an extend proxy service running on the same node?  Or should we redefine the extend proxy-service configuration for each cache server that is running on the same node (to use a different port)? In both cases, we have to define at least 2 new cache-config files - one with the extend proxy service and one without. Is this correct?
    We're now trying to run 2 cache servers on the same node with an extend proxy service.  When we try to start the 2nd cache server, we get the following exception (which is quite normal because the coherence proxy service tries to bind to a socket that is already in use by the other cache server instance that is running the extend proxy service):
    2010-01-21 09:48:10.923/7.865 Oracle Coherence GE 3.5.2/463 <Error> (thread=Proxy:ExtendTcpProxyService:TcpAcceptor:TcpProcessor, member=1): error binding ServerSocket to 10.2.12.144:9099: java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind(Native Method)
    at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
    at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor.configureSocket(TcpAcceptor.CDB:27)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor$TcpProcessor.onEnter(TcpAcceptor.CDB:25)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:14)
    at java.lang.Thread.run(Unknown Source)
    Is there a workaround that makes it possible to use the same cache configuration (containing coherence *extend proxy-service, with tcp-acceptor) with different cache servers on the same machine? 
    If not, what is the best practice to configure the *extend proxy service?
    Thanks in advance

    you can inject system properties into your coherence cache configuration as follows:
    <tcp-acceptor>
    <local-address>
    <address system-property="wouters.address">localhost</address>
    <port system-property="wouters.port">1234</port>
    </local-address>
    </tcp-acceptor>
    The above example will default to localhost:1234, however you can override these with system properties. This will allow you to reuse the same config, but tailor it to your application.
    Cheers,
    Neville.

  • Coherence::net::messaging::ConnectionException: could not establish a connection to one of the following addresses: {10.242.152.242/10.242.152.242:8088}; make sure the "remote-addresses" configuration element contains an address and port of a running TcpA

    Hi
    I have installed coheI have installed coherence server "fmw_12.1.3.0.0_coherence_Disk1_1of1.zip" along with Examples on windows machine and C++ client coherence-cpp-12.1.3.0.0b51709-windows-x86-vs2012.zip on the same machine.
    I have built the "contacts" C++ Example successfully and while I execute this "contacts" using run I am facing TcpAcceptor error.
    On my coherence server the TcpAcceptor is listening on port 8088, so I have modified the extend-cache-config.xml file with values "ip address of my windows machine" and port as "8088".
    All the time I am getting below error,
    coherence::net::messaging::ConnectionException: could not establish a connection to one of the following addresses: {10.242.152.242/10.242.152.242:8088}; make sure the "remote-addresses" configuration element contains an address and port of a running TcpAcceptor
        at class coherence::lang::TypedHandle<class coherence::component::net::extend::PofConnection> __thiscall coherence::component::util::TcpInitiator::openConne
    ction(void)(TcpInitiator.cpp:307)
        at coherence::component::util::TcpInitiator::openConnection
        at coherence::component::util::Initiator::ensureConnection
        at coherence::component::net::extend::RemoteCacheService::openChannel
        at coherence::component::net::extend::RemoteService::doStart
        at coherence::component::net::extend::RemoteService::start
        at coherence::component::util::SafeService::startService
        at coherence::component::util::SafeService::restartService
        at coherence::component::util::SafeService::ensureRunningServiceInternal
        at coherence::component::util::SafeService::start
        at coherence::net::DefaultConfigurableCacheFactory::configureService
        at coherence::net::DefaultConfigurableCacheFactory::ensureService
        at coherence::net::DefaultConfigurableCacheFactory::ensureRemoteCache
        at coherence::net::DefaultConfigurableCacheFactory::configureCache
        at coherence::net::DefaultConfigurableCacheFactory::ensureCache
        at coherence::net::CacheFactory::getCache
        at unsigned __int64 coherence::lang::class_spec<class coherence::lang::Managed<class ContactId>,class coherence::lang::extends<class coherence::lang::Object,class coherence::lang::Void<class coherence::lang::Object> >,class coherence::lang::implements<void,void,void,void,void,void,void,void,void,void,void,void,void,void,void,void> >::sizeOf(bool)
        at _onexit
        at class coherence::util::Hashtable * coherence::lang::factory<class coherence::util::Hashtable>::create(void)
        at class coherence::util::Hashtable * coherence::lang::factory<class coherence::util::Hashtable>::create(void)
        at BaseThreadInitThunk
        at RtlInitializeExceptionChain
        at RtlInitializeExceptionChain
        on thread "main"
    Caused by: coherence::net::messaging::ConnectionException: coherence::component::util::TcpInitiator::TcpConnection@029EAD78{Id=NULL, Open=1, LocalAddress=NULL,
    RemoteAddress=10.242.152.242/10.242.152.242:8088}: socket disconnect
        at class coherence::lang::TypedHandle<class coherence::net::messaging::Response> __thiscall coherence::component::net::extend::AbstractPofRequest::Status::g
    etResponse(void)(AbstractPofRequest.cpp:203)
        at coherence::component::net::extend::AbstractPofRequest::Status::getResponse
        at coherence::component::net::extend::AbstractPofRequest::Status::waitForResponse
        at coherence::component::util::Initiator::openConnection
        at coherence::component::net::extend::PofConnection::open
        at coherence::component::util::TcpInitiator::openConnection
        at coherence::component::util::Initiator::ensureConnection
        at coherence::component::net::extend::RemoteCacheService::openChannel
        at coherence::component::net::extend::RemoteService::doStart
        at coherence::component::net::extend::RemoteService::start
        at coherence::component::util::SafeService::startService
        at coherence::component::util::SafeService::restartService
        at coherence::component::util::SafeService::ensureRunningServiceInternal
        at coherence::component::util::SafeService::start
        at coherence::net::DefaultConfigurableCacheFactory::configureService
        at coherence::net::DefaultConfigurableCacheFactory::ensureService
        at coherence::net::DefaultConfigurableCacheFactory::ensureRemoteCache
        at coherence::net::DefaultConfigurableCacheFactory::configureCache
        at coherence::net::DefaultConfigurableCacheFactory::ensureCache
        at coherence::net::CacheFactory::getCache
        at unsigned __int64 coherence::lang::class_spec<class coherence::lang::Managed<class ContactId>,class coherence::lang::extends<class coherence::lang::Object
    ,class coherence::lang::Void<class coherence::lang::Object> >,class coherence::lang::implements<void,void,void,void,void,void,void,void,void,void,void,void,void
    ,void,void,void> >::sizeOf(bool)
        at _onexit
        at class coherence::util::Hashtable * coherence::lang::factory<class coherence::util::Hashtable>::create(void)
        at class coherence::util::Hashtable * coherence::lang::factory<class coherence::util::Hashtable>::create(void)
        at BaseThreadInitThunk
        at RtlInitializeExceptionChain
        at RtlInitializeExceptionChain
        on thread "main"
    Caused by: coherence::io::IOException: socket disconnect
        at unsigned int __thiscall coherence::net::Socket::readInternal(unsigned char *,unsigned int)(Socket.cpp:333)
        at coherence::net::Socket::readInternal
        at coherence::net::Socket::SocketInput::read
        at coherence::io::BufferedInputStream::fillBuffer
        at coherence::io::BufferedInputStream::read
        at coherence::component::util::TcpInitiator::readMessageLength
        at coherence::component::util::TcpInitiator::TcpConnection::TcpReader::onNotify
        at coherence::component::util::Daemon::run
        at coherence::lang::Thread::run
        on thread "ExtendTcpCacheService:coherence::component::util::TcpInitiator:coherence::component::util::TcpInitiator::TcpConnection::TcpReader"

    We are facing same issue.    Could you please provide us any working .Net sample code for the version 12.1.2.0.
    <ssl>
                  <protocol>Tls</protocol>
                  <local-certificates>
                    <certificate>
                      <url>c:\Cert\</url>
                      <password>password</password>
                      <flags>DefaultKeySet</flags>
                    </certificate>
                  </local-certificates>
                </ssl>
    thanks
    Bala

  • Coherence Extend: is remote address a JVM/System property?

    Hello,
    I want to pass remote address and port as a JVM argument (not really being part of the cache configuration of the extend clients), is it possible?
    <remote-addresses>
    <socket-address>
    <address>192.168.0.2</address>
    <port>9099</port>
    </socket-address>
    <socket-address>
    <address>192.168.0.3</address>
    <port>9099</port>
    </socket-address>
    </remote-addresses>
    is it possible to Dynamically inject the Address into the cache configuration file?
    <socket-address>
    *<address>{IPAddress}</address>*
    <port>9099</port>
    </socket-address>
    </remote-addresses>
    Thanks
    Prab

    Hi Prab,
    You do it like this:
    <socket-address>
          <address system-property="my.extend.address"></address>
          <port system-property="my.extend.port"></port>
    </socket-address>You then specify the properties when you start up
    -Dmy.extend.address=192.168.0.2 -Dmy.extend.port=9099JK

  • Coherence *Extend-TCP configuration not working

    Hi,
         I was trying to setup the Coherence *Extend-TCP configuration on my solaris box.
         To start with, i'm trying to start a Cache server instance by using the cluster-side configuration XML (given at URL below)
         http://wiki.tangosol.com/display/COH32UG/Configuring+and+Using+Coherence*Extend
         But while starting its throwing me the below error. The Coherence version that i'm using is 3.2/353. Please advise.
         Exception in thread "main" java.lang.IllegalArgumentException: The "Proxy" element is missing a required acceptor configuration element
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.ProxyService.configure(ProxyService.CDB:30)
         at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:5)
         at com.tangosol.coherence.component.util.SafeService.getRunningService(SafeService.CDB:26)
         at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:1)
         at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:9)
         at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:775)
         at com.tangosol.net.DefaultCacheServer.start(DefaultCacheServer.java:138)
         at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:60)
         regards
         Mike

    Sorry,
         I noticed that the above error occurs for version 3.1.1 (& not for 3.2) as previously
         specified in previous message (above). My apologies.
         As a follow-up, i've now installed 3.2 jars on my environment & i noticed that the
         above error doesnt occur for this version. The cache server seems to be coming
         up fine now (with the appropriate TCP/IP configuration tag in the xml).
         But when i try to run my client application (which attempts to connect to this
         remote cache server), it throws an InvocationTargetException error (full exception
         below).
         The error indicates that i'm missing some elements in the XML configuration.
         Exception
         (Wrapped) java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at com.tangosol.net.extend.AdapterFactory.ensureCacheServiceAdapter(AdapterFactory.java:69)
              at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:729)
              at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:650)
              at com.tangosol.net.DefaultConfigurableCacheFactory.configureCache(DefaultConfigurableCacheFactory.java:831)
              at com.tangosol.net.DefaultConfigurableCacheFactory.ensureCache(DefaultConfigurableCacheFactory.java:284)
              at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:622)
              at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:600)
              at com.tangosol.examples.explore.SimpleCacheClient.main(SimpleCacheClient.java:25)
         Caused by: java.lang.IllegalArgumentException: Missing required initiator child configuration element: <extend-cache-scheme tier='front'>
         <scheme-name>extend-direct</scheme-name>
         <service-name>ExtendTcpCacheService</service-name>
         <initiator-config tier='front'>
         <tcp-initiator>
         <remote-addresses>
         <socket-address>
         <address>gpblnx1d.nam.nsroot.net</address>
         <port>32000</port>
         </socket-address>
         </remote-addresses>
         <connect-timeout>10s</connect-timeout>
         <request-timeout>5s</request-timeout>
         </tcp-initiator>
         </initiator-config>
         </extend-cache-scheme>
              at com.tangosol.coherence.extend.component.comm.Adapter.getInitiatorElement(Adapter.CDB:13)
              at com.tangosol.coherence.extend.component.comm.adapter.CacheServiceStub.configure(CacheServiceStub.CDB:5)
              at com.tangosol.coherence.extend.component.application.library.generic.CoherenceExtend.createCacheServiceStub(CoherenceExtend.CDB:4)
              at com.tangosol.coherence.extend.component.application.library.generic.CoherenceExtend.ensureCacheServiceStub(CoherenceExtend.CDB:15)

  • Coherence Extend Address-provider for dynamic load balancing

    Hi,
    I want to have load balancing across my proxies. so, trying to use <address-provider> feature.
    Here is my setup,
    I have two proxies and many clients.I am configuring both proxy and the client to use load sharing scheme.
    There are implemented classes for the interface AddressProvider. So, i am going to use that.
    Here is proxy server settings,
    <proxy-scheme>
    <service-name>ExtendTcpProxyService</service-name>
    <thread-count>10</thread-count>
    <acceptor-config>
    <tcp-acceptor>
    <address-provider>
    <class-name>com.tangosol.net.RefreshableAddressProvider</class-name>
    </address-provider>
    </tcp-acceptor>
    </acceptor-config>
    <autostart>true</autostart>
    </proxy-scheme>
    I know there is some silly mistake with that,
    I am getting error message in the following log,
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.emc.srm.common.daemon.SrmDaemon.start(SrmDaemon.java:59)
    ... 5 more
    Caused by: (Wrapped: Missing or inaccessible constructor "com.tangosol.net.RefreshableAddressProvider()"
    <address-provider>
    <class-name>com.tangosol.net.RefreshableAddressProvider</class-name>
    </address-provider>) java.lang.InstantiationException
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
    at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2542)
    at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2426)
    at com.tangosol.net.ConfigurableAddressProvider.createAddressProvider(ConfigurableAddressProvider.java:277)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor.configure(TcpAcceptor.CDB:78)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.ProxyService.configure(ProxyService.CDB:67)
    at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:6)
    at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:27)
    at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14)
    at com.tangosol.net.DefaultConfigurableCacheFactory.ensureServiceInternal(DefaultConfigurableCacheFactory.java:1057)
    at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:892)
    at com.tangosol.net.DefaultCacheServer.startServices(DefaultCacheServer.java:81)
    at com.tangosol.net.DefaultCacheServer.intialStartServices(DefaultCacheServer.java:250)
    at com.tangosol.net.DefaultCacheServer.startAndMonitor(DefaultCacheServer.java:55)
    at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:197)
    ... 10 more
    Caused by: java.lang.InstantiationException
    at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:587)
    at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2501)
    ... 23 more
    Cannot start daemon
    First question:
    1) without address provider section in the proxy server configuration xml, will it use any default address provider implementation?
    2) what's wrong with the proxy server settings xml which causes above error?
    Thanks
    Prab

    Hi LuK,
    Sounds like there is no load balancing is happening in my environment.
    I didn't use address provider tag since it's mentioned in AddressProvider Interface API that by default it uses ConfigurableAddressProvider implementation.
    Here is a xml snippet in remote client cache configuration xml,
    <tcp-initiator>
    *<remote-addresses>*
    *<socket-address>*
    *<address>PROXY-A</address>*
    *<port>9099</port>*
    *</socket-address>*
    *<socket-address>*
    *<address>PROXY-B</address>*
    *<port>9099</port>*
    *</socket-address>*
    *</remote-addresses>*
    <connect-timeout>10s</connect-timeout>
    </tcp-initiator>
    what i mean by load balancing is,
    I will be having lot of web service queries which runs very fast. I would like to see both the proxies serves the web requests.
    I am observing, One connection has been made to one proxy when it's starts up and keep hold on to it (no matter whether other proxy is free or not).
    is it a bug? or am i doing some mistake?
    Thanks
    Prab

  • How to ensure a Coherence Extend TCP service

    Hi,
    We have defined an Extend TCP service within our <caching-schemes> element as follows:
    <proxy-scheme>
    <service-name>ExtendTcpProxyService</service-name>
    <thread-count>5</thread-count>
    <acceptor-config>
    <tcp-acceptor>
    <local-address>
    <address>localhost</address>
    <port system-property="tangosol.coherence.tcpproxy.port">6090</port>
    <reusable>true</reusable>
    </local-address>
    <keep-alive-enabled>true</keep-alive-enabled>
    <tcp-delay-enabled>true</tcp-delay-enabled>
    </tcp-acceptor>
    </acceptor-config>
    <autostart>true</autostart>
    </proxy-scheme>
    However, we are not using com.tangosol.net.DefaultCacheServer as the entry point for our application and would prefer to continue to use our own main() method, ensuring caches as required.
    Given this, I understand that the autostart element has no effect. Clients are unable to connect and no TCP listener appears to have been started.
    Can you give a demonstration of how to call ensureService(.., ...) to start the proxy service? Is there any reason that you would advise us against this, e.g. instead starting DefaultCacheServer inside a separate process?
    Many thanks,
    James

    Hi James,
    In your main you can invoke DefaultCacheServer.startDaemon() method.
    Regards,
    Dimitri

  • Can I check remote address connecting to a ServerSocket before accepting?

    I have a ServerSocket for which I'd like to implement an IP filter, using an allow or deny list to control which IP addresses can connect. After accepting the connection, I check the remote address on the Socket that is created, and apply the filter. However, if I close the connection to a denied address, the client sees that the connection was accpeted, but then it throws a SocketException when it tries to write to it.
    That accomplishes the purpose of the filter, but it doesn't seem like good behavior from the client's perspective. I'd like to implement a ServerSocket that doesn't even accept the connection if the remote address is not permitted. Is there any way to do that?

    Why not write a connection accepted/refused message
    to the client and then carry on (or close the
    socket/streams at both ends)?I'm not sure I understand your suggestion. When ServerSocket.accept() returns by providing a Socket object, that is the first time the server code can determine the IP address of the client and apply an IP filter. However, the connection has already been established at this point, so it's not possible to make an accept/refuse decision for the connection based on the client IP address. By the time the server code sees the IP address, the connection has already been accepted, and the only recourse is to close the connection from the server (by calling close() on the Socket object that was returned), and the client will then throw an exception with the message saying that the software closed the connection.
    Legitimate users trying to connect may interpret this as a software problem, if they don't know any better. Intruders will discover from this behavior that the port is open through the firewall, and may conclude that IP filtering is being applied, and if they have some idea of what IP addresses are allowed, they could easily spoof them. Or they could keep trying, hoping to catch the server when the IP filtering is turned off.
    It would be better to mimic the filtering behavior of a firewall, whereby the connection is not established. Then the client would report that it could not establish the connection, and the user would be more likely to look into whether the port is open or IP filtering is occurring, rather than thinking there is a software problem. And the intruder would conclude that the port is not open and go somewhere else.
    I would need a different implementation of ServerSocket to do this. I checked jakarta commons net, but that only provides client side utilities. I'm currently untangling the source code of java.net.ServerSocket to see how difficult it will be to override the accept() method to provide filtering behavior. This seems like a useful thing, and I thought perhaps someone had already done so. Or perhaps someone can tell me why this is not a good idea.
    Message was edited by:
    MidnightJava

  • 2 way TCP connection using IP addresses

    Hi All,
    I need to pass data in both directions between 2 pc's connected to the internet. I am aware of the various TCP/IP and data socket examples, I am using Labview 7.0. I dont know much about the ptotocol involved but figure I only need a few pieces of info.
    If the server machine wants to connect to a client machine on the same network I understand no changes are required to the example vis (ie port 2055 used in Simple Data Server). But what would happen if the server PC wanted to connect to a client in a different country? Is that when IP addresses are needed?
    I imagine my final vi front panel will have a "This machines IP Addr" and "Client's IP Addr" text box, operators of the machines then tell the other person their mac
    hine IP address which is entered manually to setup a 2 way link.
    Is it possible to get Labview to find the full IP address of the machine ready for the other user to type in. Thanks in advance
    Regards Chris

    On the client side the users will need to fill in the IP address or domain of the server. If that IP is on the Internet or somewhere else that will work as long as the client PC has physical access and permission to open a tcp connection (no firewalls that block the port you are using etc.)
    Make a connect dialog that pops up if the user chooses to connect and have the user input the IP there and click OK. You can add functionality like bookmarks and "home page" to make things easier. If a home page / server is defined the client can connect to that upon startup. You may want also to add functionality that will reconnect in the background if the connection is lost.
    The client's IP is of less interest. If you need it though just use the string to IP function
    and the IP to string function from the tcp/ip palette. Do not wire anything to the former funtion but wire it's output to the latter. The latter will then output the IP of the local PC.
    MTO

  • How can we close the TCP connection in Extend Clients (C#)

    I tried to use a C# client to connect to server side Coherence Nodes. The problem is that, Coherence creates two new TCP connections every time I create a new cache, and it never closes the connection. In the end, Coherence keeps opening hundreds connection for me, and I faced the Out Of Memory Exception.
    I used Coherence Extend for the connection, and use Thread.CurrentPrincipal. I did the same thing in Java, and it works. I don't know why it doesn't work for C#.
    For now, is there any way provided by Coherence to close the open TCP connection?

    The issue was the AZURE_STORAGE_CONNECTION_STRING was set improperly. I was originally using the value from the 'sig' querystring value, instead of the entire signature querystring.
    SET AZURE_STORAGE_CONNECTION_STRING=BlobEndpoint=https://viperprodstorage1.blob.core.windows.net/;SharedAccessSignature=<signature>
    Should have been...
    SET AZURE_STORAGE_CONNECTION_STRING=BlobEndpoint=https://viperprodstorage1.blob.core.windows.net/;SharedAccessSignature=sr=c&si=foobar-prod-policy&sig=<signature>
    After that was set, I was able to upload.
    I don't know if this mattered much, but I also changed the format of the call to...
    azure storage blob upload -f "file.gz" --container "foobar-prod" -b "file.gz" --verbose

  • Closed TCP connection throws "Address already in use:connect"

    Hello,
    I am writing a deamon that has to connect to a server from a well-specified local port number.(very imp. constraint)
    Evry time I have to write something on server's output stream I do:
    public synchronized void sendMsg(byte[] msg) throws IOException {
         //#1
         clientSocket = new Socket();
         clientSocket.setReuseAddress(true); //so i can bind even when in TIME_WAIT
         clientSocket.setKeepAlive(false); //optional, but i guess no harm here
         clientSocket.bind(localSocketAddress); //local address is correct
         clientSocket.connect(hostSocketAddress); //.. and so is the host address
         //#2
         clientSocket.getOutputStream().write(msg);
         clientSocket.getOutputStream().flush();
         clientSocket.shutdownOutput();//optional..
         clientSocket.close();// so I DO close the socket
    After the 1st successfull attempt to write to the server,
    a call to sendMsg(..) is throwning a "Address already in use: connect" IOExc.
    The problem comes from clientSocket.connect() but that's odd since I closed the socket in earlier call..
    I think the physical connection is not closed, although the clientSocket.close() returned..
    So I put the code from //#1 to //#2 into a loop that catches the exception, attempts to close and sleeps
    for a while(1 sec).. but no use! it seems looping forever...
    Is there a way I can force the connection be closed so I can create a new one safely?
    [I can't reuse the same connection for multiple calls - it's ugly and the server may close it anyway..]
    Any hint, ideea?
    Thank you
    L

    1st becasue it's ugly to maintain a connection for
    daysYes. But it is also ugly to continuely close and open a socket.
    The solution is to add a timeout which closes the connection if it has not been used for a certain amount of time.
    2nd because the server may close it [and i can't stop
    him for doing that]
    So you add retry logic. But given that you are using TCP you must be guaranteeing delivery so you have to have retry logic if the server isn't up in the first place right? The same logic is used if the connection has failed.

Maybe you are looking for

  • Master data transfer using CIF

    Hi all, I am just clueless. I am trying to transfer master data from ERP to EWM but it ain't happening. It is throwing out this error. System: P6QCLNT800 User: RFC_USER_1 12/11/2010 Function/Q/SAPAPO/CIF_LOC_INBOUND Text: Internal error in IGS2, US.

  • Oracle license audit

    Hello Oracle experts, I am trying to perform an audit on an environment with many Oracle server installations in different regions, I am trying to find the best way to identify the following details for each installation: Total Processors, RAC, Parti

  • Xml slideshow controls, need help!

    Hello, I am new to actionscript and am trying to make a slideshow with next and previous controls. The info for the slideshow is coming via xml. I have it up and running but there are two issues. When clicking on the next or previous buttons the new

  • IPhone4 will not update with iOS5

    I have the iPhone 4 and have been unable to download the iOS5 update. My phone downloads the file but then sits idle and will not complete the installation. I have let it sit overnight and still no luck. Has anyone else had this issue? How do I fix i

  • Can we perform Join operation using SQLCall with Datatabae Query

    Hi, I am working on Toplink SQLCall query. I am performing join operation but, it is giving error. so please, any can tell me . we can perform join operation using SQLCall with Database Query Thanking You.