How do I disable JVM hostnames?

4

An application is trying to access a remote EJB. Regardless of whether the configuration uses the servidor.empresa.com.br address or an IP to access the service, an error occurs:

weblogic.utils.NestedError: This address was valid earlier, but now we get: .
    at weblogic.rjvm.JVMID.address(JVMID.java:565)
    at weblogic.rjvm.RJVMManager.record(RJVMManager.java:153)
    at weblogic.rjvm.RJVMManager.findOrCreateInternal(RJVMManager.java:292)
    at weblogic.rjvm.RJVMManager.findOrCreateRemote(RJVMManager.java:139)
    at weblogic.rjvm.ConnectionManagerServer.handleIdentifyResponse(ConnectionManager
    Truncated. see log file for complete stacktrace
Caused By: java.net.UnknownHostException: servidor
    at java.net.InetAddress.getAllByName0(InetAddress.java:1158)
    at java.net.InetAddress.getAllByName(InetAddress.java:1084)
    at java.net.InetAddress.getAllByName(InetAddress.java:1020)
    at java.net.InetAddress.getByName(InetAddress.java:970)
    at weblogic.rjvm.JVMID.address(JVMID.java:558)
    Truncated. see log file for complete stacktrace

It seems that regardless of hostname and IP the JVM is querying DNS and for some reason is ignoring .empresa.com.br , using only the server name.

Is there any way to tell the JVM "forget DNS, just use IP!" ?

Comments:

  • An alternative proposed in some forums is to edit hosts (windows environment) by pointing servidor (without .empresa.com.br to its respective IP, but it seems to me more a gambiarra
  • JDK Version: 1.6
  • Weblogic Version: 10
asked by anonymous 13.12.2013 / 17:46

2 answers

1

Searching for the error message:

  

This address was valid earlier, but now we get ...

It is noticeable that it only occurs with those who use Weblogic in some type of specific environment, usually corporate with firewalls and proxies.

There are not many results for the error and none of those that exist point to a specific cause or solution, other than a workaround that is adding the server name without your domain to the "hosts" Operating System:

  • Windows: %SystemRoot%\system32\drivers\etc\hosts
  • Other: /etc/drivers
16.12.2013 / 17:56
2

Check two things:

Adds the hosts of the IP machine and name, and unzips the verifcation name of the server.

If it is a domain server, place it on the server: ServerName-> ServerStart-> Arguments -Dweblogic.security.SSL.ignoreHostnameVerification = true

If it is the AdminServer, it must be in the script SetDomainEnv.sh: JAVA_OPTIONS="Dweblogic.security.SSL.ignoreHostnameVerification = true" Export JAVA_OPTIONS

I hope I have helped;)

    
10.04.2015 / 21:04