WebSphere app server 7.0 GUI admin console and MBeans - websphere

I am new to WAS, and currently using WAS 7.0 The application I am deploying in WAS registers some MBeans when it starts up , I would like to know how to monitor/get info related to these registered MBeans from the admin console( GUI) of WAS. I see many options there in the admin console, but getting confused where to find the info related to MBeans that got registered within the WAS JMX Infrastructure when the application started up? or is it only possible programmatically to obtain it? If you can suggest some resources, it will be helpful?

You could get to these mbeans you've registered through either:
JConsole - A bit tricky to connect to WAS with, here's my batch for running it:
echo URL connection string is: service:jmx:iiop://you-hostname-here:2809/jndi/JMXConnector
set JAVA_HOME=C:\Progra~1\IBM\SDP\jdk
set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\jconsole.jar
set CLASSPATH=%CLASSPATH%;tools.jar;com.ibm.ws.admin.client_7.0.0.jar
"C:\Program Files\IBM\SDP\jdk\bin\jconsole.exe" -J-Djava.class.path=%CLASSPATH%
WSAdmin script - example:
beanNameString = AdminControl.queryNames('type=youMbeanName,*')
print AdminControl.getAttribute(beanNameString, 'someAttribute')
AdminControl.invoke(beanNameString, 'someMethod', 'parameter1')
programatically.
I'll leave this to you :)

Related

how to generate websphere thread dump without wsadmin on windows server

I have websphere application server v 7 over windows server and I want to generate thread dumps because i have thread hungs, but when I try to get the java cores with wsadmin appears an error, so I want to generate java core files like linux using kill -3 .
Is there something like this in Windows server ?.
Like ObiWanKenobi mentioned, your best bet would probably be through the deployment manager administrative console. From IBM's support site:
Set the com.ibm.websphere.threadmonitor.dump.java property to true:
Application Servers:
From the administrative console, click Servers > Application Servers > server_name.
Under Server Infrastructure, click Administration > Custom Properties.
Click New and add the following property:
Name: com.ibm.websphere.threadmonitor.dump.java
Value: true
Click Apply.
Click OK and save the configuration changes.
Restart the Application Server for the changes to take effect.
Node Agent:
From the administrative console, click System Administration > Node Agents > nodeagent.
Under Additional Properties, click Administration Services
Under Additional Properties, click Custom Properties
Click New and add the following property:
Name: com.ibm.websphere.threadmonitor.dump.java
Value: true
Click Apply.
Click OK and save the configuration changes.
Restart the Node Agent for the changes to take effect.
In short, there is no good answer.
The closest would be to use something like SendSignal. See the Can I send a ctrl-C (SIGINT) to an application on Windows? question for more information. Unfortunately, SendSignal doesn't work reliably on all versions of Windows (see my Send ctrl-break to java process on 64-bit Windows ala sendsignal on 32-bit question).
If you're willing to write some custom code, you could write a Java program that uses the attach API to load a Java agent that calls the Dump API. (I suspect that IBM Support Assistant has this capability built-in, but it's been too long since I tried to be authoritative on this point.)
You can make the JVM to do a thread dump when there are 'hung' threads messages in the SystemOut.log:
Add com.ibm.websphere.threadmonitor.dump.java=true under JVM's Administration > Custom Properties.

How to enable debug logging in Eucalyptus 4.0.0?

Can anyone explain how to enable debug logging in Eucalyptus 4.0.0 properly?
I set LOGLEVEL="DEBUG" in /etc/eucalyptus/eucalyptus.conf
Then I restarted everything but logs still only show INFO, WARN and ERROR.
You're on the right track. Setting LOGLEVEL="DEBUG" in eucalyptus.conf is valid for C-based components, and Java-based components which have not yet fully bootstrapped. When you set DEBUG in eucalyptus.conf, you'll need to restart the affected components on just that machine. So for example, on the NC, you would need to issue a restart, eg, "service eucalyptus-nc restart" in order to pick up the new value.
For the Java components, in particular after they've bootstrapped, you set the cloud-wide PROPERTY thusly:
euca-modify-property -p cloud.euca_log_level=DEBUG
and the output will tell you what the property was, and what is has become, if done correctly.
For example:
# euca-modify-property -p cloud.euca_log_level=DEBUG
PROPERTY cloud.euca_log_level DEBUG was INFO
Once you've set that, you're good to go. No need to restart any of the Java components, anywhere in the cloud.

Start Websphere Application Server but not loading any application

