Thursday, 30 August 2018
WebSphere on Windows - Return Code 15
I've just spent a happy few hours trying to work out why various WebSphere Application Server (WAS) commands such as wsadmin.bat etc. refuse to properly run on a Windows Server 2012 box.
As per a previous blog post: -
I'm running IBM BPM 8.6 ( via WebSphere Application Server 220.127.116.11 ) against Microsoft SQL Server 2012.
For good security reasons, the WAS to SQL Server connection is via a trusted Service Account ( leveraging Integrated Security ), which means that any WAS to SQL Server interactions need to be run as that user.
Therefore, to perform the bootstrap process ( bootstrapProcessServerData.bat ), I need to run a command window ( CMD.EXE ) as the Service Account: -
runas.exe /user:<DOMAIN>\<USER> cmd.exe
which worked a treat.
However, when I ran the bootstrap process OR ANY OTHER SIMILAR WAS COMMAND …..
I got …..
By that, I mean that the command simply ran and then quit, without actually doing anything.
Similarly, the wsadmin.bat command failed in a similar way.
I knew it was permissions-related, as the wsadmin.bat command ran OK if I simply ran it from a CMD.EXE prompt ( which I started using Run As Administrator ( from the right-hand mouse button )
Obviously, I had no choice as I needed to run the bootstrap as the Service Account, rather than simply as Administrator.
I ( perhaps stupidly ) wanted to find out why ….
I spent ages tinkering with various .BAT files, including wsadmin.bat etc. but the closest I got was a RC=15 from the wsadmin command …..
In the end, I gave in and simply gave the Service Account access to the \Program Files\IBM\WebSphere\AppServer\profiles\DmgrProfile path ( Full Control ).
At a guess, I suspect that the wsadmin commands, and similar, were trying to write to, say, ..\temp and ..\workspace and ..\temp under the DM profile …
But that's a guess …….