IBM Support

Unable to establish connection to snapshot view

Troubleshooting


Problem

This technote explains why the error []Error: Unable to establish connection to snapshot view[] might occur when using IBM® Rational® ClearCase® to list elements in a VOB within a snapshot view context.

Symptom

Strange behavior exhibited in a snapshot view where a cleartool ls command fails with the following error:

cleartool ls                                          
cleartool: Error: Unable to find view by                                      
uuid:2f49682b.e2f14ee8.af9b.19:ca:66:13:91:1b, last known at                  
"<viewhost>:<stg_path>".                                                      
cleartool: Error: Unable to establish connection to snapshot view            
"2f49682b.e2f14ee8.af9b.19:ca:66:13:91:1b": ClearCase object not found        
cleartool: Warning: Unable to open snapshot view          

You may also see the following error while attempting to list the elements in the VOB (refer to the example below):


cleartool: Error: Pathname is not within a VOB: "."

Cause

Clearfsimport was performed in the snapshot view and the view.dat file was mistakenly added to source control.

This can happen if you import data from an existing snapshot view root into a VOB (using clearfsimport for example). If this view.dat file exists in a VOB directory, the cleartool ls command will fail.

Resolving The Problem

Search for view.dat file in the VOB.

Note: If your search is run from the command line, be sure to use dir /Ah as the file could be hidden.

  • If the file is listed and under source control, remove it by using the cleartool rmelem command.
  • If the file is listed and not under source control (it is view-private), simply delete it.

Review the ClearCase Developing Software manual on the topic of How snapshot views are distinguished from standard directories for more information about the view.dat file.

=======================================================

The following example shows the steps taken that cause the above error along with the resolution steps.

EXAMPLE:

  • List the snapshot root directory to display the view.dat file. This special file exists in the view root directory by design to identify the view root directory.
    C:\cc-views\sn-view-root\SCII-snap>dir /Ah
     Volume in drive C has no label.
     Volume Serial Number is 8017-F8A8

     Directory of C:\cc-views\sn-view-root\SCII-snap

    09/04/2007  02:18 PM                82 view.dat
                   1 File(s)             82 bytes
                   0 Dir(s)  74,360,901,632 bytes free
  • Run clearfsimport to import files into the "aug2007" VOB (in this example we are only importing the view.dat file for simplicity):
    C:\cc-views\sn-view-root\SCII-snap>clearfsimport *.* aug2007
    Validating directory "aug2007".
    Creating element "aug2007\view.dat".
    Loading "aug2007\view.dat" (82 bytes).
        version "\main\1".
    Closing directories.
    Making dir "aug2007".
    Checked in version "\main\2" of directory "aug2007"
  • cd into the VOB to list the newly imported elements:
    C:\cc-views\sn-view-root\SCII-snap>cd aug2007

    C:\cc-views\sn-view-root\SCII-snap\aug2007>cleartool ls -l
    cleartool: Error: Pathname is not within a VOB: "."  <= The error

    C:\cc-views\sn-view-root\SCII-snap\aug2007>dir
     Volume in drive C has no label.
     Volume Serial Number is 8017-F8A8
  • Below you can see that the view.dat file exists in the root of the VOB as a result of the import:

  •  Directory of C:\cc-views\sn-view-root\SCII-snap\aug2007

    09/04/2007  02:28 PM    <DIR>          .
    09/04/2007  02:28 PM    <DIR>          ..
    09/04/2007  02:20 PM               992 a.txt
    09/04/2007  02:18 PM               478 b.txt
    09/04/2007  02:18 PM               478 c.txt
    09/04/2007  02:18 PM    <DIR>          lost+found
    09/04/2007  02:28 PM                82 view.dat
                   4 File(s)          2,030 bytes
                   3 Dir(s)  74,360,713,216 bytes free
  • An attempt to remove the element using the rmelem command fails:
    C:\cc-views\sn-view-root\SCII-snap\aug2007>cleartool rmelem view.dat
    cleartool: Error: Not an object in a vob: "view.dat".
  • The following steps can be taken to successfully remove the view.dat file from the VOB:
    1. From Windows Explorer display the properties of the view.dat file located in the snapshot view under the VOB root directory, remove the read-only attribute and then delete the file.

      As you can see from the output below, the listing now displays the view.dat file as [loaded but missing] as a result of the above step (this is expected).

      C:\cc-views\sn-view-root\SCII-snap\aug2007>cleartool ls -l
      version                a.txt@@\main\2                         Rule: element * \main\LATEST
      version                b.txt@@\main\1                         Rule: element * \main\LATEST
      version                c.txt@@\main\1                         Rule: element * \main\LATEST
      directory version      lost+found@@\main\0                    Rule: element * \main\LATEST
      version                view.dat@@\main\1 [loaded but missing] Rule: element * \main\LATEST
    2. The view.dat element can now be removed using the cleartool rmelem command:

      C:\cc-views\sn-view-root\SCII-snap\aug2007>cleartool rmelem view.dat
      CAUTION! This will destroy the element, all its branches and versions, including all data, meta-data and history, and will remove the element from all directory versions that now contain it.  Once you destroy the element, there will be no way to restore it to its current state.
      If you want to preserve the element, but remove references to it from future directory versions, use the "rmname" command.

      Element "view.dat" has 1 branches, 2 versions, and is entered in 1 directory versions.
      Destroy element?  [no] y
      Unloaded "aug2007\view.dat".
      Removed element "view.dat".

      C:\cc-views\sn-view-root\SCII-snap\aug2007>cleartool ls -l
    version                a.txt@@\main\2                         Rule: element * \main\LATEST
    version                b.txt@@\main\1                         Rule: element * \main\LATEST
    version                c.txt@@\main\1                         Rule: element * \main\LATEST
    directory version      lost+found@@\main\0                    Rule: element * \main\LATEST

[{"Product":{"code":"SSSH27","label":"Rational ClearCase"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"View: Snapshot","Platform":[{"code":"PF033","label":"Windows"}],"Version":"2003.06.16;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 September 2018

UID

swg21269135