Mule ESB Startup Script Parameters - mule

Mule is running as a Windows Service, and when the server is restarted we need the flows to start back up in a very specific manner.
I have edited the bat file located in $HOME\bin\mule.bat
with these parameters:
./mule -app app1:app2:app3 start
However this does not appears to make a difference in the startup.

Here is the answer from Mule.
On Windows
Run as Windows Service:
Follow the next steps to control the order with a system variable.
Stop the windows service.
Create a system variable MULE_STARTUP_ORDER containing the desired order (apps separated by ":") i.e.:APP1:APP2:APP3
Add the next lines to the $MULE_HOME/conf/wrapper.conf file:
wrapper.app.parameter.10=-app
wrapper.app.parameter.11=%MULE_STARTUP_ORDER%
Start the windows service.
The order should be the expected.
Note: With this method you need to manually add/delete applications to the MULE_STARTUP_ORDER variable for them to start

It maybe of help to others running Mule 3.8 Standalone as a Window service, but this worked for me.
Remove the existing Mule service (if it exists) by running the following from the command line
${MULE_HOME}\bin>mule remove
Where ${MULE_HOME} is the directory where Mule is installed
Edit the following file
\Mule\bin\mule.bat
set MULE_OPTS=set.MULE_APP=%MULE_APP%
set.MULE_APP_LONG=%MULE_APP_LONG% set.MULE_HOME="%MULE_HOME%"
set.MULE_BASE="%MULE_BASE%" set.MULE_LIB=%MULE_LIB%
wrapper.working.dir=%_REALPATH% wrapper.app.parameter.1=-app
wrapper.app.parameter.2="appName1:appName2" wrapper.app.parameter.3=%3
wrapper.app.parameter.4=%4 wrapper.app.parameter.5=%5
wrapper.app.parameter.6=%6 wrapper.app.parameter.7=%7
wrapper.app.parameter.8=%8 wrapper.app.parameter.9=%9
Where appName1 and appName2 are the names of my Mule applications in \Mule\apps
Install Mule as a service again
${MULE_HOME}\bin>mule install
Start your Mule service and check the logs to confirm the Mule apps are starting in the order expected.
Finally, if you wished to do the same from the command line, then try
${MULE_HOME}\bin>mule -app=appName1:appName2
Hope that helps!

Where did you found out that would even work?
Have a look over here in the docs about starting/stopping Mule.
https://docs.mulesoft.com/mule-user-guide/v/3.7/starting-and-stopping-mule-esb
As far as i know that isn't possible.
You can change the initial state of your flows in Anypoint Studio to stopped.
That will help you out for the flows that you don't want to start after restart.
However you should start them afterwards manually via MMC or via the API.

Related

Mule startup order for applications

So, i have three mule applications where one needs to be started before the other two. And I start mule as a windows service. I found this site and follow the example by putting
wrapper.app.parameter.1=-app
wrapper.app.parameter.2=%MULE_STARTUP_ORDER%
in wrapper.conf. where MULE_STARTUP_ORDER is an system variable containing App1:App2:App3
But when i look in my mule.log after staring the service app2 starts first followed by app3 and app1 is last.
And I use mule standalone 3.7.0.
Anyone have any idea what I am doing wrong/missing?
Try setting the list of applications directly in wrapper.conf in case the service has no access to the system environment variable from Windows. Also try using higher numbers for the parameters like the example in the KB article you referenced. Low numbers might be get overridden by other parameters.
Example:
wrapper.app.parameter.10=-app
wrapper.app.parameter.20=app1:app2:app3

Idempiere: 'External POS Integration' option not showing up in Menu

I am trying to setup Unicenta POS on my Windows 10 64 bit machine.
My configuration:
Idempiere server v5.1 (http://127.0.0.1:8080/)
ActiveMQ v5.15.2
(http://127.0.0.1:8161/)
POS Integration plugin (Available
here)
I followed instructions given Here. ActiveMQ is running fine, Unicenta can also send request to ActiveMQ, I can see that in Queues. Idempiere server is also running fine.
I installed POS integration plugin through Felix Web Console. It shows up in the list and It is active. But, that plugin doesn't show up in Idempiere Menu option. Either that plugin has some problems or I am missing something.
I also performed Role Access Update on GardenWorld Client Admin but that didn't change anything. Menu option is still missing.
Please help.
The real issue was that 2Pack did not Pack in into the Database. I had install 2Pack manually and Pack In in my SystemAdmin. After that I logged out and logged in with SuperUser credentials and with GardenAdmin role. And then menu item appeared!
2Pack zip file location - Download
How to Pack In:

"Message Queue service is not available" when service automatically starts after reboot

The services terminate due to MSMQ not being started at the time they're trying to start up, so the obvious solution would be to set the startup type to automatic (delayed). Rather than going with the obvious solution I'm wondering if there's something I'm doing wrong?
I'm using NServiceBus V5 on Win2012 and started to get these messages on all my installed services after I upgraded to V5 from V4. They're installed to start automatically when the server boots up. This hasn't happened before, and the services start normally if I manually start them.
I don't think you're doing anything wrong--I think it's what you suspect: your service is starting up before the Message Queuing Service is ready.
Assuming the NServicebus is running in NServiceBus.Host.exe, in order to get the service to start after MSMQ, there's a switch that needs to be used when installing the service (I used one line, broke it into multiple lines for readability):
.\NServiceBus.Host.exe /install
/servicename:"service"
/displayname:"display"
/dependsOn:"MSMQ"
I had tried "Message Queing" since that's what was in the service control manager, but I guess it doesn't take the display name. I found that MSMQ was the service name by right clicking on the service and viewing the service name field at the top.
You can set service dependencies without having to reinstall.
use the following command: sc config YOURSERVICENAME depend=MSMQ

Installing Multiple Instances Mule ESB

I have gone through the mule doc.
https://www.mulesoft.org/documentation-3.2/display/MULE2INTRO/Installing+Mule
I am trying to understand how to make multiple instances from a single esb server.
I have to make a cluster of the instance.
But I havent get any clear idea about doing this.
I am using a ubuntu OS.
I want to know that.
1) Do I have to make 2 directory which containing to 2 server.
2 if no Do I have to configure 1 server So that I can make as many instance as I can.
3 if yes Then please can some one help me with step.
I often set up multiple mule instances on Ubuntu linux in parallel, and I use parallel directories that contain the Mule standalone installation.
Here is a template upstart script I have used to run it on startup under the mule user. You should copy this file to /etc/init/mule-instance-name.conf, and create an associated file /etc/default/mule-instance-name in which you set the MULE_HOME environment variable to the directory where you installed that instance.
description "Run Mule ESB instance 1"
author "Ryan Hoegg"
setuid mule
setgid nogroup
# we need real ethernet before starting:
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [016]
kill timeout 30
script
. /etc/default/mule-instance1
exec $MULE_HOME/bin/mule
end script

mule sftp archive not continuing flow

Im having major issues with Mule 3 and files being read and that later should be put on some standard queue on ActiveMQ.
basically its a really simple service, initially started that on inbound starts off by
This file is read correctly from the SFTP area, and in the mule log for the reading application its stated that the file is written to the specified archiveDir..
After this, its silent, nothing else happens... the file is just placed in the archiveDir and neithe ActiveMQ or Mule3 gives any indications to that something have gone wrong...
The queue names etc etc is all correct.
Basically the same environment is running on a second server, with no disturbance..
Is there any commonly known issues that could make mule not continue on with its processing putting the file on queue?
Thx in advance!