title: UnknownHostException: Name or service not known with CAS
body: <p>I am trying to deploy a cas on a remote machine and I get the following error:</p>
  
  <blockquote>
    <p>[org.jasig.cas.util.http.SimpleHttpClientFactoryBean] - fooHostName:
    fooHostName: Name or service not known java.net.UnknownHostException:
    fooHostName: fooHostName: Name or service not known   at
    java.net.InetAddress.getLocalHost(InetAddress.java:1473)  at
    org.jasig.cas.util.http.SimpleHttpClientFactoryBean.buildHttpClient(SimpleHttpClientFactoryBean.java:202)
      at
    org.jasig.cas.util.http.SimpleHttpClientFactoryBean.getObject(SimpleHttpClientFactoryBean.java:164)
      at
    org.jasig.cas.util.http.SimpleHttpClientFactoryBean.getObject(SimpleHttpClientFactoryBean.java:1)
      at
    org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
      //....  at
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1457)
      at
    org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745) Caused by:
    java.net.UnknownHostException: fooHostName: Name or service not known
      at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)   at
    java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)    at
    java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
      at java.net.InetAddress.getLocalHost(InetAddress.java:1469)     ... 115
    more</p>
  </blockquote>
  
  <p>I performed the problem-free deployment on the premises with a simple XAMPP (MySql and Tomcat). On my remote machine I am also using a Tomcat 8.5.</p>
  
  <p>What can be the reason for the error?</p>