Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Prabhat_Verma
Explorer
1,464

Introduction

This blog will assist you in upgrading TREX 7.10 to Rev 85 on OS RHEL8 and steps to troubleshoot issues occurred during TREX upgrade. So before getting into the specifics, let’s look at some technical terms.

(TREX) stands for Text Retrieval and information Extraction. It serves as the primary SAP NetWeaver search engine, providing foundational search capabilities and technologies for both Enterprise Knowledge Management and the Search Engine Service (SES). It provides an integrated set of services and constitutes an essential component of the SAP NetWeaver Search Integration Capabilities.

The services provided by TREX include searching and retrieving information from extensive document repositories, conducting text mining, automatically classifying documents, searching and aggregating structured data in SAP applications.

TREX has the capability to process text from documents in various formats such as Microsoft Office and Adobe formats (PDF), as well as over 30 different languages. The search functionalities provided by TREX, including exact boolean, fuzzy, or linguistic searches, along with classification options such as query-based or example-based classification which empower end users with significant flexibility and capability.

TREX Architecture

The following graphic depicts the different components of TREX:

Prabhat_Verma_0-1707681317137.png

TREX Components

TREX comprises the following central components:

Java client and ABAP client

TREX offers Application Programming Interfaces (APIs) for Java and ABAP languages, enabling access to all TREX functions. The Java interface, known as the Java client, is integrated into the Application Server (AS) Java as a TREX service. Similarly, the ABAP interface, referred to as the ABAP client, is integrated into the Application Server (AS) ABAP. It's important to note that these APIs are exclusively released for SAP-internal development purposes.

Web server with TREX extension

The communication between Java applications and TREX servers is managed by the Web server. A TREX component that enhances the Web server with TREX-specific functions is installed on the Web server.

RFC Server

The RFC server facilitates communication between an SAP system and TREX servers. Requests from the SAP system are transmitted to an RFC server through a Gateway. Subsequently, the RFC server transforms these requests into a TREX-internal format before transmitting them to the appropriate TREX servers.

Queue server

The queue server coordinates the processing steps that take place during indexing. It collects incoming document, triggers preprocessing by the preprocessor, and further processing by the index server.

Preprocessor

The preprocessor preprocesses documents and search queries. Document preprocessing comprises several steps: Loading documents, filtering documents, analyzing documents linguistically. During search queries, the preprocessor performs a linguistic analysis.

Index server

The index server indexes and classifies documents and answers search queries. The processing takes place in the engines that belong to the index server: Search engine, text-mining engine, attribute engine.

Name server

The name server manages information on the entire TREX system. It makes sure that the TREX servers can communicate with each other and that they receive all necessary information. It is always active but becomes especially important in distributed multi-host TREX landscapes. The name server has the following tasks: Managing topology data, coordinating replication services, balancing the load, and ensuring high availability.

The Search Engine Service (SES)  

It enables users to search for business objects. SES is not a TREX component, it is part of the SAP NetWeaver Application Server (AS) ABAP. SES accesses the TREX functions through the TREX ABAP client. SES replicates the business objects from the ABAP application to TREX, so that it can apply TREX indexing and search functions to them. When a user enters a search query, the TREX system responds to it, not the database for the ABAP application.

Steps for TREX revision upgrade

We can follow the steps mentioned below which can help you to plan and execute SAP TREX revision upgrade. With the help of s-note 2460148 we can check supported platforms and OS software requirements and restrictions for TREX revision upgrade In my case we have upgraded TREX version 7.10 to Rev 85 on OS RHEL 8.6.

We have followed the below steps to upgrade TREX 7.10 rev 57 to Rev 85 on RHEL 8.6

Step 1

Check the current version of TREX through TREX admin console or you can check with connected SAP system through TREXADMIN T-Code –version tab

Prabhat_Verma_1-1707681516660.png

Step 2

