Issue connecting to X11 window server

6/18/2021

I have two Java Swing/awt applications on Ubuntu 16.04 LTS with JDK 1.8. Each is running in a kubernetes pod, namely A and B. Both are on the same cluster (same host).

I want to display GUIs of both applications onto pod A only. It works as expected. But sometimes, it runs into the error below. How do I fix it?

java.awt.AWTError: Can't connect to X11 window server using 'my_host:0' as the value of the DISPLAY variable.
-- Kevin N
awt
docker
java
kubernetes
x11

0 Answers