Problems running grails in a remote environment

I have a server named "named" and it seems Grails cannot find localhost.

Running Grails application..
2011-01-12 20:45:14,046 [main] ERROR ehcache.Cache  - Unable to set localhost. This prevents creation of a GUID. Cause was: zaftra: zaftra
java.net.UnknownHostException: zaftra: zaftra
    at java.net.InetAddress.getLocalHost(InetAddress.java:1426)
    at net.sf.ehcache.Cache.<clinit>(Cache.java:143)
    at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:463)
    at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:369)
    at net.sf.ehcache.CacheManager.configure(CacheManager.java:445)
    at net.sf.ehcache.CacheManager.init(CacheManager.java:302)
    at net.sf.ehcache.CacheManager.<init>(CacheManager.java:260)
    at net.sf.ehcache.hibernate.EhCacheProvider.start(EhCacheProvider.java:128)

Content /etc/hosts(as shown):

127.0.0.1       localhost localhost.localdomain zaftra
::1       localhost localhost.localdomain zaftra
+3
source share
2 answers

I am going to suggest that you are using some kind of linux flavor. If so, you can look at your /etc/hostsfile - is there an entry for localhost? I expect to see something like:

127.0.0.1     localhost zaftra
::1           localhost

I did some Googling - there is a similar question on SuperUser - the suggestion was to add the following to /etc/resolv.conf:

search (domainname) // in your case, search (zaftra)

You can also try:

search zaftra
// or
search zaftra.example.com // if there a more fully-qualified domain name you can use

(This is based on the entry I received resolv.confon one of my Ubuntu machines).

+7
source

AWS ( amazon linux) , /etc/hosts:

102.130.27.257     LAMP-LIVE01-N123     www.mydomain.com

:

{internal IP}     {instance name}     {domain for grails app}

httpd grails (tomcat)

0

Source: https://habr.com/ru/post/1785067/


All Articles