Set LD_BIND_NOW to resolve Linux TNS problem: 29: Illegal search error

I ran into a problem when running TNS Listener for my Oracle XE DB on my Linux box using the bash shell:

LSNRCTL> start Starting /oracle/product/11.2.0/xe/bin/tnslsnr: please wait... TNS-12537: TNS:connection closed TNS-12560: TNS:protocol adapter error TNS-00507: Connection closed Linux Error: 29: Illegal seek LSNRCTL> exit 

I tried a lot with various solutions provided on the Internet, and finally the problem was solved after linking to the post - https://dba.stackexchange.com/questions/23308/linux-error-29-illegal-seek-in-lsnrctl -for-linux-version-11-2

Solution for my case:

 export LD_BIND_NOW=1 

I installed Oracle XE DB in several Linux boxes, but I ran into this problem with just 1 box. What is this variable and how does it solve the problem of illegal searches?

Details of my Linux directory:

 bash-4.1$ uname -a Linux <hostname> 2.6.39-100.5.1.el6uek.x86_64 #1 SMP Tue Mar 6 20:26:00 EST 2012 x86_64 x86_64 x86_64 GNU/Linux 
+6
source share
3 answers

Today I faced the same problem. The problem is an error in the tnslsnr binary executable.

The solution I had was to change the hostname to an IP address in listener.ora located in /oracle/product/11.2.0/xe/network/admin/listener.ora

 # listener.ora Network Configuration File: SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /oracle/product/11.2.0/xe) (PROGRAM = extproc) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE)) (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) ) DEFAULT_SERVICE_LISTENER = (XE) 

Setting up the /etc/hosts and overriding the localhost operator as described in other answers does not work.

I don't know if it is recommended to use IP addresses instead of the host name, but for me this is a trick.

+1
source

Dynamic Loader Management

There are a number of environment variables that the dynamic loader will respond to. Most of them are more suitable for ldd than for the average user, and it is most convenient to install it by running ldd using various switches. They include

LD_BIND_NOW --- normal, functions do not "search" in libraries until they are called. Setting this flag causes all searches to occur when the library loads, which gives a slower startup time. This is useful when you want to test a program to make sure everything is connected.

In simple terms. If the LD_BIND_NOW variable is set to 1, then in C, C ++ it causes lazy loading, libraries (that is, loading libraries if necessary) or when it is used - instead of loading at startup

If the software runs in mixed mode, it is also installed.

Maybe in your case, the problem is with the launch, and this library has never been used ...!

0
source

Include the following line in /etc/hosts file:

 127.0.0.1 localhost.localdomain localhost 
0
source

All Articles