Is there any way that we can start Websphere Application Server but not loading any applications installed on it?
Environment: websphere 7.0
I didn't find a command line tool method for doing this, but you can edit the deployment.xml files underneath each WAR/EAR file that you want to stop from auto-starting when Websphere starts up.
These deployment.xml files are located typically here:
/opt/IBM/WebSphere/AppServer/profiles/<my profile>/config/cells/<my cell>/applications/<my .ear>/deployments/<my app>/deployment.xml
Within this file is this XML snippet:
<targetMappings xmi:id="DeploymentTargetMapping_1499739616851" enable="true" target="ServerTarget_1499739616851"/>
Change the enable=true to enable=false for every EAR/WAR that you don't want to auto-start. Once done start WAS as you'd normally do so.
References
http://www-01.ibm.com/support/docview.wss?uid=swg21265381
If you mean not starting installed applications, this is controlled through Administrative Console in Enterprise Applications > your_app > Target specific application status. There you can enable or disable auto start.
Target specific application status

How to start automatically and run tomcat 6.0.37 version as a background process on Remote Desktop Server start up?

Currently I am running tomcat 6.0.37 version (64-bit windows) on remote desktop server(OS-Windows2008/64-bit), please help me to find answers for the following questions.
QUESTIONS
Q1) How can I run tomcat 6.0.37 version(64-bit windows) as a background process, after closing the tomcat server command prompt window?
(Note : "Tomcat windows service Installer" is not applicable for my scenario.)
Q2) How to start Tomcat 6.0.37 version(64-bit windows) automatically when remote desktop server(OS-Windows2008/64-bit) starts up and also when remote desktop server(OS-Windows2008/64-bit) gets restarted?
Please help me regarding the above questions with step-by-step procedure and some useful information regarding above questions.
Thanks,
Ashwini
The short version is you can't. The problems you are describing are exactly the type of problems running as a service is meant to solve.
I can't think of any valid reason why a web application couldn't run as a service. I'd challenge the supplier of your application as to why they are making such a claim.
Meanwhile, I'd run Tomcat as a service anyway. If the app needs access to network shares then you'll need to run the service as a domain user with access to those shares and make sure you specify them using the full UNC path rather than mapped drives.
I found the Solution on "How to start automatically and run tomcat 6.0.37 version as a background process on Remote Desktop Server start up?"
Step 1: In Environment Variables, set variable name and variable value as
CATALINA_HOME and C:\Tomcat6
Step 2: Environment Variables, set variable name and variable value as
CATALINA_OPTS and -server -Djava.awt.headless=true -Xms384M -Xmx1536M -XX:MaxPermSize=5750M(according to usage of your RAM size)
Step 3: Once installed tomcat service installer by setting the username = xyz, password= xyz and role=xyz-gui,manager-gui.
Then, in right corner of your desktop screen will get a Tomcat server symbol to start and stop the service. Right click on the icon, choose configure---->Java tab and enter those according to your system RAM.
In Java Options text box:
-Djava.awt.headless=true
-Xms1536M
-Xmx3072M
-XX:MaxPermSize=5750m(according to ur RAM size)
And set the values of:
Initial Memory Pool = 64MB
Maximum memory Pool = 5750(usage of RAM Size)
Thread Stack Size = 256MB
These steps are working perfectly for me. Tomcat service is running successfully without any problems.
Thanks,
Ashwini

How does one run Spring XD in distributed mode?

I'm looking to start Spring XD in distributed mode (more specifically deploying it with BOSH). How does the admin component communicate to the module container?
If it's via TCP/HTTP, surely I'll have to tell the admin component where all the containers are? If it's via Redis, I would've thought that I'll need to tell the containers where the Redis instance is?
Update
I've tried running xd-admin and Redis on one box, and xd-container on another with redis.properties updated to point to the admin box. The container starts without reporting any exceptions.
Running the example stream submission curl -d "time | log" http://{admin IP}:8080/streams/ticktock yields no output to either console, and not output to the logs.
If you are using the xd-container script, then the redis.properties is expected to be under "XD_HOME/config" where XD_HOME points the base directory where you have bin, config, lib & modules of xd.
Communication between the Admin and Container runtime components is via the messaging bus, which by default is Redis.
Make sure the environment variable XD_HOME is set as per the documentation; if it is not you will see a logging message that suggests the properties file has been loaded correctly when it has not:
13/06/24 09:20:35 INFO support.PropertySourcesPlaceholderConfigurer: Loading properties file from URL [file:../config/redis.properties]

Resources