Jboss server log is showig error - jboss

I am calling a script within main script to start the jboss sever after releasing the build on server.it is successfully starting the JBOSS but showing the below output in server/log/ server.log file and at the console output which is hanged.
To run the next build i need to kill this manually which is not appropriate.
05:04:17,373 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-0.0.0.0-8209
05:04:17,451 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 2m:38s:444ms
05:04:20,912 WARN [PropertyMessageResources] Resource MessageResources_en_US.properties Not Found.
05:04:20,913 WARN [PropertyMessageResources] Resource MessageResources_en.properties Not Found.
Help would be really highly appreciable.
Thanks.

By default, when you start your jboss server, it is not started as a background process and the console just sits there with the logs when server is started, that must be the reason why your script seems to hang , in reality it is just awaiting console output from the server.
To start jboss as background operation, replace the lines of code where you fire the run.sh in startup script with
nohup /path/to/jboss_home/jboss/bin/run.sh -b0.0.0.0 > /tmp/logs/jbosslogs.log &
This should start jboss in the background and redirect all startup logs to jbosslogs.log file. Since it is a background process, it will not hang at all.

Related

Wildfly not starting properly

So I have a rather strange issue with wildfly not starting...
If I clean the standalone/deployments of everything but one .war file, wildfly starts perfectly. I can then add in all other .war files(6 in total) and wildfly deploys them without issues.
However if I have all the war files in there and start wildfly it completely fails. It stays in a state where everything is set to .isdeploying for maybe 5 minutes until everything gets set to failed.
The logs that I am getting from service wildfly status
Feb 09 08:49:12 wildfly[2079]: /etc/init.d/wildfly: 3: /etc/default/wildfly: default: not found
Feb 09 08:49:12 wildfly[2079]: * Starting WildFly Application Server wildfly
Feb 09 08:49:43 wildfly[2079]: ...done.
Feb 09 08:49:43 wildfly[2079]: * WildFly Application Server hasn't started within the timeout allowed
Feb 09 08:49:43 wildfly[2079]: * please review file "/var/log/wildfly/console.log" to see the status of the service
Has anyone seen anything like this before?
After looking aroung I found this just before it undeployed everything:
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0348: Timeout after [300] seconds waiting for service container stability. Operation will roll back. Step that first updated t
he service container was 'add' at address '[
("core-service" => "management"),
("management-interface" => "http-interface")
]'
But I am still not sure what i means...
This happened to me too starting on WildFly 11 and above IIRC.
Are you trying to access to the public or management IP while the server is booting? Basically you have to wait until the server has started to access those IPs.
My workaround was use the marker files that deployment scanner checks.
https://docs.jboss.org/author/display/WFLY/Application+deployment#Applicationdeployment-MarkerFiles
Before you start wildfly you have to put a .skipdeploy file for each .war you want to skip. Then, when the server has started you only have to delete that file to let wildfly start the deployment. You can achieve this making a shell script and calling it from your standalone.sh
This error shows that your IP/Port is being used by another process.
Use below command to check it.
For windows: use netstat -aon | find "port number"
You can configure jboss.as.management.blocking.timeout system property to tune timeout (seconds) waiting for service container stabilityas below :
...
</extensions>
<system-properties>
<property name="jboss.as.management.blocking.timeout" value="900"/>
</system-properties>
<management>
...
Or, if still doesn't work this way, collect a series of thread dumps during your startup period so we can see what it might be getting stuck on.

Randomly tomcat process create another copy process of it. Now see two PIDs of tomcat running

i observed strange problem suddenly on one of our QA machine.
We keep tomcat started using sysdeo eclipse plugin on windows server.
Application was in use for few days, working fine. No changes done on server.
Suddenly we observed today http://localhost:8080 stuck and not giving response.
Taskmanager found 2 tomcat process running with same no of threads around 1500.
PID 12309 with command line property :
"..\javaw.exe" -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:52742 "-Dcatalina.home=..\apache-tomcat-7.0.50" "-Djava.endorsed.dirs=..\apache-tomcat-7.0.50\endorsed" "-Dcatalina.base=..\apache-tomcat-7.0.50" "-Djava.io.tmpdir=..\apache-tomcat-7.0.50\temp" -Xmx25000m -Dfile.encoding=Cp1252 -classpath "..\apache-tomcat-7.0.50\bin\bootstrap.jar;..\apache-tomcat-7.0.50\bin\tomcat-juli.jar" org.apache.catalina.startup.Bootstrap start
PID 56098 with command line property :
"..\javaw.exe" -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:61684 "-Dcatalina.home=..\apache-tomcat-7.0.50" "-Djava.endorsed.dirs=..\apache-tomcat-7.0.50\endorsed" "-Dcatalina.base=..\apache-tomcat-7.0.50" "-Djava.io.tmpdir=..\apache-tomcat-7.0.50\temp" -Xmx25000m -Dfile.encoding=Cp1252 -classpath "..\apache-tomcat-7.0.50\bin\bootstrap.jar;..\apache-tomcat-7.0.50\bin\tomcat-juli.jar" org.apache.catalina.startup.Bootstrap start
Please give pointers on solving this problem.

War with spring configured Camel context will not redeploy on JBoss

