{"action":"created","issue":{"url":"https://api.github.com/repos/openhab/openhab/issues/1613","labels_url":"https://api.github.com/repos/openhab/openhab/issues/1613/labels{/name}","comments_url":"https://api.github.com/repos/openhab/openhab/issues/1613/comments","events_url":"https://api.github.com/repos/openhab/openhab/issues/1613/events","html_url":"https://github.com/openhab/openhab/issues/1613","id":47157054,"number":1613,"title":"Failed to get local hostname on ubilinux","user":{"login":"shb256","id":9448569,"avatar_url":"https://avatars.githubusercontent.com/u/9448569?v=3","gravatar_id":"","url":"https://api.github.com/users/shb256","html_url":"https://github.com/shb256","followers_url":"https://api.github.com/users/shb256/followers","following_url":"https://api.github.com/users/shb256/following{/other_user}","gists_url":"https://api.github.com/users/shb256/gists{/gist_id}","starred_url":"https://api.github.com/users/shb256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shb256/subscriptions","organizations_url":"https://api.github.com/users/shb256/orgs","repos_url":"https://api.github.com/users/shb256/repos","events_url":"https://api.github.com/users/shb256/events{/privacy}","received_events_url":"https://api.github.com/users/shb256/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openhab/openhab/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/openhab/openhab/labels/critical","name":"critical","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/openhab/openhab/milestones/13","html_url":"https://github.com/openhab/openhab/milestones/1.8.1","labels_url":"https://api.github.com/repos/openhab/openhab/milestones/13/labels","id":1495627,"number":13,"title":"1.8.1","description":"","creator":{"login":"teichsta","id":2108636,"avatar_url":"https://avatars.githubusercontent.com/u/2108636?v=3","gravatar_id":"","url":"https://api.github.com/users/teichsta","html_url":"https://github.com/teichsta","followers_url":"https://api.github.com/users/teichsta/followers","following_url":"https://api.github.com/users/teichsta/following{/other_user}","gists_url":"https://api.github.com/users/teichsta/gists{/gist_id}","starred_url":"https://api.github.com/users/teichsta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teichsta/subscriptions","organizations_url":"https://api.github.com/users/teichsta/orgs","repos_url":"https://api.github.com/users/teichsta/repos","events_url":"https://api.github.com/users/teichsta/events{/privacy}","received_events_url":"https://api.github.com/users/teichsta/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":16,"state":"open","created_at":"2016-01-10T18:57:49Z","updated_at":"2016-01-30T15:30:29Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2014-10-29T14:50:01Z","updated_at":"2016-01-30T23:43:09Z","closed_at":null,"body":"hi guys, i am trying to use openhab on the intel edison. i have installed java 8\r\non this:  http://www.emutexlabs.com/?option=com_content&view=article&id=201&Itemid=270\r\n\r\nroot@ubilinux:~/openHAB# java -version\r\njava version \"1.8.0_20\"\r\nJava(TM) SE Runtime Environment (build 1.8.0_20-b26)\r\nJava HotSpot(TM) Client VM (build 25.20-b23, mixed mode)\r\n\r\nit is a standard openhab without any changes. just installed and copyed openhab.cfg\r\nthis is the error\r\n\r\n14:36:56,720 |-ERROR in ch.qos.logback.core.util.ContextUtil@1ba8d24 - Failed to get local hostname java.net.UnknownHostException: ubilinux: ubilinux: unknown error\r\n\tat java.net.UnknownHostException: ubilinux: ubilinux: unknown error\r\n\tat \tat java.net.InetAddress.getLocalHost(InetAddress.java:1484)\r\n\tat \tat ch.qos.logback.core.util.ContextUtil.getLocalHostName(ContextUtil.java:32)\r\n\tat \tat ch.qos.logback.core.util.ContextUtil.addHostNameAsProperty(ContextUtil.java:41)\r\n\tat \tat ch.qos.logback.classic.joran.action.ConfigurationAction.begin(ConfigurationAction.java:56)\r\n\tat \tat ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:276)\r\n\tat \tat ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:148)\r\n\tat \tat ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:130)\r\n\tat \tat ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)\r\n\tat \tat ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:157)\r\n\tat \tat ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:143)\r\n\tat \tat ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:106)\r\n\tat \tat ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:56)\r\n\tat \tat ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)\r\n\tat \tat ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148)\r\n\tat \tat org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)\r\n\tat \tat org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:54)\r\n\tat \tat org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)\r\n\tat \tat org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)\r\n\tat \tat org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)\r\n\tat \tat org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)\r\n\tat \tat org.eclipse.jetty.util.log.Slf4jLog.<init>(Slf4jLog.java:33)\r\n\tat \tat org.eclipse.jetty.util.log.Slf4jLog.<init>(Slf4jLog.java:27)\r\n\tat \tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat \tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\r\n\tat \tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat \tat java.lang.reflect.Constructor.newInstance(Constructor.java:408)\r\n\tat \tat java.lang.Class.newInstance(Class.java:433)\r\n\tat \tat org.eclipse.jetty.util.log.Log.initialized(Log.java:156)\r\n\tat \tat org.eclipse.jetty.util.log.Log.getLogger(Log.java:430)\r\n\tat \tat org.eclipse.jetty.osgi.boot.internal.serverfactory.JettyServerServiceTracker.<clinit>(JettyServerServiceTracker.java:34)\r\n\tat \tat org.eclipse.jetty.osgi.boot.JettyBootstrapActivator.start(JettyBootstrapActivator.java:100)\r\n\tat \tat org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)\r\n\tat \tat java.security.AccessController.doPrivileged(Native Method)\r\n\tat \tat org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)\r\n\tat \tat org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)\r\n\tat \tat org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)\r\n\tat \tat org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)\r\n\tat \tat org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)\r\n\tat \tat org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)\r\n\tat \tat org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)\r\n\tat \tat org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)\r\n\tat \tat org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)\r\n\tat \tat org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)\r\n\tat \tat org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)\r\n\tat \tat org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)\r\n\tat \tat org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)\r\nCaused by: java.net.UnknownHostException: ubilinux: unknown error\r\n\tat \tat java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)\r\n\tat \tat java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:907)\r\n\tat \tat java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1302)\r\n\tat \tat java.net.InetAddress.getLocalHost(InetAddress.java:1479)\r\n\tat \t... 45 common frames omitted\r\n"},"comment":{"url":"https://api.github.com/repos/openhab/openhab/issues/comments/177339113","html_url":"https://github.com/openhab/openhab/issues/1613#issuecomment-177339113","issue_url":"https://api.github.com/repos/openhab/openhab/issues/1613","id":177339113,"user":{"login":"mrguessed","id":2791088,"avatar_url":"https://avatars.githubusercontent.com/u/2791088?v=3","gravatar_id":"","url":"https://api.github.com/users/mrguessed","html_url":"https://github.com/mrguessed","followers_url":"https://api.github.com/users/mrguessed/followers","following_url":"https://api.github.com/users/mrguessed/following{/other_user}","gists_url":"https://api.github.com/users/mrguessed/gists{/gist_id}","starred_url":"https://api.github.com/users/mrguessed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrguessed/subscriptions","organizations_url":"https://api.github.com/users/mrguessed/orgs","repos_url":"https://api.github.com/users/mrguessed/repos","events_url":"https://api.github.com/users/mrguessed/events{/privacy}","received_events_url":"https://api.github.com/users/mrguessed/received_events","type":"User","site_admin":false},"created_at":"2016-01-30T23:43:09Z","updated_at":"2016-01-30T23:43:09Z","body":"Looks like there's a work-around for this issue:\r\n* http://stackoverflow.com/questions/1881546/inetaddress-getlocalhost-throws-unknownhostexception\r\n\r\nBasically, Java is using `/etc/hosts` (even when it shouldn't) and it wants to see the hostname (`ubilinux`, in this case) resolvable through it.  Setting it to _alias_ the `localhost`/`127.0.0.1` entry, in `/etc/hosts`, should suffice.\r\n\r\n@shb256, can you confirm?"}}