Scheduled FB project fails to lock ClearCase stream if user is not logged-in

The issue happens definitely if the user, which owns a scheduled FB project, is not logged-in when the project runs. If the user is logged-in (even disconnected), the project runs successfuly.

The excerpt from the log follows:

---------------|--------------------------|---------------------------------------------------------------------------------|------------|----------|----------|
Status         | Action Name              | Description                                                                     | Start Time | End Time | Run Time |
---------------|--------------------------|---------------------------------------------------------------------------------|------------|----------|----------|
               | Action List              | Main                                                                            | 09:20:04   | 09:20:04 | 00:00:00 |
---------------|--------------------------|---------------------------------------------------------------------------------|------------|----------|----------|
Error          | ClearCase Lock (Objects) | ClearCase Lock (Objects)                                                        | 09:20:04   | 09:20:04 | 00:00:00 |
---------------|--------------------------|---------------------------------------------------------------------------------|------------|----------|----------|
Starting Directory: C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin\
Command Line: lock -replace -nusers eandcservice@e_and_c,building@e_and_c -nc stream:2.18.7_Integration@\projects
Executing external process: C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin\cleartool.exe
Starting Directory: C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin\
Parameters: lock -replace -nusers eandcservice@e_and_c,building@e_and_c -nc stream:2.18.7_Integration@\projects
Impersonating User: eandcservice@E_and_C
Output from C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin\cleartool.exe

Action Failed
C:\Program Files (x86)\IBM\RationalSDLC\ClearCase\bin\cleartool.exe returned : -1073741502

The ClearTool exit code is 0xC00000142 which means: failed to initialize...

Some additional info (in case you need it):

1. I’m connected to the system where I run the test FB project successfully via RDP (mstsc.exe), using the credentials of the FB project owner.
2. ClearTool version is: 7.1.1.3

Hi Dani

This looks like cleartool.exe is unable to access a resource (i.e. a mapped drive) or a clear case view that is only available when the build user is logged on.

Unfortunately we do not have a copy of Clear Case available to test this.

My first suggestion would be to create a scheduled task that runs this command and schedule it to run while the user is logged off to see if this is reproducible from the command line.

Regards,
Steve

Hi Steve,
First, my name is Benzi. Dani Peer was the contact for buying FB for our company but since then he left the company. I’m just using his existing FB account.

And now, regarding your first suggestion, I already did the test you suggested (put the ClearTool command in a batch file Lock.bat and executed it as a task when the user was logged off) and… it succeeded. That’s why I thought (and I still think) that it’s a problem with FB.

Please note that the FB action actually runs as another (impersonated) user which is authorized to perform such tasks in our ClearCase. When I ran the command via Lock.bat, I ran it as this authorized user in the Task Scheduler. Could this be the problem?

Another interesting fact that I saw was that the task which was configured in the FB Scheduler was defined in the Task Scheduler for: “Windows Server 2003, Windows XP, or Windows 2000”. If I create a task directly in the Task Scheduler, this configuration is not available at all and I typically select the configuration for “Windows 7, Windows Server 2008 R2”. I tried the Lock.bat test with both configurations and as I said above, it succeeded.

Just another fact that maybe has some influence (I don’t see how) is the fact that the OS of our ClearCase server is Windows 2000 SP4.

I hope that this helps.

Best regards,
Benzi Eilon

Hi Benzi

The FinalBuilder Clear Case actions simply call the executable, passing the parameters specified in the action dialog. There really is nothing extra happening behind the scenes.

I believe that this has to be some sort of permission issue. The next step would be to create a FinalBuilder project with only this action in it and schedule the project to run, specify the user that has Clear Case authorisation as the user to run the project.

Let me know how this goes.

Regards,
Steve

Hi Steve,
The test project which I described in this post is exactly what you asked me to do in your last reply. This project contains just the two actions which perform the ClearCase lock, one via the command and the other via a small Lock.bat file (which contains only the cleartool command). I enabled just one of them at a time, ran the proect twice but as I explained, both runs failed. But if I execute the Lock.bat file directly from the task scheduler, it succeeds.

I agree that this is a permission issue but it looks like the issue is the result of the way FB performs this action when the user is logged off.

I took the trouble to run my test project on a Windows XP workstation and it worked. This narrows the issue to Windows 7 X64 system.

If you want, I can send you the test project for examination. Just let me know how to do it (size of zipped file is 32 KB).

Regards,
Benzi

Hi Benzi

The fact that this works on Windows XP and not on Windows 7 sounds to me like this is a UAC issue. Here is the link to the FinalBuilder knowledge base article on UAC:
https://www.finalbuilder.com/forum.aspx?aft=10353

Could you please confirm that UAC is disabled on your Windows 7 machine?

Regards,
Steve

I verified with my system manager that UAC was already canceled by default using group policy.He has also suppressed all elevation consent requests and notifications. Still, the test project fails.

Hi Benzi

Does the Clear Case user have logon access to either of these machines? It looks like the Clear Case user cannot access profile data when the action process is created in a non-interactive session. I would create a user that has logon access to the build machine and to clear case and run the entire project as this user.

Regards,
Steve

Hi Steve,
Sorry for the late reply. I was quite busy elsewhere…

Re: It looks like the Clear Case user cannot access profile data when the action process is created in a non-interactive session
As I told you before, the ClearCase user can access the profile data if the Lock.bat task is executed by the task scheduler. It failed only when it was executed as an FB action.

Re: I would create a user that has logon access to the build machine and to clear case and run the entire project as this user.
I just did it. Logged in as the ClearCase user, copied the Lock.bat FB project to my folder, modified it to execute the action by the default user, set a scheduled FB task for it and logged off. It succeeded!!!

This again means that FB has some problem when this action is run as another user and the FB project owner is logged off.