Operating System - HP-UX
1825002 Members
2637 Online
109678 Solutions
New Discussion юеВ

Re: Is it possible to mask the physical hostname?

 
Michael T. Boduch
Occasional Advisor

Is it possible to mask the physical hostname?

I'm running Oracle Applications 11i (Database and Middle Tier services) on a two node ServiceGuard cluster--not RAC, just a cold failover cluster whereby the package moves from one node to the other in response to the database background processes dying.

In any case, while we have a virtual IP address (and DNS name) for the package, the Oracle software always sees the actual hostname of the node that the package is running on. There's a number of good reasons why this is not desirable (which I'd be happy to explain if anyone is interested,) but what I'd like to know is whether it is possible to assign a "virtual hostname" to the S.G. Package so that any application run from within the package always sees the same hostname (say via gethostname) regardless of which physical node the package is running on?

Long winded question, I know. But I'm a DBA and not a unix admin and I don't know how to ask the question better than that...;-)

Any help would be GREATLY appreciated.

Thanks in advance!
15 REPLIES 15
Sridhar Bhaskarla
Honored Contributor

Re: Is it possible to mask the physical hostname?

Hi,

I am not a DBA but we have many implementations of oracle database in serviceguard packages and this concern was never raised by our DBAs.

They basically configure everything like listeners etc., over the virtual Name/IP and the package will take care of moving the virtual IP wherever it runs. For ex., our listeners run on the floating IP rather than the stationary IP.

gethostname() gets the information that was already setby sethostname() during the startup or later. Using sethostname() later means changing the hostname of the system. So, I don't see how you can do it.

If this is for the script, then you can verify if the floating IP/name is available on the server by using a 'netstat -i|n" command.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: Is it possible to mask the physical hostname?

This sounds extremely dangerous to me. You could, of course, put a hostname "NEWHOST" command in the package startup but the MC/SG commands expect that node names remain fixed. Consider the meaning of cmrunpkg -n mynode mypackage when suddenly mynode nolonger exists because sethostname() has been called. Moreover, this would be of very limited value in that it could only be done for one package. I've never seen an instance where this mattered; after all, the whole purpose of MC/SG is to enable the package to run on any properly configured and enabled node in the cluster.
If it ain't broke, I can fix that.
Michael T. Boduch
Occasional Advisor

Re: Is it possible to mask the physical hostname?

The issue arises when the Oracle 11i Applications are added to the mix. Their concurrent processors obtain the name of the host from either 1) the O.S. Directly or 2) from the database v$instance view which, in turn, has been obtained from the O.S.

The concurrent processors / apps listener uses that hostname to construct names for networking operations and this is where the problem arises since I want a name constructed that will resolve to the virtual IP/DNS name but I'm getting names that map to the physical nodes. This wouldn't be a problem except that when a failover from the primary to the secondary node occurs the connection name cached on the Apache / Java tier is invalidated and Apache must be bounced.
Michael T. Boduch
Occasional Advisor

Re: Is it possible to mask the physical hostname?

A little more information: Oracle documents a procedure for what they call "Hostname Interpositioning" whereby an .sl file is compiled containing a replacement for the standard gethostname library function and this library is named in the LD_PRELOAD shell variable. The idea, apparently, is to have the dynamic linker route calls to this function which returns the hostname based on the LHOSTNAME shell variable. This was from an Oracle document on cold failover clusters for their iAS Application Server, not their database. I tried it on my test HPUX 11i box and it didn't seem to have any impact as far as the database was concerned. So I'm looking for ideas along that line. Not so much to change the hostname system-wide, but more for just a shell session and any program that runs in / from it.
Satish Kumar_5
Regular Advisor

Re: Is it possible to mask the physical hostname?

Hi Michael,

I am facing a similar problem as urs and can u pls tell me what u did finaly to get it working.

thanks in advance.
Satish
Mohanasundaram_1
Honored Contributor

Re: Is it possible to mask the physical hostname?

Hi Michael,

I had come across a similar situation for Oracle 9i. Please follow the below thread which I opened at that time.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=469278

In short, HP is aware of such a requirement. But the database/Application vendor has to handle the problems arising out of change in hostname.

As for serviceguard, The SG commands stops working on the node where hostname was modified. Not sure what other problems may come, for example - syslog, swagent etc.

So Oracle interpositioning library is the best bet. Read through that thread and make your decision.

