|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
WMB still sftp to old IP after /etc/hosts changed |
« View previous topic :: View next topic » |
Author |
Message
|
heng005 |
Posted: Wed Sep 05, 2012 11:42 pm Post subject: WMB still sftp to old IP after /etc/hosts changed |
|
|
Novice
Joined: 19 Sep 2011 Posts: 10
|
Hi,
I am using WMB7. I develop some flows to transfer files using sftp but WMB don't work as i expected.
I set server and port parameter of a file output node to testServer:22
and fix my /etc/hosts to
testServer 10.0.0.10
this configuration work well, all files are transfer to 10.0.0.10
but when i change my hosts to 10.0.0.20
all files are still send to 10.0.0.10
it seem that wmb has cached ip address for each domain it has seen
so i try to proof my assumption by tcpdump port 53 which is used for lookup domain name.
i've found that wmb lookup domain name only the first time the domain name is used.
Do you know why wmb don't lookup domain name everytime?
and can i configure it to lookup every time?
Thanks |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Sep 06, 2012 12:55 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Lets change your question around a bit
How often is the actual IP Address going to change in production? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
heng005 |
Posted: Fri Sep 07, 2012 1:12 am Post subject: |
|
|
Novice
Joined: 19 Sep 2011 Posts: 10
|
Hi smdavies99,
it rarely change but it may be used in crisis situation.
For example, i can change the destination ip if destination server fail and have to send a file to back up server.
what should i do if this kind of crisis happen? |
|
Back to top |
|
 |
zpat |
Posted: Fri Sep 07, 2012 1:24 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
This is the default indefinite JVM "security" caching of the DNS resolutions.
Not in fact WMB code doing this, but the JRE/JVM, it affects ALL java applications.
You can disable or reduce the TTL time in the JVM security file or use this environment variable in the broker .profile (and restart broker to activate it).
export MQSIJVERBOSE=-Dsun.net.inetaddr.ttl=300
The following IBM document explains about Java DNS/IP caching http://www-01.ibm.com/support/docview.wss?uid=swg1PK20100
To fix it you can edit the java.security file in the relevant JRE lib/security directory and update this line from
networkaddress.cache.ttl=-1 (it may be commented out, as -1 is the default and means never expire the IP value).
to
networkaddress.cache.ttl=300
(I am suggesting 300 seconds rather than 0 to retain some caching in case of any performance benefits).
Last edited by zpat on Fri Sep 07, 2012 1:28 am; edited 1 time in total |
|
Back to top |
|
 |
heng005 |
Posted: Fri Sep 07, 2012 1:28 am Post subject: |
|
|
Novice
Joined: 19 Sep 2011 Posts: 10
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|