Mule ESB Instance Monitoring - mule

what is the best way to monitor the Mule ESB instances. Is there a way i can get alerted when my mule instance goes down for some reason. I have 4 instances of Mule running and how will I come to know if 1 of them got down due to some reason.
Thanks!

I assume you are running community edition? (Enterprise edition provides a Management Console which allows you to define alerts). If you are using CE, then you are able to enable JMX monitoring on the instances and then use one of many ways to verify based on JMX info, whether your server is running. One way is to write your own application that retrieves JMX data programmatically and act accordingly.
HTH

If you are using Mule EE, you can use MMC to monitor all your instances as Gabriel has already suggested. My suggestion would be to install MMC inside tomcat on a separate server. This is to ensure that even if your Mule Server crashes or goes down, your MMC is still running and can send you alerts about your Mule server downtime. You can refer below link for details on how to setup server down and up alerts.
https://developer.mulesoft.com/docs/display/current/Working+With+Alerts
Additionally I would recommend to use MMC with database persistence to ensure you have ability to recover MMC workspace even if your MMC server crashes. You can refer about MMC setup with DB persistence at below link.
https://developer.mulesoft.com/docs/display/current/Configuring+MMC+for+External+Databases+-+Quick+Reference
If you don't have Mule EE, you may want to explore other tools or customer alerting applications as suggested by Gabriel.
HTH

You can set up a JMX agent by adding the following lines into your "conf/wrapper.conf" file :
wrapper.java.additional.19=-Dcom.sun.management.jmxremote
wrapper.java.additional.20=-Dcom.sun.management.jmxremote.port=10055
wrapper.java.additional.21=-Dcom.sun.management.jmxremote.authenticate=false
wrapper.java.additional.22=-Dcom.sun.management.jmxremote.ssl=false
wrapper.java.additional.23=-Djava.rmi.server.hostname=127.0.0.1
don't forget to change the values accordingly. Also you can implement SSL authentication with a few extra lines.
Now once your monitoring platform is set up you can always activate Java pollers and start the server.

Related

Mule ESB WebsphereMQ connection with JMS connector works in Mule Design, but not standalone server

I am new to Mule and followed this blog to create a "websphere-mq connector" through the jms connector. I am using the community edition.
In order to connect to the websphere mq server, I must run the application under a specific Windows username. Running the mule application in Mule Design under the specific username, I am able to connect and receive messages. However, I am unable to connect to the websphere mq server through the standalone application running on a windows server. I changed the user on the service that is running mule to the specific user but am unable to get authorization to the websphere mq server.
Any additional insight would be much appreciated.
I would suggest reviewing the "Getting going without turning off security" article for an introduction to MQ security. This might help get the MQ system correctly configured.
The stand alone application runs the Tanuki Software wrapper as the user assigned to the environment variable %USERNAME% in windows. Even though I updated the user in the Mule service to run as the approved user, the wrapper will take the environment variable.
To solve the problem, I updated the wrapper.conf file to include the following:
set.USERNAME=<approvedUsername>
the environment variable %USERNAME% is now set to the approved username, in which mule will allow the JMS connector to the authenticate with the correct username.

How to verify if Mule server is deployed or not?

How to verify if Mule server is deployed or not? My intention is to send a query(HTTP or something else) to Mule server and to see if it is up or down. This I want to do when no applications are deployed on the Mule server. This is to do validation post Mule server deployment. I am using community edition v3.3.0 and v3.4.0. I cannot use Mule EE version.
Thanks and Regards
Jai
That seems like a good idea.
The other option is to have you mule app sending a notification when started.
I know you said you can't use EE but the MMC module is probably what you need.
In any case they only problem with the previous approach is if you have a connectivity problem in the server you have your mule app running, but I reckon in that case you'll have several other problems.
HTH
Whenever hit the http we can see the response in console or in the logs.
First check whether your sever is running or not, give the proper url.