With regards,
Mohan.
Attitude, Not aptitude, determines your altitude
Satish Kumar_5
Regular Advisor

Re: Is it possible to mask the physical hostname?

Hi Mohan,

Can u pls tell me that is it work on Oracle E-Bussiness Suit???I have oracle EBS and for databse i am using veritas cluster server.However for oracle application 11.5.9, i want to install and configure it on a virtual hostname with a virtual IP which will float along with the active node.so if u have any idea how to accomplish this. i m using hpux 11i .any suggestion is welcome.

Regs
satish
Rita C Workman
Honored Contributor

Re: Is it possible to mask the physical hostname?

Well Michael,

Virtual IP...haven't done that. Virtual hostname - yup done that.

For our failover locally or to our other site we rely strictly on the package name for resolution. Our tnsnames, resolves to the packages name..everything that must resolves to pkg name. And the package name is the same..on the local cluster or the remote cluster !
It makes for (IMHO) a cleaner failover.

We ran into a problem when they went with (yuck..!) Oracle Financials, which does not support failover between nodes. But we discovered a little known and even less used option for this version of Oracle (which I think is 10), and that is 'virtual hostname'.
We set the virtual hostname the same as the package name, and installed the software using that. And voila....contrary to what the Oracle DBA touted couldn't be done...it fails over - neat and clean.

Rgrds,
Rita
Satish Kumar_5
Regular Advisor

Re: Is it possible to mask the physical hostname?

Hi Rita,

you are talking about which oracle application or oracle database??oracle application is altogether a diffirent product.it uses real hostname for some internal processes. is anyone have any idea how to work around it.i have oracle application 11.5.9.

Regs
TwoProc
Honored Contributor

Re: Is it possible to mask the physical hostname?

Re: the database server side for Oracle Apps 11i with Service Guard. I fixed this very problem quite easily by putting in the command "hostname server_name" before I brought the package up which hosts Oracle. Voila, done!
So, when server b does it's service guard thing for server a, I just use the "hostname" command in the package to change the hostname (temporarily to "a"). Simple, easy, works like a charm.
We are the people our parents warned us about --Jimmy Buffett

Re: Is it possible to mask the physical hostname?

As indicated, the database side shouldn't be a problem - for the Application side, I'm sure Oracle provide a replacement for some of their shared libraries which ensures that the application server resolves hosts to the virtual IP instead of the actual host - a search of oracle metalink with keywords 'serviceguard applications 11i' should turn up the cold failover cookbook which explains how to do this...

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Satish Kumar_5
Regular Advisor

Re: Is it possible to mask the physical hostname?

Hi John and Duncan,

Thanks a lot for ur time.i tried chaging hostname by command "hostname test" but even after this concurrent manager picks the hostname from "uname -n" which always come out with original hostname instead of "test".the oracle host interpositioning libraries are for infrastructure only.will it work with oracle EBS???its ver is oracle application 11.5.9.this is really turning out to be a tough task.if any one can help i will be bery grateful.

regs

Re: Is it possible to mask the physical hostname?

Mmmm - maybe we need to come at this from a different direction - exactly why do you want to implement cold failover for the application server? Normally these components are load balanced across multiple hosts...

Duncan

I am an HPE Employee
Accept or Kudo
Satish Kumar_5
Regular Advisor

Re: Is it possible to mask the physical hostname?

Hi Duncan,

We already have done a veritas cluster for Database.now i want to use the same cluster nodes to run oracle application also.like i have server A and B for DB cluster.i want to run oracle application from server A.but in case of failure i want to run the same application from Server B. as veritas will faliover the DB to B, i will also add a script which will start the oracle apps on server B.for this i want to configure and run oracle application on a virtual hostname and ip which will float with the active cluster node.if you need any further clarification pls let me know. we cant use oracle RAC as this dont work on file system and our manager dont want a raw filesystem.

Regs

Re: Is it possible to mask the physical hostname?

Satish,

I'm not talking about Oracle RAC - the applications side of the database will do load balancing simply by running on both nodes at once - this functions in a similar way to load balancing on web farms - that is the requests are routed to one of the actual appliction servers and they both run all the ame services - I'm fairly sure the EBS has everything built in to do this, and this is how it is normally deployed. You can still operate a cold failover database on the same systems in this configuration.

HTH

Duncan

I am an HPE Employee
Accept or Kudo