Download the latest patch level from SMP . Follow https://service.sap.com/swdc   >  Support Packages and Patches > By Category > SAP NetWeaver and complementary products> SAP Netweaver > SAP NETWEAVER 7.5 > Search & Classification (TREX) > TREX 7.10 > Linux on X86 64 bit > TREX71_85-10004510.SAR 

Step 3: Then extract it with SAPCAR with following command:-

sapcar -xvf <file name.SAR> <path where file need to be extracted>

Step 4: Stop TREX service and also the Trex admin console if it is running.

Step 5:  Navigate to TREX SAR file  extracted directory and then from tx_trex_content/TX<OS>/ execute following shell script via ROOT user

./install.sh --action=update --sid=<TREX SID> --password=<password of TREX_SID_ADM user> --restart

Prabhat_Verma_2-1707681627310.png

Prabhat_Verma_4-1707681694756.png

Please check all the three steps stopping, update  and start the TREX should be  SUCCESSFUL for successful completion of TREX upgrade.

After upgrade start the TREX instance and goto to trexadmin console and verify the version again and check the running services.

Prabhat_Verma_5-1707681729583.png

Troubleshooting :-

Some of the issues we have faced during TREX upgrade and their resolution.

Error-1

 During upgrade of TREX instance failed with error "AttributeError: 'dict' object has no attribute 'has_key'" when applying Revision 85

Resolution :-

As per S-note 3389543 please download attached iniparser.py scrip and put this into "support" subdirectory of the directory with the TREX installation binaries .e.x in below path /TREX_patches/Revision_85/tx_trex_content/TX_LINUX_X86_64/support and start the upgrade process again

Error-2

During upgrade of TREX instance failed with error " Action: Migrating to new TREX installation structure - adapting directory layout -- failed - File name too long”: '/sapmnt/<SID>/profile/<long profile name>

Resolution :-

Check the profile directory of TREX instance /sapmnt/<SID>/profile and remove all the old profile backup copies and before  re-executing the upgrade go to the /usr/sap/<SID> and remove the latest update.<hostname>.TREXStatus.txt file and then re-execute the TREX upgrade process.

Error-3

Upgrade of TREX instance failed with error "Permission denied: 'htpasswd.1'Migration step failed.'" when applying Revision 85

Resolution :-

Please check the permission of  htpasswd file at location /sapmnt/<SID>/exe /Apache/bin/ it should be 750 and <sidadm>:spasys  owner of file.

Prabhat_Verma_6-1707681980974.png

Error-4

During upgrade getting the error related intsall.py  "/location/TRX_V85/tx_trex_content/TX_LINUX_X86_64/./support/_install.py", line 2106, in mainTrexAction self.initializeSetuplib().ErrorException: Unknown exception. Initialization failed.when applying Revision 85.

Resolution :-

As per S-note 2460148 we have installed procmail package in our RHEL 8.6 server and re-executed the upgrade process.

Error-5

After TREX upgrade we have observed in TREX admin console –under services tab , CPU and Memory performance is greyed out.

Prabhat_Verma_7-1707682029052.png

Resolution :-

As per S-note 3154119 - You can download and replace the TopoView.py file in 
/usr/sap/<TREX-SID>/exe/nuc/linuxx86_64/trex/python_support directory with latest one.  You need to restart python TREXAdminTool (no restart of the TREX instance is required). 

Conclusion:-

In this blog I have covered steps to upgrade TREX 7.10 rev 57 to rev 85 on RHEL 8.6 and how to troubleshoot issues which you may get during upgrade.

References Link & S-Notes:

https://help.sap.com/docs/SAP_NETWEAVER_700/129ff87c6c5310149786f918efe32a65/a4929d4206b70931e100000...

3154119 - TREX 710: Service Load Statistics aren't shown correctly in python TREXAdminTool

2460148 - TREX 710: supported platforms and OS software requirements and restrictions           

3389543 - TREX 710: Upgrade to Revision 85 failed with error "AttributeError: 'dict' object has no attribute 'has_key'"

Thanks for reading this article! Your feedback and suggestions are welcome.



 

3 Comments
Labels in this area