mule sftp archive not continuing flow - activemq

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!

Related

RabbitMQ service start failure due to bad .erlang cookie location

Erlang crashes on rabbitMQ service start, due to bad unable to create erlang.cookie path Image Attached (Log File). I need to figure out why it's adding an extra c: to the beginning of the path, and where that's defined. Any suggestions. I've uninstalled and deleted everything relating to rabbitMQ multiple times. include the registry items and environment variables.

Mule 4 Runtime - Clear Application Data of a batch process

I was having intermittent issue running a Mule Batch with huge data in Anypoint Studio. That issue is resolved by enabling 'Always' option under 'Clear Application Data' in 'Run Configurations' (as per the given instruction in Mule ESB - Clear Memory of a batch process). That option is shown in the picture.
How to enable the same 'Always' option in stand alone Mule Runtime during the startup that means when we are not running the batch from Anypoint Studio? Is there any command line argument available that can be used in startup script of the Mule Runtime to achieve the same goal?
By deleting the local data you are deleting batch queues, persistent objects stores and maybe some other information. In a development environment like Anypoint Studio IDE it is usually OK but for a standalone Mule Runtime it means you are deleting production data, for example records that are used by batch to continue processing after a restart. That data will be lost. Having said that, it might be needed if the data is completely corrupted.
It is a best practice and a strong advice to any user to resolve the root cause of the issue rather than delete data. And it should never be done every time you start your production Mule, only when there is absolutely no other alternative.
I don't recommend to delete local files at all. If even after my warnings you absolutely need to do this never ever delete the .mule directory. If you still want to risk losing data delete only the directory with the application name under the .mule directory.

Is there any way to inspect RabbitMQ messages that are persisted? Where those are stored?

Just doing some testing on local machine, would like somewhere to inspect messages that are published and persisted by RabbitMQ (deliveryMode = 2). Or at least to have a time when messages was actually persisted. First try was RabbitMQ admin management, went trough all options and closest what i have found is following:
Database directory: /usr/local/var/lib/rabbitmq/mnesia/rabbit#localhost
There i can found many files with rdq extenstions and many logs file, but can't actually see nothing.
you can't, RabbitMQ uses a custom database and it is not possible to browse it.
you can only browse the RabbitMQ definitions as "queues", "users", "exchanges" etc.. but not the messages.
By default, the messages index is inside:
/usr/local/var/lib/rabbitmq/mnesia/rabbit#localhost/queues/HASHQUEUE
The only way it is as suggested by #Johansson
It's possible to manually inspect your message in the queue via the Management interface. Press on the queue that has the message, and then "Get message". If you mark it as "requeue", RabbitMQ puts it back to the queue in the same order.
https://www.cloudamqp.com/blog/2015-05-27-part3-rabbitmq-for-beginners_the-management-interface.html

Mule ESB Startup Script Parameters

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.

How to force file-queue-store to keep messages on disk

For asynchronous processing large amount of files it could be nice to store messages in a persistent storage to releave JVM heap and avoid data loss in case of system failure.
I configured file-queue-store, but unfortunatelly, I can not see msg files in the .mule/queuestore/myqueuename folder.
I feed the flow with files from smb:endpoint and send them to a cxf endpoint.
When I stop Mule ESB (version 3.2.0) properly during file processing, it writes a lot of .msg files to the queuestore. After restart it processes them one-by-one.
But, when I kill the JVM (to test a system failure, or OutOfMemoryError, etc.), there is no fies in the queuestore, so all of the is lost.
My question: Is it possible to force queuestore to store the messages on disk and delete them only when they fully processed?
Please advise. Thanks in advance.
Mule 3.2.0 was affected by this issue
You should consider upgrading.