
How to Fix JBoss AS Stuck at Starting in Linux?


Over the weekend, I was playing around with JBoss Application Server on CentOS 7. I installed 7.1.1, and when I tried to start, it was hung at starting.
[[email protected] bin]# ./standalone.sh ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /home/chandan/Downloads/jboss-as-7.1.1.Final JAVA: java JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml ========================================================================= OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 13:39:15,689 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA 13:39:16,236 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA 13:39:16,346 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
I waited for few minutes but no luck.
Are you in the same situation? Don’t panic!
It seems there is known issue with JBoss 7 with Java 8 and solution is to use Java 7. The first thing you want to verify if you are using Java 8.
[[email protected] bin]# java -version openjdk version "1.8.0_111" OpenJDK Runtime Environment (build 1.8.0_111-b15) OpenJDK 64-Bit Server VM (build 25.111-b15, mixed mode) [[email protected] bin]#
As you can see above, I am having Java 8 and need to use Java 7.
If you are on CentOS, then you can use the lower version of Java with the following command.
update-alternatives --config java
It will give you the option to select the java version
[[email protected] bin]# update-alternatives --config java There are 2 programs which provide 'java'. Selection Command ----------------------------------------------- 1 java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.121-2.6.8.0.el7_3.x86_64/jre/bin/java) *+ 2 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/bin/java) Enter to keep the current selection[+], or type selection number:
Enter 1, and you are all set.
If you are using RHEL or don’t have Java 7 then first you got to install and set in the PATH.
Once I set Java 7, JBoss 7 could start successfully.
[[email protected] bin]# ./standalone.sh ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /home/chandan/Downloads/jboss-as-7.1.1.Final JAVA: java JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml ======================================================================== 13:46:04,337 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA 13:46:04,622 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA 13:46:04,661 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting 13:46:05,552 INFO [org.xnio] XNIO Version 3.0.3.GA 13:46:05,568 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http) 13:46:05,584 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA 13:46:05,621 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers 13:46:05,643 INFO [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 3.2.3.GA 13:46:05,651 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem. 13:46:05,722 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem 13:46:05,734 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem 13:46:05,778 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem 13:46:05,871 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem 13:46:05,884 INFO [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service 13:46:05,901 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension 13:46:05,983 INFO [org.jboss.as.mail.extension] (MSC service thread 1-1) JBAS015400: Bound mail session [java:jboss/mail/Default] 13:46:06,001 INFO [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final) 13:46:06,002 INFO [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.7.Final 13:46:06,104 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3) 13:46:06,440 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-3) JBoss Web Services - Stack CXF Server 4.0.2.GA 13:46:06,522 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080 13:46:06,746 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Started FileSystemDeploymentService for directory /home/chandan/Downloads/jboss-as-7.1.1.Final/standalone/deployments 13:46:06,747 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on /127.0.0.1:9999 13:46:06,796 INFO [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on /127.0.0.1:4447 13:46:06,883 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS] 13:46:07,003 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990 13:46:07,004 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 3468ms - Started 133 of 208 services (74 services are passive or on-demand)
I hope this helps. Learn more about JBoss EAP administration and configuration here.
- Tagged in:
- JBoss
More great readings on Tomcat
-
How to Install Tomcat 9 and Where to Host it?Avi on February 20, 2021
-
How to Implement HTTP2 in Tomcat?Chandan Kumar on January 20, 2020
-
How to Fix Tomcat Stuck at Startup Issue?Chandan Kumar on January 20, 2020
-
How to Implement SSL in Apache Tomcat?Chandan Kumar on June 9, 2022
-
How to Enable Secure HTTP Header in Apache Tomcat 8?Chandan Kumar on January 31, 2022
-
How to Enable JMX in Tomcat to Monitor & AdministerChandan Kumar on June 10, 2022
Join Geekflare Newsletter
Every week we share trending articles and tools in our newsletter. More than 10,000 people enjoy reading, and you will love it too.