Unable to start deployment manager in WAS – com.ibm.ejs.ras.RasException

Unable to start deployment manager in WAS – com.ibm.ejs.ras.RasException

Issue – Unable to start up the deployment manager in Websphere due to below exception

Exception – [6/22/14 2:52:08:562 EDT] 0000000a WsServerImpl  E   WSVR0009E: Error occurred during startup
META-INF/ws-server-components.xml
[6/22/14 2:52:08:601 EDT] 0000000a WsServerImpl  E   WSVR0009E: Error occurred during startup
com.ibm.ws.exception.ConfigurationError: com.ibm.ws.exception.ConfigurationError: com.ibm.ejs.ras.RasException: Ras does not have necessary permission to write file SystemOut.log to directory /opt/WebSphere61/profiles/Dmgr01/logs/dmgr/SystemOut.log
        at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:185)
        at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:140)
        at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:461)
        at com.ibm.ws.runtime.WsServer.main(WsServer.java:59)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:183)
        at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:90)
        at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:72)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
        at org.eclipse.core.launcher.Main.run(Main.java:977)
        at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:329)
        at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:92)
Caused by: com.ibm.ws.exception.ConfigurationError: com.ibm.ejs.ras.RasException: Ras does not have necessary permission to write file SystemOut.log to directory /opt/WebSphere61/profiles/Dmgr01/logs/dmgr/SystemOut.log

Cause – The startup script was unable to write to the SystemOut.log as it was owned by ROOT user. But the startup script was being run by a different user (WAS). This might have happened because of running the ./startManager.sh using the root credentials which updated the file ownerships.
Resolution – 
Changed the Owner ship of the files at /opt/WebSphere to WAS
# chown -R was:was /opt/WebSphere61/
Before change – 
bash-3.00# cd /opt/WebSphere61/profiles/Dmgr01/logs/
-rw-r–r–   1 was      was        16363 Sep 13  2012 stopServer.log
-rw-r–r–   1 was      was      1048542 Oct 20  2013 SystemOut_13.10.20_02.27.27.log
-rw-r–r–   1 was      was      1048514 Oct 20  2013 SystemErr_13.10.20_03.45.58.log
-rw-r–r–   1 root     root      154395 Nov 17  2013 SystemErr.log
-rw-r–r–   1 root     root        1771 Apr  1 05:47 serverStatus.log
-rw-r–r–   1 root     root      819314 Jun  3 02:32 SystemOut.log
-rw-r–r–   1 was      was           14 Jun  3 02:32 fileRepositoryCellLevel.epoch
-rw-r–r–   1 was      was        24765 Jun 22 03:00 startServer.log
-rw-r–r–   1 was      was        26156 Jun 22 03:00 native_stdout.log
-rw-r–r–   1 was      was        13124 Jun 22 03:00 native_stderr.log
After change – 
-rw-r–r–   1 was      was        16363 Sep 13  2012 stopServer.log
-rw-r–r–   1 was      was      1048542 Oct 20  2013 SystemOut_13.10.20_02.27.27.log
-rw-r–r–   1 was      was      1048514 Oct 20  2013 SystemErr_13.10.20_03.45.58.log
-rw-r–r–   1 was      was       154395 Nov 17  2013 SystemErr.log
-rw-r–r–   1 was      was         1771 Apr  1 05:47 serverStatus.log
-rw-r–r–   1 was      was       819314 Jun  3 02:32 SystemOut.log
-rw-r–r–   1 was      was           14 Jun  3 02:32 fileRepositoryCellLevel.epoch
-rw-r–r–   1 was      was        24765 Jun 22 03:00 startServer.log
-rw-r–r–   1 was      was        26156 Jun 22 03:00 native_stdout.log
-rw-r–r–   1 was      was        13124 Jun 22 03:00 native_stderr.log
After the file ownership was change i was able to startup the deployment as below script
#./opt/WebSphere61/profiles/Dmgr01/startManager.sh
Hope you enjoyed reading this article. Thank you.