Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error : Can' t connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable

I've got 2 applications that are working well except on production environment for 1 feature. This feature is an excel generation from a simple table. On all my others environment the generation of the excel is OK, but when I am trying to use it on production environment. I've got this error in log and a naugthy error 500 on my app !

2014-04-29 09:27:05,690 [[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR com.btoc.reporting .web.misc.MiscServletFilter - Error processing request org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.InternalError: Can' t connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable. at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:949) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:523) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253) at org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195) at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159) at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141) at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:65) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) 147) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116) ) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) ava:113) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) ationFilter.java:139) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) eRequestFilter.java:54) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) ProcessingFilter.java:182) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) va:87) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

Any leads that I can follow ? I've already compared all my java version. Like I am using a weblogic server, all my java versions are the same.

I am using (for the excel generation) the API from apache:

<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi</artifactId>
    <version>3.7</version>
</dependency>
like image 429
RVA Avatar asked Jan 11 '23 17:01

RVA


2 Answers

You have a couple of options to try:

  • Specify the -Djava.awt.headless=true parameter at startup time (either for your app or the server itself in the JVM_ARGS of the Server Start tab or startWebLogic.sh).

  • Try export DISPLAY=:0 before starting your weblogic server.

  • Check to see if the X Server is running in another port

  • Try to completely unset the display before starting the server unset DISPLAY

like image 133
Display Name is missing Avatar answered Jan 26 '23 10:01

Display Name is missing


A simple solution is execute this command :

unset DISPLAY

And to restart your application.

like image 44
Youssouf Maiga Avatar answered Jan 26 '23 10:01

Youssouf Maiga