Clustering in mule using Mule Management Console on local machine

I am new to Mule ESB.
I have downloaded Mule Management Console(MMC).I have developed one simple application in which message(s) are put into queue which are then read by another queue. Now what i want to have two MMC instances running and on stopping one mule instance all the message flows through second instance.
Please let me know how to approach about it. Can I do it on my local machine? I mean can i create cluster on my local machine.
Mule based clustering.
Refer
http://www.mulesoft.org/documentation/display/current/Mule+High+Availability+HA+Clusters
http://www.mulesoft.org/documentation/display/current/1+-+Installing+the+Demo+Bundle
Hope this helps.!
Mule server doesn't allow you to link itself with two MMC instances at the same time thats because you register your mule server with MMC refer this: http://www.mulesoft.org/documentation/display/current/Architecture+of+the+Mule+Management+Console.
There is a way to have other MMC instance but that MMC instance has to be passive when the other is already running, MuleSoft has documented this refer it here: http://www.mulesoft.org/documentation/display/current/Persisting+MMC+Data+to+Oracle
So, in your case, when one mmc instance is stopped you can start the other one.

Mule ESB z/OS integration

Needed some information on mainframe integration from Mule ESB Enterprise v 3.4 with z/OS. We don't have CICS Transaction Gateway setup and are using CICS Transaction Server v 3.2. Please let me know if there is an out-of-the-box way to achieve this integration (connection + data access {read+write}) to z/OS.
TIA.
I don't have details for a mainframe specific implementation, but I've been working with Mule for a while now and might be able to help you get to a solution.
Mule is a standalone server that runs on a machine that has Java installed on it. If z/OS has Java installed, you may be able to unpack the Mule package and start it right away. Just make sure JAVA_HOME and PATH are set properly. MULE_HOME gets set during the startup
We have good success with Mule and CICS. In our case, we use MQ to get transactions into CICS, but pretty much any method is possible - even batch, if volume is low. We've created Mule connectors for some key apps, and this makes it drop-dead simple to create complex Mule flows that drive CICS (or other mainframe services).

Why are my WebLogic clustered MDB app deployments in warning state?

I have a WebLogic cluster on which I've deployed numerous topics and applications that use them. My applications uniformly show themselves in a Warning status. Looking at Monitoring on the deployment, I see the MDB application connects to Server #1, but on server #2 it shows this:
MDB application appName is NOT connected to messaging system.
My JMS Server is targetted to a migratable target, which is in turn targetted to the #1 server and has a cluster identified. And messages sent to either server all flow as expected. I just don't know why these deployments show in a Warning state.
WebLogic 11g
This can be avoided by using the parameter below
<start-mdbs-with-application>false</start-mdbs-with-application>
In the weblogic-application.xml, Setting start-mdbs-with-application to false forces MDBs to defer starting until after the server instance opens its listen port, near the end of the server boot up process.
If you want to perform startup tasks after JMS and JDBC services are available, but before applications and modules have been activated, you can select the Run Before Application Deployments option in the Administration Console (or set the StartupClassMBean’s LoadBeforeAppActivation attribute to “true”).
If you want to perform startup tasks before JMS and JDBC services are available, you can select the Run Before Application Activations option in the Administration Console (or set the StartupClassMBean’s LoadBeforeAppDeployments attribute to “true”).
Refer :http://docs.oracle.com/cd/E13222_01/wls/docs81/ejb/message_beans.html
this is applicable for the versions till 12c and later
I don't like unanswered questions, so I'm going to answer this one.
The problem is resolved, though I was not involved in its resolution. At present the problem only exists for the length of time it takes the JMS subsystem to fully initialize. During that period (with many queues, it can take a while) the JNDI system throws errors and the apps are truly in warning state. Once the JMS is fully initialized, everything goes green.
My belief is that someone corrected something in the JMS Server / Cluster config. I'll never know what it was.