On the UNIX operating system, why does the Rendezvous (RV) daemon rv(r)d inherit an application’s TCP ports which has nothing to do with the RV transport and does not release the ports even on client disconnects?

On the UNIX operating system, why does the Rendezvous (RV) daemon rv(r)d inherit an application’s TCP ports which has nothing to do with the RV transport and does not release the ports even on client disconnects?

book

Article ID: KB0085668

calendar_today

Updated On:

Products Versions
TIBCO Rendezvous -
Not Applicable -

Description

Resolution:
Description:
=========
On the UNIX operating system (OS) when any process is spawned through an application, the process inherits that application’s resources (file/socket descriptors etc.). This can be seen if a RV client application starts an RV daemon automatically instead of the user starting the RV daemon manually before launching the application. In this case the RV daemon inherits the socket(s) opened by the client application but cannot close the inherited resources. This problem could be overcome by setting the FD_CLOEXEC flag on the descriptor by using the fcntl call. The UNIX OS command "man fcntl" provides more details. However, Java does not allow this.
When using Java do the following:

1. Start the rv(r)d at boot time (or manually, before running the applications) with the
-permanent flag so that the rv(r)d will not disconnect if there isn't an application connected to it.

2. Change the application to open the rv(r)d connection immediately at start up before opening any other sockets.

3. Since Java cannot get to the socket descriptor, for Java applications you may connect to rv(r)d using a string "tcp:hostname:7500" depicting remote RV daemon connection semantics to prevent the Java application from restarting a rv(r)d.


Environment:
===========
UNIX Operating Systems

Issue/Introduction

On the UNIX operating system, why does the Rendezvous (RV) daemon rv(r)d inherit an application’s TCP ports which has nothing to do with the RV transport and does not release the ports even on client disconnects?