Author |
Message
|
ydsk |
Posted: Thu Mar 23, 2006 3:22 pm Post subject: IP address of the broker box in v6 |
|
|
Chevalier
Joined: 23 May 2005 Posts: 410
|
Hi,
Can we get the IP address of a broker box using ESQL in v6 ? I know we can get BrokerName but not sure if we can get the IP address.
If yes, can someone please post some sample ESQL code ?
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Mar 23, 2006 4:11 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What a horrible idea.
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ak04897_.htm
I imagine it's horribly horribly difficult to get the ip address of a machine from java code - so consequently it's probably horrendously difficult to use a java compute node to do this.
Really though, making any decisions based on the IP Address that broker is running on is a really bad idea.
If the broker name is insufficient, then use any of the other thousand ways to store and maintain configuration data that Broker v6 provides. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Deeko |
Posted: Fri Mar 24, 2006 1:58 am Post subject: |
|
|
 Acolyte
Joined: 16 May 2001 Posts: 72 Location: Edinburgh, UK
|
It's actually quite easy to get the IP address from JAVA. We have a plugin that retrieves it (and hostname) - we only use it for logging purposes though.
import java.net.InetAddress;
---
String ipAddress = InetAddress.getLocalHost().getHostAddress(); |
|
Back to top |
|
 |
mgk |
Posted: Fri Mar 24, 2006 2:30 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Another thing to consider is that if the machine has more than one network card, then the machine will have more than one IP address!.
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
Deeko |
Posted: Fri Mar 24, 2006 2:42 am Post subject: |
|
|
 Acolyte
Joined: 16 May 2001 Posts: 72 Location: Edinburgh, UK
|
Very true!  |
|
Back to top |
|
 |
ydsk |
Posted: Mon Mar 27, 2006 1:41 pm Post subject: |
|
|
Chevalier
Joined: 23 May 2005 Posts: 410
|
Thank you all for your responses.
Jeff, the requirement is to log an event record ( or audit record) for every message that's processed by a msgflow. Veritas manages failover of brokers/qmgrs from one box to another ( from one IP address to another) when something goes wrong and at the end of the day we need to be able to say what went right/wrong on a box by looking at the event records.
I am sure this is a valid requirement and I know there are several customers who have the same requirement.
We don't have multiple IP addresses per box. So, that rules out multiple IP addresses issue.
Thanks.
ydsk. |
|
Back to top |
|
 |
ydsk |
Posted: Mon Mar 27, 2006 1:43 pm Post subject: |
|
|
Chevalier
Joined: 23 May 2005 Posts: 410
|
FYI...of course we are currently getting the IP address using java in our msgflows but I was wondering if this has been provided for in v6 using ESQL.
Looks like it is not. So, we will have to live with java.
Thanks.
ydsk. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Mar 27, 2006 1:47 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
That is a reasonably valid requirement.
But I'm a little confused. I'd thought that almost all failover configurations did not change the effective IP address of the queue manager. Otherwise, channels would have to be switched all over the place.
So I guess I don't understand how you would actually get this information. Unless the machine has two IP addresses - one that is the virtual IP address being used by the MQ Listener.
And as I sarcastically mentioned, and DerekPaton confirmed - it is very easy to get the IP address of a machine using Java, and so it's very easy to get from a java compute node or a java procedure or a java plug-in. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
vennela |
Posted: Mon Mar 27, 2006 2:09 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
So I guess I don't understand how you would actually get this information. Unless the machine has two IP addresses - one that is the virtual IP address being used by the MQ Listener. |
Jeff:
Actually there will be two IP addresses for nodes in HA
For example if nodea and nodeb are two nodes in HA, then IPs would look like
ipinternal1
ipinternal2
ipexternal12
On all the connames and for anything outside you give ipexternal12
HA will take care of routing to either ipinternal1 or ipinternal2 based on where the cluster package is running.
Getting that info using regular unix commands is a trivial task. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Mar 27, 2006 2:12 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
vennela wrote: |
Actually there will be two IP addresses for nodes in HA |
I agree, but
ydsk wrote: |
We don't have multiple IP addresses per box. |
So... _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Deeko |
Posted: Wed Mar 29, 2006 11:16 am Post subject: |
|
|
 Acolyte
Joined: 16 May 2001 Posts: 72 Location: Edinburgh, UK
|
jefflowrey wrote: |
And as I sarcastically mentioned, and DerekPaton confirmed - it is very easy to get the IP address of a machine using Java, and so it's very easy to get from a java compute node or a java procedure or a java plug-in. |
Oh dear - I didn't realise you were being sarcastic!
Oh course when I reread your post it wasn't at all obvious - not a bit!  |
|
Back to top |
|
 |
|