I have a Camel application deployed on JBoss in a WAR file with a spring configuration for starting the Camel context.
It deploys and runs very nicely on a JBoss EAP 7.0.0.GA.
If I want to change values in a property file that my application depends on and touch the war file, it normally redeploys the application. But in some cases it fails.
I get the following in the server.log:
2017-07-25 12:05:26.671 INFO class=org.apache.camel.impl.DefaultShutdownStrategy thread="ServerService Thread Pool -- 74" Starting to graceful shutdown 12 routes (timeout 300 seconds)
2017-07-25 12:05:26.725 INFO class=org.apache.camel.impl.DefaultShutdownStrategy thread="Camel (interfacedb) thread #2 - ShutdownTask" Waiting as there are still 4 inflight and pending exchanges to complete, timeout in 300 seconds. Inflights per route: [interfacePersistDirect = 1, route1 = 1, pullFromTransferEntityTable = 1, lastScheduledRun = 1]
...
2017-07-25 12:10:26.691 WARN class=org.apache.camel.impl.DefaultShutdownStrategy thread="ServerService Thread Pool -- 74" Timeout occurred during graceful shutdown. Forcing the routes to be shutdown now. Notice: some resources may still be running as graceful shutdown did not complete successfully.
2017-07-25 12:10:26.691 WARN class=org.apache.camel.impl.DefaultShutdownStrategy thread="Camel (interfacedb) thread #2 - ShutdownTask" Interrupted while waiting during graceful shutdown, will force shutdown now.
2017-07-25 12:10:26.694 INFO class=org.apache.camel.impl.DefaultShutdownStrategy thread="ServerService Thread Pool -- 74" Graceful shutdown of 12 routes completed in 300 seconds
After this the application will not start again. JBoss reports the following in the myApp.war.failed file in the deployments folder.
"WFLYDS0022: Did not receive a response to the deployment operation within the allowed timeout period [600 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment."
The application normally deploys a lot quicker than 600 seconds. I can touch the war file or delete the .failed file, which normally triggers a redeployment, but JBoss keeps giving me the error above in the .failed file.
The application starts normally if I restart the JBoss VM, but I would like to avoid restarting the other applications running on the JBoss instance.
Any suggestions?

Error message while starting JBoss server:Port 9303 already in use

I am getting below error message while starting my Jboss 1.5 server. Kindly help me out with suggestions to fix this issue.
The Jboss servers stays up for matter of minutes and immediately it stops working with the below error message.
Kindly help.
2015-11-21 07:06:12,922 INFO [org.jboss.web.WebService] (main) Using RMI server codebase: http://jboss URL:9303/
2015-11-21 07:06:12,982 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss:service=WebService state=Create mode=Manual requiredState=Installed
java.lang.Exception: Port 9303 already in use.
at org.jboss.web.WebServer.start(WebServer.java:233)
at org.jboss.web.WebService.startService(WebService.java:322)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:322)
Something at your system is running at the port 9303. You can either set port offset or change port of the service which is going to run at the port 9303.
To change port in JBoss 5 is something like:
run -c server_instance_name -Djboss.service.binding.set=ports-01
For test try to kill a service which is using port 9303 and try to run JBoss.

How to enable JBoss server TRACE log?

I am having web application running in JBOSS AS 4.2.2.
Observed that jboss server automatically shuts down, and the following exception is observed in server.log
14:20:38,048 INFO [Server] Runtime shutdown hook called, forceHalt: true
14:20:38,049 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
I want to enable TRACE for org.jboss.system.server.Server in jboss-log4j.xml, to hopefully get some more info when the server shuts down.
Please let me know how to enable TRACE for org.jboss.system.server.Server in jboss-log4j.xml.
I was able to add trace for server log and i could see the following output when JBOSS AS shuts down automatically:
2010-06-09 19:07:46,631 DEBUG [org.jboss.wsf.stack.jbws.RequestHandlerImpl] END handleRequest: jboss.ws:context=hpnp_lqs,endpoint=APIWebService
2010-06-09 19:07:46,631 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation] popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS#3290a11e (Thread http-0.0.0.0-8080-1)
2010-06-09 19:07:55,895 INFO [org.jboss.system.server.Server] Runtime shutdown hook called, forceHalt: true
2010-06-09 19:07:55,895 TRACE [org.jboss.system.server.Server] Shutdown caller:
java.lang.Throwable: Here
at org.jboss.system.server.ServerImpl$ShutdownHook.shutdown(ServerImpl.java:1017)
at org.jboss.system.server.ServerImpl$ShutdownHook.run(ServerImpl.java:996)
2010-06-09 19:07:55,895 INFO [org.jboss.system.server.Server] JBoss SHUTDOWN: Undeploying all packages
If anybody, has any clue, on what might be cause for automatic shutdown, pls help me.
Thanks!
There's a JBoss wiki page listing log output for various shutdown causes. It looks like yours was caused by a Ctrl-C. I assume you would have known if you hit Ctrl-C, though.
On unix-type servers, Ctrl-C generates a TERM signal, which could also come from someone or some script running as your jboss user or as root executing "kill <jboss pid>". If you're on linux I'd take a look at this question about the OOM killer.
One possible cause for this behaviour is console logout. We have observed this with our own server.
In brief, by default the Sun JVM listens to the event of the console user logging out, and shuts itself down automatically when that happens. To disable this, start the JVM with the -Xrs parameter.
See here for more details (look for Mysterious shutdowns).
One possible cause for a forced shutdown is if the virtual machine is out of memory.
I had this problem several years ago when a colleague implemented some very nasty bulk loading of objects from a database which caused jboss to shutdown on certain requests.
Try searching for "memory" or similar keywords in the log file and/or monitor the memory usage of the server.