Issue

A Semarchy xDI Runtime was previously able to connect to a database server using its hostname. After the database server IP address changed, the Runtime can no longer connect and reports hostname resolution or connection errors.


Cause

The Java Virtual Machine used by the xDI Runtime caches DNS resolutions by default. When a server IP address changes, the Runtime may continue using the previously cached address until the cache expires or the Runtime is restarted.


Solution

Configure the Runtime JVM to disable or reduce DNS caching.

  1. Add the following JVM option to the Runtime startup configuration:
-Dsun.net.inetaddr.ttl=0

For current xDI versions, this option can be added through the Runtime JVM options, for example:

XDI_RUNTIME_OPTS="-Dsun.net.inetaddr.ttl=0"

or

XDI_COMMAND_OPTS="-Dsun.net.inetaddr.ttl=0"
  1. Alternatively, configure the Java security policy by updating the JVM's java.security file:
networkaddress.cache.ttl=0
  1. Restart the xDI Runtime after applying the change.

Verification

  • Verify that the database hostname resolves to the new IP address from the Runtime server.
  • Test the connection from the metadata or rerun the process.
  • Review Runtime logs to confirm the new address is being used.

Tip: In environments where database servers are frequently moved, load-balanced, or updated through DNS changes, configuring a low DNS cache TTL can prevent connectivity issues after infrastructure changes.

Information: If the Runtime still resolves the old address after applying the JVM setting, verify that DNS caching is not occurring at the operating system, container, or network infrastructure level.