Getting UnknownHostException randomly

Hi,

I recently installed YouTrack on a virtual server for doing issue tracking for a project of mine. The virtual server is hosted by Digital Ocean and is running Ubuntu server 12.04, YouTrack 5.1.2 and Nginx 1.1.19.

Every once in a while (between 10 minutes and a few hours), I get the following error in the youtrack error log:

ERROR [BaseUrlConfiguration] [request: /rest/agile/Progress-0/sprint/Unscheduled] [internal@216.211.102.203] Can't get local address
java.net.UnknownHostException: <hostname>: <hostname>

Full Stack Trace
 at java.net.InetAddress.getLocalHost(InetAddress.java:1461)
 at java.net.InetAddress.getLocalHost(InetAddress.java:1461)
 at webr.framework.url.HostToBaseUrlConfiguration.getBaseUrl(HostToBaseUrlConfiguration.java:38)
 at webr.framework.url.UrlUtil.getGlobalBaseUrl(UrlUtil.java:242)
 at webr.framework.url.UrlUtil$Url.toString(UrlUtil.java:421)
 at webr.framework.url.UrlUtil$Url.toString(UrlUtil.java:407)
 at jetbrains.youtrack.agile.common.components.CustomFieldDataModel.<init>(CustomFieldDataModel.java:35)
 at jetbrains.youtrack.agile.common.components.CustomFieldDataModel.<init>(CustomFieldDataModel.java:40)
 at jetbrains.youtrack.agile.common.components.BundledCustomFieldEditor$1.<init>(BundledCustomFieldEditor.java:20)
 at jetbrains.youtrack.agile.common.components.BundledCustomFieldEditor.getModel(BundledCustomFieldEditor.java:20)
 at jetbrains.youtrack.agile.common.components.ModelCustomFieldEditor.getEditTemplate(ModelCustomFieldEditor.java:19)
 at jetbrains.youtrack.agile.common.components.ModelCustomFieldEditor.getEditTemplate(ModelCustomFieldEditor.java:11)
 at jetbrains.youtrack.agile.common.components.StatelessCustomFieldEditor.getTemplate(StatelessCustomFieldEditor.java:28)
 at jetbrains.youtrack.agile.common.components.StatelessFieldsManager.getTemplate(StatelessFieldsManager.java:27)
 at jetbrains.youtrack.agile.sprint.ui.TaskTemplate.doRenderTask(TaskTemplate.java:114)
 at jetbrains.youtrack.agile.sprint.ui.TaskTemplate.access$000(TaskTemplate.java:30)
 at jetbrains.youtrack.agile.sprint.ui.TaskTemplate$1.render(TaskTemplate.java:232)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.render(BaseTemplate.java:125)
 at jetbrains.youtrack.agile.sprint.ui.TaskTemplate.render(TaskTemplate.java:230)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.include(BaseTemplate.java:130)
 at jetbrains.youtrack.agile.sprint.ui.TasksInColumnTemplate.doRenderTasksInColumn(TasksInColumnTemplate.java:38)
 at jetbrains.youtrack.agile.sprint.ui.TasksInColumnTemplate.access$000(TasksInColumnTemplate.java:18)
 at jetbrains.youtrack.agile.sprint.ui.TasksInColumnTemplate$1.render(TasksInColumnTemplate.java:51)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.render(BaseTemplate.java:125)
 at jetbrains.youtrack.agile.sprint.ui.TasksInColumnTemplate.render(TasksInColumnTemplate.java:49)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.include(BaseTemplate.java:130)
 at jetbrains.youtrack.agile.sprint.ui.OrphansTemplate.doRenderOrphans(OrphansTemplate.java:97)
 at jetbrains.youtrack.agile.sprint.ui.OrphansTemplate.access$000(OrphansTemplate.java:26)
 at jetbrains.youtrack.agile.sprint.ui.OrphansTemplate$1.render(OrphansTemplate.java:131)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.render(BaseTemplate.java:125)
 at jetbrains.youtrack.agile.sprint.ui.OrphansTemplate.render(OrphansTemplate.java:129)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.include(BaseTemplate.java:130)
 at jetbrains.youtrack.agile.sprint.ui.BoardTemplate.doRenderBoard(BoardTemplate.java:174)
 at jetbrains.youtrack.agile.sprint.ui.BoardTemplate.access$000(BoardTemplate.java:32)
 at jetbrains.youtrack.agile.sprint.ui.BoardTemplate$1.render(BoardTemplate.java:225)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.render(BaseTemplate.java:125)
 at jetbrains.youtrack.agile.sprint.ui.BoardTemplate.render(BoardTemplate.java:223)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.include(BaseTemplate.java:130)
 at jetbrains.youtrack.agile.sprint.ui.SprintTemplate.doRenderSprint(SprintTemplate.java:116)
 at jetbrains.youtrack.agile.sprint.ui.SprintTemplate.access$000(SprintTemplate.java:41)
 at jetbrains.youtrack.agile.sprint.ui.SprintTemplate$1.render(SprintTemplate.java:214)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.include(BaseTemplate.java:130)
 at jetbrains.youtrack.agile.sprint.ui.SprintLayoutTemplate.doRenderSprintLayout(SprintLayoutTemplate.java:82)
 at jetbrains.youtrack.agile.sprint.ui.SprintLayoutTemplate.access$000(SprintLayoutTemplate.java:29)
 at jetbrains.youtrack.agile.sprint.ui.SprintLayoutTemplate$1.render(SprintLayoutTemplate.java:93)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.include(BaseTemplate.java:130)
 at jetbrains.youtrack.agile.common.ui.AgileLayoutTemplate.doRenderAgileLayout(AgileLayoutTemplate.java:36)
 at jetbrains.youtrack.agile.common.ui.AgileLayoutTemplate.access$000(AgileLayoutTemplate.java:21)
 at jetbrains.youtrack.agile.common.ui.AgileLayoutTemplate$1.render(AgileLayoutTemplate.java:44)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.include(BaseTemplate.java:130)
 at jetbrains.youtrack.common.ui.LayoutTemplate.doRenderLayout(LayoutTemplate.java:184)
 at jetbrains.youtrack.common.ui.LayoutTemplate.access$000(LayoutTemplate.java:29)
 at jetbrains.youtrack.common.ui.LayoutTemplate$1.render(LayoutTemplate.java:205)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.render(BaseTemplate.java:125)
 at jetbrains.youtrack.common.ui.LayoutTemplate.render(LayoutTemplate.java:203)
 at jetbrains.youtrack.agile.common.ui.AgileLayoutTemplate.render(AgileLayoutTemplate.java:42)
 at jetbrains.youtrack.agile.sprint.ui.SprintLayoutTemplate.render(SprintLayoutTemplate.java:91)
 at jetbrains.youtrack.agile.sprint.ui.SprintTemplate.render(SprintTemplate.java:212)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.render(BaseTemplate.java:118)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate.render(BaseTemplate.java:103)
 at jetbrains.mps.webr.stateless.template.runtime.BaseTemplate$1.write(BaseTemplate.java:65)
 at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
 at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
 at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
 at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1451)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)
 at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)
 at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
 at jetbrains.mps.webr.rpc.rest.runtime.DefaultRestRequestHandler.handle(DefaultRestRequestHandler.java:177)
 at jetbrains.mps.webr.runtime.requestProcessor.RestRequestProcessor.processRequest(RestRequestProcessor.java:47)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.processRequest(MainServlet.java:252)
 at jetbrains.mps.webr.runtime.servlet.MainServlet.doGet(MainServlet.java:138)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
 at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:648)
 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1336)
 at jetbrains.mps.webr.runtime.filter.QueryParameterFilter.doFilter(QueryParameterFilter.java:25)
 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
 at org.eclipse.jetty.continuation.ContinuationFilter.doFilter(ContinuationFilter.java:137)
 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
 at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:82)
 at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:242)
 at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)
 at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)
 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
 at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)
 at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
 at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)
 at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)
 at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
 at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)
 at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
 at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
 at org.eclipse.jetty.server.Server.handle(Server.java:365)
 at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)
 at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
 at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
 at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
 at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
 at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
 at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)
 at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)
 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
 at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
 at java.lang.Thread.run(Thread.java:701)


where <hostname> is the hostname of the server.

I've read around that this may be caused by a loss of internet connection, but I don't see why a loss of an internet connection would kill YouTrack. Once this error occurs, the server starts giving a 502 Bad Gateway error and I need to restart the YouTrack service.

Does anyone have any suggestions as to how I can fix this? I really want to use YouTrack but it's not really useable if I need to restart it constantly.

Thanks!

Please sign in to leave a comment.