Tuesday 17 March 2015

Error cleaning old files: java.lang.NullPointerException

Hello Everyone.

Today going to discuss about the below error.

Error:


-bash-3.2$ /opt/WebSphere85/profiles/Agent01/bin/stopServer.sh adminagent
Password:
ADMU0116I: Tool information is being logged in file
           /opt/WebSphere85/profiles/Agent01/logs/adminagent/stopServer.log
ADMU0128I: Starting tool with the Agent01 profile
ADMU3100I: Reading configuration for server: adminagent
Error cleaning old files: java.lang.NullPointerException
com.ibm.rmi.ras.Utility.newWriter: could not write to orbmsg.12032015.1310.34.txt : java.io.FileNotFoundException: /home/XXX/orbmsg.12032015.1310.34.txt (Permission denied) 
com.ibm.rmi.ras.Utility.newWriter: could not write to orbtrc.12032015.1310.34.txt : java.io.FileNotFoundException: /home/XXX/orbtrc.12032015.1310.34.txt (Permission denied)


The error which is highlighted above is very common error we normally face while start up or stop of WebSphere application server, I am facing this error while stopping the adminagent.

As it's showing permission denied it means. I don't have permission on this file which needs to clean while stop. There may the following reasons of this thing

Cause:


  1. We are trying to stop the adminagent using other user than WAS, which does not have a permission to read/write this file.
  2. Some times using was user also getting same error. Means in this case you have started/stopped the adminagent [JVM] using root user previously, which changed the permissions of some files to root user and corresponding group. And now not allow WAS user to clean or replace these files.

Solution:


There is very simple solution for that.
1. Goto the  /opt/WebSphere85/profiles/ location and change the owner of the profile to was:was
2. In my case it is.
   /opt/WebSphere85/profiles/> chown -R  was:was Agent01
   Which will change the owner[user/group] of all file in Agent01 profile as was.


Hope this will work in your case also. Kindly comment for your suggestion and quires.  

"Effort only fully releases its reward after a person refuses to quit.”

 Regards,
 Akhilesh B. Humbe

1 comment:

  1. I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work.dish wash

    ReplyDelete

Popular Posts