Tuesday, October 30, 2012

Tips and trick

My common unix command while administering a server:

How to find text in a file:
find . -type f -exec grep -i "my string to find" {} \; -print

Find and replace text inside the file using unix
sed -e 's/OLD TEXT/NEW TEXT/' -i myfiles*


Thursday, October 18, 2012

Mule ESB Cluster - MMC - Server Not showing in Server List drop down

I couldn't find this in any of the MMC forum so I tried to solve it and I found a way how to make it work.

The problem was, when you have two ESB server and both server were in a Group Server and under your permission group, you don't want the user to restart the server or view what's inside the server. All you want to do is to allow the user to deploy the application and the user can view the flows and of course, it must be a cluster configuration so I make both server into Cluster using the MMC, unfortunately, after converting it to cluster, the server dropdown list is empty and error in flows like somekind of authority.

I found a workaround for this and it took me a while to solve it. The mule support suggested to check the Server View under Server Group Permission ALL, but this approach, the user will be able to see what's inside the Cluster like Node, JVM, Property, etc and I don't want that the user is allowed to do that because it is so risky especially the ESB has multiple application running.

The mule support create a defect ticket on this to MMC Engineering team.

If you want the solution for this, let me know...

To be continued...

Mulesoft MMC 3.3.1 Could not register server: Could not pair servers (500) with MuleSoft ESB 3.3.1



To fix this error:

For RedHat specific with Virtual IP running and load balancing using Pulse:

Configuration:
    Server A - MMC IP  : 110.100.100.1
    Server B - ESB IP 1: 110.100.101.1

First and foremost, stop your ESB Server in Server B

Note: If you don't use PULSE in Virtual IP, please ignore Step 1 and Step 8.

1. Disable the "PULSE" service in Server B (i.e. sudo service pulse stop;)
2. Open your Server A hosts file (/etc/hosts)
Add the following to your hosts file
110.100.101.1 <your ESB dns name>
3. Open your Server B hosts file (/etc/hosts)
Add the following to your hosts file
110.100.101.1 <your ESB dns name>
4. Go to your Server B and open the wrapper.conf file under your <MULE_HOME>/conf and add the following:
wrapper.java.additional.4=-Dmule.mmc.bind.host=110.100.101.1
     Note: 

         For wrapper.java.additional.4 I choose "4" because that's available
5. Delete the folder ".mule" (i.e. rm <MULE_HOME>/.mule -R)
6. Start your ESB Server B
7. Go to your MMC Web Console and now register it.
8. Start your PULSE service in Server B to enable the Load Balancing again (i.e. sudo service pulse start;)
9. Enjoy...