LogNotificationListener take a while on startup of Jboss - jboss

When I start my Jboss server (5.1), I have the following line in logs:
[LogNotificationListener] Adding notification listener for logging
mbean "jboss.system:service=Logging,type=Log4jService" to server
org.jboss.mx.server.MBeanServerImpl#1bfefb[ defaultDomain='jboss' ]
This line takes 30 seconds before to continue the startup.
I don't know what does this line (the code behind this line of course).
Why takes it a long time and what does it do ?
Thanks.

Enable DEBUG logging and you will see what's going on. Add to startup parameters
-Djboss.server.log.threshold=DEBUG
and you will see it in:
jboss-as/server/${profile}/log/server.log
Or change configuration to see it in console. Config file is here:
jboss-as/server/${profile}/conf/jboss-log4j.xml

Related

How to configure the Closing socket as no data read for session timeout

I need your help in getting rid of the below warning because it is stopping me of doing any activity in the jsf page:
Socket BEA-000449 Closing socket as no data read from it on
XXX.XXX.XXX.XX,XXX during the configured idle timeout of 5 secs
I tried changing the session timeout in web.xml, but still it shows the above warning:
<session-config>
<session-timeout>200</session-timeout>
</session-config>
You can use JAVA_OPTIONS to set this parameter.
In you start script add the following Java option:
-Dweblogic.client.socket.ConnectTimeout=XXX
where XXX is value in ms.
Also you can read the following thread from Oracle:
https://community.oracle.com/thread/2125724

How to change the eclipse osgi service to timeout

I need to debug through the start of an OSGi dynamic service in Eclipse RCP application but the timeout is too short (or I'm too slow at debugging!).
!ENTRY org.eclipse.equinox.ds 2 0 2015-02-25 21:46:26.374
!MESSAGE Getting a lock required more than 10000 ms. There might be a synchronization problem in this callstack or just the build/dispose process of some components took too long!
Is there a way to set the timeout value to longer than the default 10000?
Looks like this can be configured in the debugging '.options' file for 'org.eclipse.equinox.ds' plugin:
# Debugging options for the org.eclipse.equinox.ds plugin
# Turns on/off debugging of SCR
org.eclipse.equinox.ds/debug=true
# Specifies that logged entries should be printed to the framework runtime console
org.eclipse.equinox.ds/print_on_console=false
# Enables generating and printing logs about the time performance of the operations executed by the SCR
org.eclipse.equinox.ds/performance=false
# Makes instance of each component nevertheless components are "immediate" or not
org.eclipse.equinox.ds/instantiate_all=false
#Advanced options
# Enables caching of the parsed XML documents of the component descriptions
#org.eclipse.equinox.ds/cache_descriptions=false
# Specifies the maximum time in milliseconds, which is allowed to a user component's activate or bind method to take. If the method invocation has not finished, a new dispatcher thread will be launched to process the pending work of SCR
org.eclipse.equinox.ds/block_timeout=30000
To use this file specify -debug <path to options file> on the eclipse command.
You could also set a VM argument if you start the eclipse instance with run configuration
-Dequinox.ds.block_timeout=300000000
To increase the Time have a look at Equinox/RuntimeOptions:
http://wiki.eclipse.org/Equinox/RuntimeOptions
For example:
-Dequinox.scr.waitTimeOnBloc=15000

Jboss server log is showig error

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.

Eclipse Rhostudio not showing error messages

I have just started using the rhostudio plugin for eclipse 3.7.2 on Windows.
I have erroneous code but the console never seems to output error messages.
When I launch the simulator I do get some logs but as soon as it hits a bad line of code it stops logging and the simulator window goes blank.
Can anybody help?
You can increase the amount of log output by changing the log level in:
rhoconfig.txt
in your projects root folder and setting MinSeverity as follows:
# Rhodes log properties
# log level
# 0-trace, 1-info(app level), 3-warnings, 4-errors
# for production set to 3
MinSeverity = 0
# enable copy log messages to standard output, useful for debugging
LogToOutput = 1

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.