The scenario is --- I have developed a simple flow in Anypoint Studio (eclipse based IDE), which reads a file from a network location, processes the date and write the data in a database then. I tested that it works and then was publishing it on the Mule ESB runtime. Development IDE and runtime are on two different machines, both Windows Server 2008 R2.
The Issue is --- My program can't read files from the Mule ESB runtime environment, getting permission issues.
Minimum background on Mule ESB architecture. (For Runtime environment) Mule Enterprise ESB (mmc-distribution-mule-console-bundle-3.5.2-HF1) comes with embedded Tomcat server and Mule > Startup.bat has following two statements to call tomcat startup.bat
CD mmc-3.5.2-HF1\apache-tomcat-7.0.52 START /B bin\startup.bat
- I logged into the Runtime computer as Administrator and started mule\Startup.bat "As Administrator" which then shows in the Windows Task Manager that it has (C:\dev\java\jdk1.7.0_75\bin\java.exe) started as Administrator User
- However, then the above two DOS commands are starting Tomcat server (C:\Windows\System32\java.exe) as SYSTEM user.
- Because Tomcat server is running as SYSTEM user, my application deployed and running in this environment is getting permission errors.
Investigations done so far (on the runtime computer) - I downloaded a fresh copy of Tomcat, created a simple deployable project in eclipse JUNO IDE which would access files from the network location, ran this tomcat as administrator, and can see that my application is reading files from there. This shows that the issue is not with Tomcat or permission on the network drive, or application. - I can access the network location from IE, mapped drive, windows explorer etc - I am logged in as an Administrator. - Windows UAC access controls are already disabled. - I googled a lot on the 2 DOS commands given above. Currently, Mule > startup.bat is using START command to start tomcat and I wanted to replace it with some command which can start tomcat as a Admin User. I found runAs does this. I replaced the above commands with runas however, then it doesn't accept the password as command line parameter and hence, I couldn't start the MMC (Mule Management Console) application successfully. - I mapped the network drive locally and still my application within Mule > Tomcat can't read the file. - I granted access to the network folder to all, so it is not the network folder access permission issue. - I have raised this with MuleSoft already. - Mule has launched TCAT server which is another licensed product and starts tomcat as a windows service. However, I don't understand how starting tomcat as a service would fix the above 2 statements in the mule>startup.bat file. - my application in mule> tomcat environment can only access C:\
In simple statement the solution of this will be - Mule > startup.bat should call tomcat > startup.bat as Administrator and not as SYSTEM.
I have ran out of ideas. Does anyone would like to suggest something I haven't tried yet ?
Sincere Regards Rashmi