APM EM has the exception java.net.UnknownHostException: Hostname: localhost
search cancel

APM EM has the exception java.net.UnknownHostException: Hostname: localhost

book

Article ID: 36456

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE

Issue/Introduction

In the EM log the below exception is reported: java.net.UnknownHostException: Hostname: localhost

[ERROR] [Thread-x] [Manager.com.timestock.tess.services.initialization.RunInitializers] Exception in bean initializer; some features won't work 
java.util.concurrent.ExecutionException: com.timestock.common.exceptions.TsRuntimeException: java.net.UnknownHostException: Hostname: localhost
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at com.timestock.tess.services.initialization.RunInitializers$RunInitializeMethods.run(RunInitializers.java:111)
Caused by: com.timestock.common.exceptions.TsRuntimeException: java.net.UnknownHostException: Hostname: localhost
at com.timestock.tess.services.service.ServicesManager.initialize(ServicesManager.java:130)
at com.timestock.tess.services.initialization.RunInitializers$IntializeWrapper.call(RunInitializers.java:87)
at com.timestock.tess.services.initialization.RunInitializers$IntializeWrapper.call(RunInitializers.java:1)
at com.timestock.tess.util.ThreadPool$ConcurrentCallableTask.call(ThreadPool.java:218)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.net.UnknownHostException: Hostname: localhost
at com.timestock.tess.util.net.IpUtils.getIPAddress(IpUtils.java:58)
at com.timestock.tess.services.service.ServicesManager.registerTessEntity(ServicesManager.java:468)
at com.timestock.tess.services.service.ServicesManager.initialize(ServicesManager.java:105)
... 8 more


Environment

  • APM 10.x

Cause

  • This issue will occur when the EM cannot resolve a hostname.

Resolution

1) Check your DNS settings are correct

2) Check the /etc/hosts (there is a possibility that the hosts file has the incorrect name resolution)