I didn't move
jboss-as.conf to /etc/jboss-as/ but it is present under bin/init.d .
JBOSS_HOMEis defined inside my startup script, so didn't define in
I think this shouldn't be the issue.
Apart from this all seems to be fine.
In the "jboss-as.conf" file there must be a "STARTUP_WAIT" line.
If it is commented, uncomment it and increase the value (120 should be fine)
Furthermore, did you check the /var/log/messages for errors? There must be something relevant there (search for jboss).
I configured with the STARTUP_WAIT time but no luck.
Below are the traces from /var/log/messages
Apr 22 11:34:34 serverxxx puppet-agent: Found multiple default providers for host: safe_parsed, parsed; using safe_parsed
Apr 22 11:34:56 serverxxx puppet-agent: Finished catalog run in 21.54 seconds
Apr 22 11:52:48 serverxxx snmpd: Connection from UDP: [126.96.36.199]:55661->[188.8.131.52]
The standalone.sh inside bin folder runs fine and starts jboss as usual. Issue is with startup file.
I have puppet running on the server and JAVA_HOME and java path is added to PATH variable locally which is overwritten by puppet.
But I assign these variables and then try to start jboss but still get the same old error.
Is the error because of puppet where the variables are not exported ?
I am clueless regarding the error.
jboss-as failed to startup in the time allotted
Has anyone got this error before? Can someone help and guide me if they know where to look for the error and how to fix.
Oh c'mmon stop whining and look up on the internet about this problem.
when any service fails to start what is first thing you should do? look at its logs.
for EAP / WildFly that would be your $JBOSS_HOME/standalone/log/*.log
and see what is the real problem.
Try below steps
cp jboss-as-standalone.sh /etc/init.d/jboss-as-standalone.sh
cp jboss-as.conf /etc/jboss-as/jboss-as.conf
Change the name of jboss owner (that is. user who actually has privileges to start jboss)
:wq (that is, save)
You should see it working! Restart your server once and check if it boots at start up!
Give appropriate permissions to file, ex: chmod 755 jboss-as.conf
If you do not wish to do any of them above again, then try crontab
@reboot <jboss startup script>
Otherwise, you can do the below method but it is worst method:
vi /etc/init.d/start_jboss.sh (create new script)
<contents of start_jboss.sh>
<full path of jboss startup script> ex: /opt/EAP-6.0.3/standalone/jboss-as-standalone.sh
<save and close the file>
chmod guo+x start_jboss.sh (make this script executable)
update-rc.d start_jboss.sh defaults
Restart the server! You should see management console opening now!
@Tomaz Cerar, I am new to jboss and I tried everywhere looking in logs but couldn't find anything. That's why kept on asking. Even I know where are the logs and what the log contains. Thanks for helping !!
@Rajkumar S, that really worked.
copying the jboss-as.conf to /etc/jboss-as/jboss-as.conf . Thank you !!
I am trying to understand why I need to have jboss-as.conf inside /etc/jboss-as. Even though my script has location of the conf file it was not working earlier.
Cool...I could not guess the reason now without seeing logs or reading that script you have written.
But in general, I think reason could be (1)'jboss-as-standalone.sh' might not have permissions to execute script (2) You might have not added 'jboss-as-standalone.sh' into defaults
can you do ls -lrt j* in /etc/init folder and give result? Similarly, do ls -lrt *.sh in the bin folder of $EAP_HOME where the standalone.sh script resides.We can see the permission levels of both these files.
To solve 1st problem, you can try chmod ugo+x jboss-as-standalone.sh
To solve 2nd problem, you can try "update-rc.d jboss-as-standalone.sh defaults"