Oracle E-business suite: virtual host names solution for R12.2

Posted in: Oracle, Technical Track

You have seen me rant about Oracle’ provided virtual hostname solution before. If you have not, check it out here. In summary, Oracle provided solution basically asks you to change the physical hostname of the server to the virtual one, which effects no just oracle ebs, but everything running on that server.

In my earlier blog post, I outlined the steps to get virtual hostname working for 11i, R12.0 and R12.1 releases. Oracle EBS R12.2 is a special case, as it uses both 32bit and 64bit JDK. I am happy to tell you that I have a working virtualhostname solution that works with EBS R12.2. Thanks to Maris Elsins who figured this out.

In brief, the solution is to compile both 32bit and 64bit version of the fakehostname library and copy them to /usr/lib and /usr/lib64 directories with same name And then set LD_PRELOAD to just with out the absolute path. This way both 32bit and 64bit libraries pick up appropriate library corresponding to their architecture.

Here are the steps to implement the solution
#download the source code
[[email protected] ~]$
[[email protected] ~]$

[[email protected] ~]$ cd fakehostname-master/
#compile 32bit library
[[email protected] fakehostname-master]$ gcc -fPIC -m32 -shared -Wl,-soname, -ldl -o fakehostname.c
#compile 64bit library
[[email protected] fakehostname-master]$ gcc -fPIC -m64 -shared -Wl,-soname, -ldl -o fakehostname.c

[[email protected] fakehostname-master]$
ls libfakehostname*

#copy the 32bit library to /usr/lib
[[email protected] fakehostname-master]$ sudo cp /usr/lib

#copy 64bit library to /usr/lib64 with same name as 32bit library
[[email protected] fakehostname-master]$ sudo cp /usr/lib64/

#set LD_PRELOAD to the library name. Do not use the absolute path

[[email protected] ~]$ export LD_PRELOAD=”″

#test the fake hostname
[[email protected] ~]$ hostname

[[email protected] ~]$ export

[[email protected] ~]$ hostname

Want to talk with an expert? Schedule a call with our team to get the conversation started.

About the Author

Vasu Balla’s colleagues call him “Eagle Eye” for a reason – his diverse technical background enables him to view his clients’ systems from a 360-degree angle, giving him a higher level of understanding. Vasu is well known for being approachable, and he truly enjoys helping people. Even former colleagues reach out to Vasu when they are really stuck on an issue. When he isn’t working, Vasu can be found in the kitchen trying new recipes.

8 Comments. Leave new

Andrejs Prokopjevs
July 13, 2016 3:50 am

Hi Vasu,

To add. Maybe update this blog post of yours. There is an issue with Multi Apps-Tier setup.

Adding these two MYHOSTNAME and LD_PRELOAD variables to the sh profile are not taken by remote calls that ADOP is doing to remote slave nodes.

If you do from node1 ” ssh virtual-node2 “hostname” ” it will still return your physical hostname value from node2.
This is the nature of SSH which is not using login shell for direct remote call executions.

There are two options how to bypass it.

Option 1: (less secure) to configure ~/.ssh/rc file with same export commands.

-bash-4.2$ vi ~/.ssh/rc
-bash-4.2$ cat ~/.ssh/rc
export FAKEHOSTNAME=virtual-node2.virtualdomain

This requires PermitUserRC to be enabled in your /etc/ssh/sshd_config.

Why this is less secure. Well… anybody can put there ANY command there and it will be executed by ssh.
Imagine having there ” rm -Rf /* “. :)

Option 2: to configure ~/.ssh/environment file with same environment variables to be added.

-bash-4.2$ vi ~/.ssh/environment
-bash-4.2$ cat ~/.ssh/environment

This requires PermitUserEnvironment to be enabled in your /etc/ssh/sshd_config.

This is way more safe, as environment variables are not so harmful, right? :)

One sshd restart, and it works.

bash-4.2$ ssh virtual-node2 “id ; hostname”
uid=501(applmgr) gid=500(dba) groups=500(dba)

And ” adop -validate ” is not throwing anymore errors.


Awesome solution and kudos to Maris, Vasu and Andrejs for figuring this out. Thanks Vasu for sharing this. This solution will greatly reduce the switch over time during the DR of EBS.

Ramesh Kumar Kandukuri
July 1, 2021 3:34 pm


I am getting the error
export LD_PRELOAD=/usr/lib/
ERROR: object ‘/usr/lib/’ from LD_PRELOAD cannot be preloaded: ignored.
ERROR: object ‘/usr/lib/’ from LD_PRELOAD cannot be preloaded: ignored.
ERROR: object ‘/usr/lib/’ from LD_PRELOAD cannot be preloaded: ignored.
ERROR: object ‘/usr/lib/’ from LD_PRELOAD cannot be preloaded: ignored.

How do resolve the issue?

Ramesh Kandukuri

Ramesh Kumar Kandukuri
July 1, 2021 3:56 pm


I have tried both options giving the full path and just the name of the file, both situations same error. Not sure what is missing?

Your solution looks a great and perfect match for EBS 12.2.9 situation of DR. We are looking back for your reply for the fix of the error

Ramesh Kandukuri


If your notice carefully, the gcc compile commands are used to generate a 32bit library and a 64bit library. The newer version of Linux are default 64bit. So you might have to copy 64bit version of library to /usr/lib and 32bit version into /usr/lib32. Give it a try


Does this mean, using this I would be able to directly bring up the services on DR if they are in sync without even running autoconfig since we are using virtual hostnames?

Raivis Saldabols
October 11, 2022 9:15 am

Yes – it’s possible. But have to be planned, setup and tested very carefully to cover all eBS corks and features.

Andrejs Prokopjevs
October 13, 2022 7:58 am

Hi Anand,
That is correct. You can check one of the slide decks we were presenting at Collaborate 19 conference –


Leave a Reply

Your email address will not be published. Required fields are marked *