You are on page 1of 2

Tuesday, October 18, 2011 1:02 AM

Disabling DNS Caching for Weblogic Server JVM


Share Weblogic Server doesn't cache any DNS. Rather, it's the Java implementation that caches the DNS. So when a Weblogic domain is restarted, each node in the domain caches the DNS with IP Address of Admin/Managed node so any subsequent operation will use the old settings even if the real settings have changed. To reset everything, you have to restart the Admin/Managed node since the default JVM setting is to cache forever. This post is very useful in an Organization where the Application Servers move consistently and configuration of DNS gets changed like IP Address. Would it be possible to control this behavior in the Weblogic Server configuration? There are 4 properties that can be used to override the default behaviour. networkaddress.cache.ttl (default: -1) Specified in java.security to indicate the caching policy for successful name lookups from the name service. The value is specified as as integer to indicate the number of seconds to cache the successful lookup. A value of -1 indicates "cache forever". networkaddress.cache.negative.ttl (default: 10) Specified in java.security to indicate the caching policy for un-successful name lookups from the name service. The value is specified as as integer to indicate the number of seconds to cache the failure for un-successful lookups. A value of 0 indicates "never cache". A value of -1 indicates "cache forever". sun.net.inetaddr.ttl This is a sun private system property which corresponds to networkaddress.cache.ttl. It takes the same value and has the same meaning, but can be set as a command-line option. However, the preferred way is to use the security property mentioned above. sun.net.inetaddr.negative.ttl This is a sun private system property which corresponds to networkaddress.cache.negative.ttl. It takes the same value and has the same meaning, but can be set as a command-line option. However, the preferred way is to use the security property mentioned above. You can disable DNS caching by adding -Dsun.net.inetaddr.ttl=0 as JAVA_OPTION to your Server start-up script Note: You can't set the value of networkaddress.cache.ttl as a JAVA_OPTION. You can set the required value in the java.security file located in %JRE%\lib \security
Pasted from <http://weblogicissuesolutions.blogspot.com/2011/04/disabling-dns-caching-for-weblogic.html>

Temp Page 1

Tuesday, October 18, 2011 1:09 AM

Batch Script to connect JConsole to a WLS 10.3.x


Share

Batch script anyone can use to connect JConsole to a WLS 10.3.x instance. But make sure to edit it according to your specifications.
@setlocal rem runtime_url=service:jmx:rmi:///jndi/iiop://localhost:7001/weblogic.management. mbeanservers.runtime set domain_url=service:jmx:rmi:///jndi/iiop://localhost:7001/weblogic.management.m beanservers.domainruntime set JAVA_HOME=C:\oracle\Middleware\jdk160_14_R27.6.5-32 set WLS_HOME=C:\oracle\Middleware\wlserver_10.3\server set JCONSOLE_CLASSPATH set JCONSOLE_CLASSPATH=%JCONSOLE_CLASSPATH%;%JAVA_HOME%\lib \jconsole.jar set JCONSOLE_CLASSPATH=%JCONSOLE_CLASSPATH%;%JAVA_HOME%\lib \tools.jar set WLS_CLASSPATH= set WLS_CLASSPATH=%WLS_CLASSPATH%;%WLS_HOME%\lib\wljmxclient.jar set CLASSPATH=%JCONSOLE_CLASSPATH%;%WLS_CLASSPATH% set PROPS= set PROPS=%PROPS% -JDjmx.remote.proto.provider.pkgs=weblogic.management.remote set PROPS=%PROPS% -J-Djava.class.path=%CLASSPATH% jconsole %PROPS% @endlocal Posted by Sunil Nandargi at 4:31 PM

Labels: JConsole, Weblogic


Pasted from <http://weblogicissuesolutions.blogspot.com/2010/09/wls-and-jconsole_21.html>

Temp Page 2

You might also like