ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMB still sftp to old IP after /etc/hosts changed

Post new topic  Reply to topic
 WMB still sftp to old IP after /etc/hosts changed « View previous topic :: View next topic » 
Author Message
heng005
PostPosted: Wed Sep 05, 2012 11:42 pm    Post subject: WMB still sftp to old IP after /etc/hosts changed Reply with quote

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
View user's profile Send private message
smdavies99
PostPosted: Thu Sep 06, 2012 12:55 am    Post subject: Reply with quote

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
View user's profile Send private message
heng005
PostPosted: Fri Sep 07, 2012 1:12 am    Post subject: Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Fri Sep 07, 2012 1:24 am    Post subject: Reply with quote

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
View user's profile Send private message
heng005
PostPosted: Fri Sep 07, 2012 1:28 am    Post subject: Reply with quote

Novice

Joined: 19 Sep 2011
Posts: 10

Thank you very much zpat
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » WMB still sftp to old IP after /etc/hosts changed
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.