EAP Shutdowns while using admin-console due to broken "X connection to localhost"

Solution Unverified - Updated

Environment

  • JBoss Enterprise Application Platform (EAP) 5.0.0

Issue

  • When interacting with the Admin Console on a desktop browser, the instance of EAP booted on a remote linux machine dies.

  • The Admin Console works fine for some time and then suddenly encounters this problem.

  • On first access to the Admin Console, the EAP console output shows:

      15:04:43,670 INFO  [ServletContextListener] Welcome to Seam 2.1.0.SP1
      15:04:48,266 WARN  [Component] Component class should be serializable: org.jboss.seam.ui.facelet.mockHttpSession
      15:04:48,300 WARN  [Component] Component class should be serializable: sessionInfoAction
      15:04:48,326 WARN  [PersistentPermissionResolver] no permission store available - please install a PermissionStore with the name 'org.jboss.seam.security.jpaPermissionStore' if persistent permissions are required.
      15:05:04,707 INFO  [BootstrapAction] Initializing Administration Console v1.3.1.GA...
      15:05:08,152 WARN  [SystemInfoFactory] System info API not accessible on this platform (native shared library not found in java.library.path).
      15:05:08,328 INFO  [PluginContainerResourceManager] Discovering Resources...
      15:05:08,416 WARN  [JMXDiscoveryComponent] Unable to complete base jmx server discovery (enable DEBUG for stack): java.lang.UnsupportedOperationException: No native library available - Cannot get the process table information without native support
      X connection to localhost:10.0 broken (explicit kill or server shutdown).
    

(Note that the WARN messages themselves are not symptomatic, just the location of the failure relative to the log messages.)

  • Server log shows same minus the "X connection to localhost..." line

Resolution

  • Start the server with the option -Djava.awt.headless=true  by adding it on the command line or by adding the following to $JBOSS_HOME/bin/run.conf:

      JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"
    

Root Cause

  • Some graphics handling code may try to access native windowing libraries leading to errors when they are not actually available.  The java.awt.headless property signifies that the windowing libraries are not available.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.