Hi Rachana,
        I printed out the environment in the java code and it's  there. I am 
not sure what is that counter_client but I downloaded the source code of 
gt-4.0.x and did the following grep under

./gt4.0.5-all-source-installer/source-trees/ws-gram yzhang8$    grep -r 
"GLOBUS_TCP_PORT_RANGE" .

./service/java/source/src/org/globus/exec/service/exec/ManagedExecutableJobResource.java:
            if (!envVarAlreadySet("GLOBUS_TCP_PORT_RANGE"))
./service/java/source/src/org/globus/exec/service/exec/ManagedExecutableJobResource.java:
                        "GLOBUS_TCP_PORT_RANGE", tcpPortRange));

so seems tcpPortRange is the variable that gets assigned by 
GLOBUS_TCP_PORT_RANGE and I did another grep on

./gt4.0.5-all-source-installer/source-trees/ws-gram yzhang8$ grep -r 
"tcpPortRange" .

./service/java/setup/common/gram-common-deploy-jndi-config.xml.in:              
          tcpPortRange
./service/java/source/src/org/globus/exec/service/exec/ManagedExecutableJobResource.java:
        String tcpPortRange = factoryHomeConfiguration.getTcpPortRange();
./service/java/source/src/org/globus/exec/service/exec/ManagedExecutableJobResource.java:
                if (tcpPortRange != null && !tcpPortRange.equals("")) {
./service/java/source/src/org/globus/exec/service/exec/ManagedExecutableJobResource.java:
                        "GLOBUS_TCP_PORT_RANGE", tcpPortRange));
./service/java/source/src/org/globus/exec/service/factory/FactoryHomeConfiguration.java:
        return this.tcpPortRange;
./service/java/source/src/org/globus/exec/service/factory/FactoryHomeConfiguration.java:
    public void setTcpPortRange(String tcpPortRange) {
./service/java/source/src/org/globus/exec/service/factory/FactoryHomeConfiguration.java:
        this.tcpPortRange = tcpPortRange;
./service/java/source/src/org/globus/exec/service/factory/FactoryHomeConfiguration.java:
    private String tcpPortRange;

and 

./gt4.0.5-all-source-installer/source-trees/ws-gram yzhang8$ grep -r 
"getTcpPortRange" .

./service/java/source/src/org/globus/exec/service/exec/ManagedExecutableJobResource.java:
        String tcpPortRange = factoryHomeConfiguration.getTcpPortRange();
./service/java/source/src/org/globus/exec/service/factory/FactoryHomeConfiguration.java:
    public String getTcpPortRange() {

it seems to me that "tcpPortRange" is never really used any where in the 
ws-gram Java API  other than simple initialize and get/set. I wonder if you can 
point me to the place that GLOBUS_TCP_PORT_RANGE is connected to the port range 
for status notification?

btw, I have tested that the globusrun-ws does follow the GLOBUS_TCP_PORT_RANGE 
so it's being used by Globus's some other component. I am just not sure how to 
make Java client read and use it. Thanks.

-Ryan

From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: [email protected]; [EMAIL PROTECTED]
Subject: RE: [gt-user] Globus Java API does not read the Port range problem
Date: Tue, 27 Nov 2007 17:27:26 -0600
























Ryan,

 

How do you run your Java client? Are the
environment variables passed to your client? For example, all default GT
scripts include this variable like 
–DGLOBUS_TCP_PORT_RANGE=$GLOBUS_TCP_PORT_RANGE.
One way to test this, is print this variable in your Java client code and
ensure that value is set.

 

I tried this on my windows laptop with GT
4.0.x code and see that the consumer is started up with in the range.

 

Z:\>set GLOBUS_TCP_PORT_RANGE=7000,7002

 

Z:\>bin\counter-client -s
https://localhost:8443/wsrf/services/SecureCounterService -z none -m conv

Consumer EPR: Address:
https://192.168.1.100:7000/wsrf/services/NotificationConsumerService

Reference property[0]:

<ns1:NotificationConsumerKey
xmlns:ns1="http://www.globus.org/namespaces/2004/06

/core"
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org

/2001/XMLSchema-instance"
xsi:type="xsd:string">b9803580-9d3f-11dc-b931-a0eee99e

d874</ns1:NotificationConsumerKey>

 

 

Rachana

 











From: Ryan Zhang
[mailto:[EMAIL PROTECTED] 

Sent: Tuesday, November 27, 2007
10:53 AM

To: Rachana Ananthakrishnan

Cc: [email protected]; Ryan Zhang

Subject: Re: [gt-user] Globus Java
API does not read the Port range problem



 

Hi Rachana,



          I
am using 4.0.x and I already set the GLOBUS_TCP_PORT_RANGE on both the client 
and the server side. The
cog.properties file is under my .globus dir and I didn't set other properties
in it. None of them seems is used by the Java API. Thanks





 





-Ryan





 





 





On Nov 27, 2007, at 9:15 AM, Rachana Ananthakrishnan wrote:











Ryan,

 

If you are using 4.0.x,
look at the GLOBUS_TCP_PORT_RANGE variable as specified 
inhttp://www.globus.org/toolkit/docs/4.0/common/javawscore/Java_WS_Core_Public_Interfaces.html#s-javawscore-Public_Interfaces-env

 

Similar information for
development versions (4.1.x)

http://www.globus.org/toolkit/docs/development/4.1.2/common/javawscore/javawscore-public-interfaces.html#javawscore-pi-env

 

The above is equivalent
of the property in cog.properties. 
http://www.globus.org/toolkit/docs/development/4.2-drafts/common/javacog/admin/javacog-admin-configuring.html#javacog-admin-configuring-portrange.
 Are other properties from cog.properties being used?
Where is the properties file in your system?

 

Rachana

 











From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Ryan Zhang

Sent:
Monday, November 26, 2007 5:19 PM

To: [email protected]

Cc: [EMAIL PROTECTED]

Subject:
RE: [gt-user] Globus Java API does not read the Port range problem



 

 

I tried all three and
it is still the same, anyone has some ideas?













> CC: [EMAIL PROTECTED]; [email protected]

> From: [EMAIL PROTECTED]

> Subject: Re: [gt-user] Globus Java API does
not read the Port range problem

> Date: Mon, 26 Nov 2007 11:41:44 -0600

> To: [EMAIL PROTECTED]

> 

> Here are three to try:

> 

> 1) Try -D tcp.port.range=5000,6000 in your
current example

> 2) Try
System.setProperty("tcp.port.range", "5000,6000") in your
app

> 3) Put "tcp.port.range=5000,6000"
in cog.properties

> 

> 

> Charles

> 

> On Nov 26, 2007, at 11:26 AM, Ryan Zhang
wrote:

> 

> > Hi Charles,

> > Thank you very much. However, I didn't
use the globusRun but 

> > just to use it as an example to show
you. I am only using Java API. 

> > I wonder if you can give me a concrete
example on how to edit the 

> > ~/.globus/cog.properties or
client-server-config.wsdd file? Say the 

> > port range is 50000~510000,both the
client and the server side? 

> > Thank you very much.

> >

> > -Ryan

> >










_________________________________________________________________
Put your friends on the big screen with Windows Vista® + Windows Live™.
http://www.microsoft.com/windows/shop/specialoffers.mspx?ocid=TXT_TAGLM_CPC_MediaCtr_bigscreen_102007

Reply via email to