Specifying the Address of the TREX Name
Server
TREX provides APIs (Application Programming Interfaces) for the languages Java and ABAP, which allow access to all TREX functions. The Java interface (TREX Java client) is part of the SAP Web AS Java as TREX service. The TREX Java client needs to know the address of the TREX name server in order to communicate with the TREX servers.
The following procedure describes how you determine the TREX name server address and how you specify it in the SAP NetWeaver Visual Administrator.

The TREX Java client communicates with the TREX server by HTTP and TCP/IP. Make sure that the TCP port that the name server uses is open.
...
You have to specify the address of the TREX name server in the SAP NetWeaver Visual Administrator by naming the following values <host_name_of_trex_host>:<name_server_port>:
● <host_name_of_trex_host>: name of the host on which TREX is installed and where the TREX name server runs.
● <name_server_port>: port of the TREX name server
1. You can determine the TREX name server address in two ways:
a. Start the TREX admin tool (see Starting the TREX Admin Tool) and determine the address of the name server using Landscape ® Tree ® topology ® globals ® all_masters.

For example: mytrexhost:34801
b. Determine the port of the TREX name server by means of the following rule: <name_server_port>: 3<instance_number>01

The value <instance_number> signifies the TREX instance number which had been specified during the TREX installation:
Installation directory for TREX
■ On UNIX /usr/sap/<sapsid>/trx<instance_number>
■ On Windows <disk_drive>:\usr\sap\<SAPSID>\TRX<instance_number>
The value for <host_name_of_trex_host> you know from the host where TREX is installed (mytrexhost).
2. Use the user <j2eeadm> to log onto the host on which the J2EE Engine is running.
3. Start the SAP NetWeaver Visual Administrator and log on to the J2EE Engine.

For more information about using SAP NetWeaver Visual Administrator, see SAP Help Portal help.sap.com ® Documentation ® SAP NetWeaver ® SAP Library ® SAP NetWeaver Library ® SAP NetWeaver by Key Capability ® Application Platform by Key Capability ® Java Technology ® Administration Manual ® J2EE Engine Administration Tools ® Visual Administrator
4. Click Cluster and navigate to Services ® TREX Service.
5. Enter the address of the TREX name server into the parameter nameserver.address.
tcpip://<host_name_of_trex_host>:<name_server_port>
You enter only the host name or the host name and the domain depending on your network environment.

tcpip://mytrexhost:34801 or tcpip://mytrexhost.mydomain:34801

The address of the TREX name server must be configured for all server processes of the cluster. Otherwise the connection between the J2EE Engine and TREX cannot be established.
6. Save your changes and confirm the restart of the service.
