I have developed a vSphere web client plugin under vSphere 6.0. In my plugin, I want to write logs using JAVA Logging to the directory c:\test\log\. At first, I ran my plugin on Windows Server 2008 R2, and this is a single server without domain (not in the Active Directory), It is succeed to write logs.
But when I ran my plugin on Windows Server 2012 R2 with domain (in the Active Directory), It is failed to write logs.
After checking the web client logs, I found the following errors:
[2015-11-06T17:52:20.451+09:00] [ERROR] P Connection(2)-172.16.8.231 System.err java.io.IOException: Couldn't get lock for C:\test\log\command
[2015-11-06T17:52:20.452+09:00] [ERROR] P Connection(2)-172.16.8.231 System.err at java.util.logging.FileHandler.openFiles(FileHandler.java:389)
[2015-11-06T17:52:20.452+09:00] [ERROR] P Connection(2)-172.16.8.231 System.err at java.util.logging.FileHandler.<init>(FileHandler.java:363)
I suspected that maybe this is a problem about permission, So I check the properties of the successful log file on Windows Server 2008 R2:
As the picture shows, I think the account who wrote the log is NT Service\vspherewebclientsvc, which is the virtual logon account of vSphere Web Client Service. It is the new feature of vSphere 6.0 and I can not find the permission of this account. but since It is succeed to write the log files under the Windows Server 2008 R2, I think this account has the permission to write files to c:\test\log\.
I am so confused with this problem, the reason is related to windows server version? or the Active Directory? Can anybody help me?
Thank you.