[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] Condor + Excel + Perl + OLE/COM + Open + Administrator ?= 0x800a03ec



TL, DR:  Is there any log I can read in Windows 2008 Server R2 Enterprise which might clue me in to a permissions/security violation when an OLE command fails?  (Excel is Excel 2010 64-bit)

 

I’ve got a pool of Condor machines.

I’ve got a big (Perl) script I run in Condor which ultimately generates an Excel workbook.

 

Our jobs are set up to run_as_owner, and the whoami at the top of the batch file confirms that it’s executing as me.

Our Windows user accounts are members of the Administrators group on each of the machines in the pool.

It’s been brought to our attention that we can’t do that anymore – we have to remove our user accounts from the Administrator group.

And, predictably, that breaks things. 

 

I stripped down the script to the essentials.  Now I’m:

1)      Passing in the CSV as part of the Condor job

2)      Reading it line by line (to test whether it’s a filesystem permissions issue), then closing the filehandle behind me

3)      Starting a new Excel instance (via Win32::OLE)

4)      Opening the CSV file with my Excel instance.

 

When I run via Condor with my user account in the Administrators group, it works.

When I run via Condor without my user account in the Administrators group, step 4 fails with:

NOTIFY (Fri Mar 13 17:00:08 2015) (+0 seconds): About to open C:\condor\execute\dir_5020\a.csv (9538243B)... 

ERROR (Fri Mar 13 17:00:08 2015) (+0 seconds): C:\condor\execute\dir_5020\a.csv failed to open; $LastError is OLE exception from "Microsoft Excel":

 

Microsoft Excel cannot access the file 'C:\condor\execute\dir_5020\a.csv'.

There are several possible reasons:

 

• The file name or path does not exist.

• The file is being used by another program.

• The workbook you are trying to save has the same name as a currently open

workbook.

 

Win32::OLE(0.1709) error 0x800a03ec

    in METHOD/PROPERTYGET "Open"

 

My favorite part: When I RDP into the test box, manually create a directory under c:\condor\execute, populate it with the scripts, and run the script locally, it works fine _even when I’m not in the Administrators group_.  C’mon.

 

Stuff I’ve already tried:

1)      It’s not the C:\Windows\SysWOW64\config\systemprofile\Desktop thing – I already have that directory.

2)      I messed with DCOM configuration as documented in the first answer here: http://stackoverflow.com/questions/1981395/windows-7-net-excel-saveas-error-exception-from-hresult-0x800a03ec  The only thing that changed was when I went to Identity under Microsoft Excel Application; when I set it to be the Interactive User, I couldn’t get the Excel instance to start at all (Step 3 failed, not Step 4.)

 

I don’t even know where to look next.  Any thoughts?