Operating System - HP-UX
1827452 Members
4039 Online
109965 Solutions
New Discussion

Re: same port on service guard env

 
cheers4asc
Occasional Contributor

same port on service guard env

In HP service guard env if i have 2 logical host are on one machine therotically i should be able to start same port no for example 14000 on logical host A as well as logiical host B . but practically its giving me error saying port is already in use . any idea ?

Cheers4asc
10 REPLIES 10
Brian Crabtree
Honored Contributor

Re: same port on service guard env

Have you defined two different IP addresses for each hostname that you want to use?

ie: logical hostA 192.168.1.1 and logical hostb 192.168.1.2.

Thanks,

Brian
cheers4asc
Occasional Contributor

Re: same port on service guard env

yes obviously .
I have different IP address.
Sridhar Bhaskarla
Honored Contributor

Re: same port on service guard env

Hi,

Just because you have two IP addresses does not mean you have two hosts. You can connect to the same port through any of these IP addresses.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Christopher Caldwell
Honored Contributor

Re: same port on service guard env

The answer is application specific. If you use an application that binds to a port using INADDR_ANY, the app will bind to a given port on every available IP.

Most modern application let you specify an address [and port] to bind to. Generally there can be more than one IP and perhaps differening ports.

You can see the behavior when you issue a command like
$ netstat -an | grep .yourport

if you see something like

tcp 0 0 *.21 *.* LISTEN

this says I'm listening on every available IP to requests on port 21.


OTOH, if you see something like this

tcp 0 0 A.B.C.D.443 *.* LISTEN

This says I'm listening on IP A.B.C.D to requests on port 443.
melvyn burnard
Honored Contributor

Re: same port on service guard env

I think Christopher has your answer. Normally, when an application connects to a relocatable IP, it is given the local stationary IP as it's "home" address. This would result in the port appearing to be already in use, as you have seen. You would need to get the application in hte packages to bind to the relocatable address to do what you are after.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
cheers4asc
Occasional Contributor

Re: same port on service guard env

Thanks guys !!!!
I am trying to start the application ( visibroker osagent) and its not allowing me to start as 12:13:14:167:80802 . I guess I will have to further investigate from application point of view ...... any sugguestions are most welcome .
Stuart Abramson_2
Honored Contributor

Re: same port on service guard env

Do you WANT to use the same port on both packages?

We TRY to seperate/distinguish our ports in an Oracle landscape so that we don't get any confusion. For example we could use the same listener port on multiple servers in the landscape, but we deliberately use a single, different, unique port with every Oracle instance on every server in the shop.

That's a best practice, I think. Use different, unique ports for every specific application instance on every different server in the shop.

Michael Steele_2
Honored Contributor

Re: same port on service guard env

Ports are open files so use the lsof command for further investigation:

lsof -i tcp:14000

-or-

lsof -i udp:14000

RAH!
Support Fatherhood - Stop Family Law
U.SivaKumar_2
Honored Contributor

Re: same port on service guard env

Hi,

When you run the app in this mode what is the error ?

12:13:14:167:80802


regards,

U.SivaKumar
Innovations are made when conventions are broken

Re: same port on service guard env

Hi,

If I remember visibroker (haven't used it in years), then you can control what port it runs on by setting the env variable OSAGENT_PORT before it starts. I also seem to recall that osagent listens on *all* IP addresses on a node - that is as Chris said, it used INADDR_ANY when it binds to the port.

HTH

Duncan

I am an HPE Employee
Accept or Kudo