Monday, September 24, 2007

Fix Views after Upgrading ClearCase Client

After upgrading ClearCase client from 2003.6 to 7, my local snapshot view report the following error when accessing it.

C:\ccase\views\qinl_rel14.0>cleartool update
cleartool: Error: Operation "view_get_prop(VIEW_PROP_WEBVIEW)" failed: view storage directory or control files unavailable --
additional information may be present in the view server host's view log.
cleartool: Warning: Unable to open snapshot view "C:\ccase\views\qinl_rel14.0".
cleartool: Error: 'C:\ccase\views\qinl_rel14.0' is not a valid snapshot view path.

The cause is the during ClearCase upgrade, the albd service account id and group id also changed. If the ClearCase administrators group name has changed or you have moved a view to a new domain that has a different SID for this group, then the -replace_server_process_group switch is required for fix_prot utility.

Kill the view_server process first. Then run,

C:\ccase\views\qinl_rel14.0>"C:\Program Files\Rational\ClearCase\etc\utils\fix_prot" -replace_server_process_group c:\ccase\view_stg\qinl_rel14.0.vws
Re-protect "c:\ccase\view_stg\qinl_rel14.0.vws"? [no] y
Reprotection complete.


Remove the view shortcut, and added back again. Everything is back to normal.

C:\ccase\views\qinl_rel14.0>cleartool lsview -l qinl_rel14.0
Tag: qinl_rel14.0
Global path: \\Cbad4-xcidh3\view_stg\qinl_rel14.0.vws
Server host: Cbad4-xcidh3
Region: windows
Active: NO
View tag uuid:9396be72.f06c41d3.9db4.a4:68:8d:06:15:e9
View on host: Cbad4-xcidh3
View server access path: C:\ccase\view_stg\qinl_rel14.0.vws
View uuid: 9396be72.f06c41d3.9db4.a4:68:8d:06:15:e9
View attributes: snapshot
View owner: AD\qinl

Friday, September 7, 2007

ClearCase credential manager cannot be started

After successfully using CC for sometime, a developer got a serials of weird ClearCase problems on the only Windows 2003 server running CC client. Such as:

ClearCase credencial manager service cannot start, even after clearn re-installation;

Sometmies ClearCase explorer hangs at start up;

The snapshot views hanged during update;

After click on the snapshot view shortcut in CC explorer, it hangs for a long time, then prompts "Timed out trying to start view_server for view ...";

When right click on the elements in a snapshort view in Windows explorer, Windows explorer hangs;

CC explorer hangs when click on "finish" button to create a view (both snapshot and dynamic);

Problem adding dynamic view shortcut to CC explorer, it reports "The name specified is not a registered view tag";

Some dynamic views can start up properly while other hangs. Once the dynamic views started, it can check-out/in.

....

The vob server is on Solaris, the view storage is locally on the Windows 2003 server. After some drill down, we noticed that some ccgzip.exe processes were running in Task Manager. And the updating of snapshort view always stopped at elements with type compressed_file. To help investiation, we also installed procmon to capture the processes status.

It turned out that our PATH env variable is too long, and ClearCase bin folder happens to be the last one in the string. So some the dlls the ccgzip program referred to cannot be located. After moving the ClearCase bin folder to the beginning of the PATH string, everything works like a charm.

.pid file under view storage

After the view is started, a .pid file is created under the view storage directory. The pid of its view_server process is stored in the file, so ClearCase can keep track on which view server process is associated with it. After the view_server process is terminated by "cleartool endview -server ", the .pid file will be removed by ClearCase.

However, in certain situatations, the .pid fails to be removed and the view will have problem starting up again. You can safely delete the .pid file and try to start the view again.