Re: Not able to run after fresh installation on AWS EC2 - Error Unable to set localhost.

326 views
Skip to first unread message
Message has been deleted

kumar....@gmail.com

unread,
Oct 22, 2016, 2:35:19 PM10/22/16
to Kill Bill users mailing-list, kumar....@gmail.com
On Sunday, October 23, 2016 at 12:03:05 AM UTC+5:30, kumar....@gmail.com wrote:
> Hi,
> I have used AWS EC2 to install killbill. The EC2 instance has two IP address:
>
> Private IP : 10.0.0.131
> Public IP: 54.146.163.111
>
> The installation was successful. But when I try to run, I get the error that it is unable to set the local host on private IP. I am posting the error message below. I'll appreciate if you can give mt any clue.
>
>
> 2016-10-22T17:19:58,371+0000 lvl='ERROR', log='Cache', th='localhost-startStop-1', xff='', rId='', aRId='', tRId='', Unable to set localhost. This prevents creation of a GUID. Cause was: ip-10-0-0-131: ip-10-0-0-131: Name or service not known
> java.net.UnknownHostException: ip-10-0-0-131: ip-10-0-0-131: Name or service not known
> at java.net.InetAddress.getLocalHost(InetAddress.java:1496)
> at net.sf.ehcache.Cache.<clinit>(Cache.java:222)
> at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:305)
> at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:223)
> at net.sf.ehcache.CacheManager.configure(CacheManager.java:796)
> at net.sf.ehcache.CacheManager.doInit(CacheManager.java:471)
> at net.sf.ehcache.CacheManager.init(CacheManager.java:395)
> at net.sf.ehcache.CacheManager.<init>(CacheManager.java:270)
> at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1116)
> at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:1060)
> at net.sf.ehcache.CacheManager.create(CacheManager.java:1035)
> at org.killbill.billing.util.cache.EhCacheCacheManagerProvider.get(EhCacheCacheManagerProvider.java:91)
> at org.killbill.billing.util.cache.EhCacheCacheManagerProvider.get(EhCacheCacheManagerProvider.java:43)
> at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:55)
> at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
> at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
> at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
> at com.google.inject.Scopes$1$1.get(Scopes.java:65)
> at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
> at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
> at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
> at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
> at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
> at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:53)
> at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
> at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)
> at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
> at com.google.inject.Scopes$1$1.get(Scopes.java:65)
> at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
> at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
> at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
> at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:84)
> at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
> at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:54)
>
> Regards
>
> Prakash Kumar

kumar....@gmail.com

unread,
Oct 23, 2016, 1:53:24 AM10/23/16
to Kill Bill users mailing-list, kumar....@gmail.com

I managed to fix that. It was because the way AWS sets the 'hostname' for EC2 instances.

After changing the hostname and associating 127.0.0.1 as IP address, it started working. One follow the instructions here:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-hostname.html

Reply all
Reply to author
Forward
0 new messages