Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

On platform using a Unix-based DataStage Engine you can use the script below which, when executed on your DataStage engine (v8.5+), will dump the list of ports configured for use by DataStage Clients in your environment.   For it to execute properly the current user must have read access to the DataStage installation directories.  In most cases being a member of the

...

dstage

...

group should be sufficient.

ExtractPorts.sh
Code Block
theme
languagebashFadeToGrey
titleExtractPorts.sh
linenumberstrue
#!/bin/sh

# ExtractPorts.sh
# by Barry Squire
# (C) 2019 Data Migrators Pty Ltd

DSHOME=`cat /.dshome`
VERSION_XML="$DSHOME/../../Version.xml"

if [ ! -f $VERSION_XML ]
then
   printf "Cannot find Version.xml in DataStage installation directory\n"
   printf "\$DSHOME: $DSHOME\n"
   printf "\$VERSION_XML: $VERSION_XML\n"
   exit -1
fi

printf "\n%-10s %-20s %8s\n---------- ---------------------- ------\n" "Tier" "Name" "Port"

for i in "is.console.port"
do
   NAME=`echo "$i" | tr '[:lower:]' '[:upper:]'`
   PORT=`grep -E "$i" "$VERSION_XML" | grep -Po '(?<=")[0-9]+'`
   printf "SERVICE    %-20s %8s\n" $NAME $PORT
done

for i in "dsrpc.port" "jobmon.port.1" "jobmon.port.2"
do
   NAME=`echo "$i" | tr '[:lower:]' '[:upper:]'`
   PORT=`grep -E "$i" "$VERSION_XML" | grep -Po '(?<=")[0-9]+'`
   printf "ENGINE     %-20s %8s\n" $NAME $PORT
done

printf "\n"

A typical output might look like this:

Unix Shell
Code Block
languagebash

...

[root@testiis85 ~]# ./ExtractPorts.sh 

Tier       Name                     Port
---------- ---------------------- ------
SERVICE    IS.CONSOLE.PORT          9080
ENGINE     DSRPC.PORT              31538
ENGINE     JOBMON.PORT.1           13400
ENGINE     JOBMON.PORT.2           13401

[root@testiis85 ~]#


In the case above ...

  • The IS.CONSOLE.PORT (9080) port must be open between the MettleCI Host and your Services tier. 

  • The DSRPC (31538) and JOBMON (13400, 13401) ports need to be open between the MettleCI Host and your Engine tier.