TCP connections used by RMI

hello,
I tried making a simple RMI application to check about the usage of TCP connections for the communication. The client and server are running on different hosts and my observations are:
a) when the client is invoking a method on the server at an interval of about 1 sec, then the same connection is used everytime for the communication.
b) when the client is invoking a method on the server at an interval of about 30 sec, then the a new TCP connection is made everytime for the communication !
The java.rmi.dgc.leaseValue is set to 100 minutes in both cases. Does this not mean that the connection should be maintained for 100 minutes even if there is no communication between the client and server ??

thanks, I could not find any parameter in the standard properties list, however in the SUN specific properties we do have sun.rmi.transport.proxy.connectTimeout which should control the connection life. I use IBM's JRE, so I will try to find an equivalent property.
Another question ... what is the benefit of java.rmi.dgc.leaseValue if the TCP connection is closed itself ? Does the gc not happen if the TCP connection itself breaks ? Or does the RMI think about a logical connection which is independent of TCP connection's life ?

Similar Messages

  • Anyone else having an issue with TCP connections using iCloud for Windows?

    Hi,
    Before I asked this question, I did wait to see if any related questions came up, but none did, so I submit it now.
    On my admittedly older laptop running Windows 7 64b Home, I've run into difficulties with the iCloud for Windows app to the extent that I had to uninstall it.
    It would that, as my laptop was running, in the background, iCloudServices.exe would endlessly iterate TCP connections, which, while not actively sending or receiving any data, after some hours would number over 100 instances, taking up resources, and grinding my laptop's WiFi connection to a grindingly slow pace. I ended up, within the app, turning off everything, iCloud Drive and Photos, (I never used bookmarks), but still this would continue to occur.
    I contacted Apple Support, explaining what was going on, and they stated they only dealt with IOS and gave me a Microsoft Support number. When I called Microsoft support, I came more and more to the realization that the issue was specifically with the iCloud for Windows app, as that was the only software that was endlessly creating and not closing TCP connections as it was. How was Microsoft supposed to solve an issue with Apple code?
    So I called Apple back, whereupon they insisted it was a Microsoft issue. I explained other cloud services installed on the same computer were not having the same issue, it was unique to ICloudServices.exe. They stated they only dealt with IOS. I stated I purchased an iPad Air less than 7 months ago, and was trying to run iCloud in support of that.  They again stated they only dealt with IOS, and suggested I again try Microsoft. I asked them if it was reasonable to expect Microsoft to solve issues with Apple code? They said regardless, there was zero support offered for anything having to do with Windows, and all I could do was uninstall the app, which I did, though that did not feel very satisfactory to me. My thinking is, if Apple writes a Windows app in support of their hardware, they should offer support for it.
    Anyway, I was just wondering, is this an issue unique to me? or have others experienced a similar issue? I found this issue by opening the Windows Resource Monitor, looking under the Networking tab, and scrolling through the TCP Connections section to find 100+ concurrent iCloudServices.exe instances listed, whereas even Chrome, with multiple tabs and extensions, topped out at around 20.
    My one month old Desktop, DYI, sports a solid Asus 1150 MoBo, i7-4790k cpu, 16GB Ram, and an EVGA GTX 970 video card. I list some specs only to illustrate this computer has no hardware issues in comparison to my long in tooth laptop. On this desktop, running Win 8.1 Pro 64b,  at least as many, identifiably Apple, background service TCP connections are created even compared to Chrome, regardless of many tabs being open, many extensions, and even some related apps. Adobe does not even come close, though I run the full CC subscription. On this new computer, running Windows 8.1 Pro 64b, there are currently over 50 TCP connections and loopbacks that do not identify themselves, with just a - for the Image, and PID. With the experience on my laptop, I wonder how many of these are generated by Apple software, if not specifically iCloud software?
    The frustrating aspect of these connections is they seem in no way active, While the Chrome and Adobe connections can be seen to be transferring data, as long as I am not running iTunes, or so have my iPad actually plugged in, it seems 99% of the time these iCloudServices.exe connections are just taking up ports, neither sending nor receiving any data discernable to me under the Processes with Network Activity, or Network Activity lists, both displayed in the same window as the TCP Connections in the Windows Resource Monitor.
    Though I am fairly ignorant as regards coding, it seems as if there is no call to close a connection, very specifically, iCloudServices.exe, when it is no longer needed, and the next time a connection is needed, a new one is opened, rather than accessing the one previously opened. The only other reason I could imagine this might be occurring is if my Norton Internet Security software might mask and/or block the port after a certain time of inactivity.
    Anyone out there have any ideas or advice about this? Thanks in advance.

    Thanks jared,
    I'm still dealing with this issue through Apple. Some time after I posted this, I contacted Apple again. They did start a case up for me, as I was experiencing the same behavior on two different machines, with two different versions of Windows.
    So far it remains unsolved. I've logged iClouds for Windows on my desktop, which is brand new, then logged for awhile after completely uninstalling Norton Security Suite, depending on the Microsoft security for some time, and finally logged after I uninstalled iCloud for Windows, restarted, installed a clean download, and connected using a completely different test account, which Apple set up for me. None of this made any difference. Looking at the logs, it seems every 10 minutes, iCloudServices.exe creates a new TCP connection to confirm I'm using less than 5GB on iCloud, (which I am by a good margin, using less than 2GB), it seems this connection is not closed, and when the next iteration rolls around 10 minutes later, a new TCP connection is created. I come very close to having 6 TCP connections created per hour, until I restart my computer. This works out to... 6 x 24 = 144/day.
    Perhaps the article you posted will shed some further light on this. I'm thinking seeing the state of the connection through netstats, at the least, could help.
    For the last week, I've been putting a hold on further logging, as Apple wants me to create a new user account on one of my computers, install iCloud for Windows there, and log it running in the other account. This however basically means I cannot use my computer for a fair number of hours, and I've been busy enough with work the past week that I haven't the time or energy to afford to set this up and run it. I've had need of my computers too much for the past week.

  • 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

  • Many TCP connections used after 9i install

    I've installed 9i personel on XP Pro as a learning aid in advance of installing it to a real server. I notice (using "netstat") that there are now many TCP connections from my machine to localhost (also my machine) on ports from 2192 through 2267. All seem to be in a time_wait state. Are these normal and necessary?
    Thanks!

    I've installed 9i personel on XP Pro as a learning aid in advance of installing it to a real server. I notice (using "netstat") that there are now many TCP connections from my machine to localhost (also my machine) on ports from 2192 through 2267. All seem to be in a time_wait state. Are these normal and necessary?
    Thanks!

  • Monitoring a TCP connection

    Hello folks,
    I have a VI that monitors a TCP connection using the function "Not a
    Number/Path/Refnum". When the peer (the other side which this VI is
    connected is a win program in Visual Basic) closes the connection, my
    VI seems unable to detect the closed connection, it is "thinking" that
    the TCP refnum is still valid.
    How I can handle it?
    Thanks!

    Monitor the error cluster instead of the refnum. th refnum is a local handle that has nothing to do with the actual link. It's just a pointer to the link object. The error cluster holds the information you want to monitor.
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • 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

  • MAIL USING PL/SQL PROCEDURE TCP CONNECTION ERROR

    I was trying to send an e-mail using the demo-mail helper package which uses UTL_SMTP package and on execution, it gives the following TCP Connection error. Is it some something to do with mail configuration?
    This is the sample code I was trying to run.
    demo_mail.mail( sender => 'Me <[email protected]>',
    recipients => 'Someone <[email protected]>, ' ||
    '"Another one" <[email protected]>',
    subject => 'Test', message => 'Hi! This is a test.');
    And this is the error I am getting.
    class oracle/plsql/net/TCPConnection does not exist
    at "SYS.UTL_TCP", line 537
    at "SYS.UTL_TCP", line 199
    at "SYS.UTL_SMTP", line 102
    at "SYS.UTL_SMTP", line 121
    at "VNARAYA.DEMO_MAIL", line 159
    at "VNARAYA.DEMO_MAIL", line 119
    at "VNARAYA.DEMO_MAIL", line 105
    at "VNARAYA.SEND_MAIL", line 2
    at line 1

    The Java library needed by UTL_TCP is not created properly. You may just run $ORACLE_HOME/rdbms/admin/initplsj.sql as SYS to install it:
    cd $ORACLE_HOME/rdbms/admin
    sqlplus sys/<sys-password> @initplsj.sql

  • RMI TCP Connection in a log file - connection count in brackets?

    Hello,
    I have a server whcih logs RMI connections to a file. For example, I can find these kind of log-lines in the file:
    2009-10-19 07:43:33,809 INFO  [RMI TCP Connection(2559)-109.84.36.165] de.test.foo..FooService This is the log messageI wonder what the number in brackets means: (2559)
    Does it represent the number of currently open connections (this would be very bad in my case), or is it just a simple counter to distinguish between different RMI connections in the log file?
    Thanks a lot for your help!

    Hello,
    thanks for your answer, good to hear that it is just a counter. I was not seriously thinking that it was a connection count - but you know, there are moments when I just have to ask to be sure ;)

  • How to limit the number of TCP connections beeing used concurrently while a page is beeing loaded?

    We manufacture industrial small-footprint control modules with embedded web server. The resources of these modules are very limited, especially in RAM. We have problem, that FF opens 15 parallel TCP connections while loading a web page (main html page first, then all icons simultaneously). We can not handle such behavior because of lack of RAM memory needed for TCP buffers.
    Question is how to limit the number of concurrent TCP connections the browser will use? We need to do it somehow directly from the page, we can not push our customers to change the general settings of their browsers (they would not understand such things anyway).
    Do anyone have any suggestion?

    Sorry, one other thought. Many web designers now combine all icons into a single image and use CSS to clip the image so that only the desired portion is displayed. This minimizes the number of required connections and increases the probability that the image can be retrieved from cache.
    More info:
    * [http://www.w3schools.com/css/css_image_sprites.asp CSS Image Sprites - W3Schools]
    * [http://www.alistapart.com/articles/sprites/ A List Apart: Articles: CSS Sprites: Image Slicing’s Kiss of Death]
    * [http://coding.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/ The Mystery Of CSS Sprites: Techniques, Tools And Tutorials | Smashing Coding]
    No idea whether this is practical for your application.

  • Using an RMI Client to connect to a Server.

    I am using an RMI Client on my PC (using Eclipse 3.2) to connect to a Server on a Linux System.
    The Server is up and running and from the client side,I am reading all the server configuration into a variable and passing this variable into Naming,lookup.
    String lookUp =     "//" + prop.getProperty("rmi.hostName") +
                          ":" +  prop.getProperty("rmi.appPort") +
                          "/" +  prop.getProperty("rmi.appName);
    System.out.println(lookUp)   // Value://17.10.222.80:40009/RMIAPP
    Application a =  (Application)Naming.lookup(lookUp)     It is unable to connect to the Server.
    Am I missing anything? Have I overlooked any point?
    Thanks

    http://java.sun.com/docs/books/tutorial/rmi/index.html

  • Does RMI protocol open a new TCP connection?

    Hey,
    I have an eclipse client that runs on computer A,
    And JBoss as a server that run on machine B.
    The client initials the initial context and work against a stateless session bean.
    When I ran sniffer I noticed in a strange behavior- a lot of new TCP connection and wait for a 3 seconds for each connection.
    It seems strange; does RMI need to open a new TCP connection for each call?

    Not necessarily for each call: RMI tries to conserve connections as much as possible, but of course it does need to open connections, and more than one at a time if there are multiple client threads doing RMI calls simultaneously.
    I think we're actually talking about RMI/IIOP here if this is JBoss.

  • OSB using socket Transport ,how to keep a TCP connection open

    hi my firends,
    i met a problem , our project need build an OSB to control a socket service which is able to transfer a big data file (maybe a voice file,*.wav),and the client program will play the voice file on live.
    So my solution is that : keep a socket (tcp) connection open,client listen port and makes date play.
    but i can't make the OSB socket transport alway open,it will timeout after a few second if have none date received.
    how could i deal with it ... pls let me konw if you have any idea...i will wait you on line
    thanks guys

    Hi,
    I'm not sure if that's achievable using OSB, and even if it was, I don't think OSB was designed having this type of application in mind...
    I understand that you need a media streaming solution and I'm pretty sure that there are plenty of tools out there that can help you in doing that, and maybe some of them can be integrated with OSB in some way...
    Cheers,
    Vlad

  • Using WL SSL for TCP connections

    I'm trying to write a FTP client in order to connect to a server using SSL.
    Does anyone used WL security classes to connect to an FTP server using SSL.
    Any help is appreciated

    Hi Alejandro,
    Check out SSLClient.java which is included in WLS 6.1 (GA), and is contained in
    WebLogic 5.1.0 SP10, and also WebLogic 6.0 SP2
    SSLClient.java has example code for how to create outgoing SSL connections
    using either a 3rd party SSL implementation (such as JSSE) or WebLogic's own
    security classes. Take your pick. Taking a look at SSLClient.java is probably
    the best place for you to start.
    Thanks,
    Joe Jerry
    "Alejandro Mejías" wrote:
    I'm trying to write a FTP client in order to connect to a server using SSL.
    Does anyone used WL security classes to connect to an FTP server using SSL.
    Any help is appreciated

  • 10.1.3 cache synchronization using custom RMI code

    I am trying to port our custom RMI synchronization code (overriding RMIClusteringService) from 9.0.4 to 10.1.3.
    It works by sending an update message to the remote cache whenever an object gets changed on the local cache as follows:
    2006.05.15 11:28:38.117--ServerSession(1102039280)--Thread(Thread[RMI TCP Connection(926)-19.39.48.136,5,RMI Runtime])--Received updates from Remote Server
    This message then results in a trip to the DB to get the object updates.
    Per 10g documentatation, the changed notification should contain the changed attributes (change set) and this should not result in a DB trip for the remote cache. I am not seeing this behavior.
    This is probably because I was using the old (9.0.4) sessions file with our custom cache synchronization manager, which overrides toplink cache sync settings, as shown below:
    <cache-synchronization-manager>
    <clustering-service>
    oracle.toplink.remote.rmi.polling.RMIPollingClusteringService
    </clustering-service>
    <naming-service-url>localhost:1099</naming-service-url>
    </cache-synchronization-manager>
    <event-listener-class>
    oracle.toplink.remote.rmi.polling.RMIPollingClusteringServiceSessionEventAdaptor</event-listener-class>
    With 10.1.3 RMIClusteringService is deprecated and replaced by RMITransportManager. A whole bunch of other classes has been added. Has anyone migrated or written RMI custom cache sync code to use RMITransportManager? If so, can they share their experiences and/or send their code samples? Any other thoughts will be appreciated too.
    thanks,
    Prabodh.

    I am trying to port our custom RMI synchronization code (overriding RMIClusteringService) from 9.0.4 to 10.1.3.
    It works by sending an update message to the remote cache whenever an object gets changed on the local cache as follows:
    2006.05.15 11:28:38.117--ServerSession(1102039280)--Thread(Thread[RMI TCP Connection(926)-19.39.48.136,5,RMI Runtime])--Received updates from Remote Server
    This message then results in a trip to the DB to get the object updates.
    Per 10g documentatation, the changed notification should contain the changed attributes (change set) and this should not result in a DB trip for the remote cache. I am not seeing this behavior.
    This is probably because I was using the old (9.0.4) sessions file with our custom cache synchronization manager, which overrides toplink cache sync settings, as shown below:
    <cache-synchronization-manager>
    <clustering-service>
    oracle.toplink.remote.rmi.polling.RMIPollingClusteringService
    </clustering-service>
    <naming-service-url>localhost:1099</naming-service-url>
    </cache-synchronization-manager>
    <event-listener-class>
    oracle.toplink.remote.rmi.polling.RMIPollingClusteringServiceSessionEventAdaptor</event-listener-class>
    With 10.1.3 RMIClusteringService is deprecated and replaced by RMITransportManager. A whole bunch of other classes has been added. Has anyone migrated or written RMI custom cache sync code to use RMITransportManager? If so, can they share their experiences and/or send their code samples? Any other thoughts will be appreciated too.
    thanks,
    Prabodh.

  • ASA 5505:Static Routing and Deny TCP connection because of bad flag

    Hi Everybody,
    I have a problem. I made a VPN site-2-site with 2 ASA 5505. The VPN works great. And I create a redondant link if the VPN failed.
    In fact, I use Dual ISP with route tracking. If the VPN fails, the default route change to an ISDN router, situated on the inside interface.
    When I simulated a VPN fail, the ASAs routes switch automatically on backup ISDN routers. If I ping elements, it works great. But when i try TCP connection like telnet, the ASAs deny connections:
    %PIX|ASA-6-106015: Deny TCP (no connection) from 172.16.10.57/35066 to 172.16.18.1/23 flags tcp_flags on interface interface_name.
    the security appliance discarded a TCP packet that has no associated connection in the security appliance connection table. The security appliance looks for a SYN flag in the packet, which indicates a request to establish a new connection. If the SYN flag is not set, and there is not an existing connection, the security appliance discards the packet.
    thanks!
    EDIT: On the schema, The interface of the main asa is 172.16.18.148...

    Check if the xlate timer is set greater than or equal to what the conn timer, so as not to have connections waiting on xlates that no longer exist. To minimize the number of attempts, enable "service resetinbound" . The PIX will reset the connection and make it go away. Without service resetinbound, the PIX Firewall drops packets that are denied and generates a syslog message stating that the SYN was a denied connection.

Maybe you are looking for