[OpenAFS-devel] pr_Initialize falis when called within a simple application

Derrick J Brashear shadow@dementia.org
Thu, 5 Aug 2004 16:33:35 -0400 (EDT)


On Thu, 5 Aug 2004, John Hayes wrote:

> I have recemtly begun working on an application that must use the openafs
> libraries. I am trying to put to gether a very simple test fixture to
> begin experimenting with the concept.
>
> When I call pr_Initialize it fails with the following error message:
> jhh@jhh:~/work/projects/afs_support> ./afstest jhh "};)-8" test test
> libprot: Could not locate cell msu.edu in /usr/vice/etc/CellServDB
> 70354689

translate_et 70354689
70354689 (acfg).1 = could not find entry

That would be AFSCONF_NOTFOUND

pr_Initialize calls:
         code = afsconf_GetCellInfo(tdir, cell, "afsprot", &info);
         if (code) {
             fprintf(stderr, "libprot: Could not locate cell %s in %s/%s\n",
                     cell, confDir, AFSDIR_CELLSERVDB_FILE);
             return code;
         }

The only thing interesting here is "afsprot", which in GetCellInfo 
triggers:
         if (aservice) {
             tservice = afsconf_FindService(aservice);
             if (tservice < 0) {
                 UNLOCK_GLOBAL_MUTEX return AFSCONF_NOTFOUND;    /* service 
not found */
             }


But in our serviceTable we have:
     {"afsprot", 7002,},

So I assume afsconf_Open somehow fails or fails to parse CellServDB: is it 
readable to the user you're running this as? Can you point us at a literal 
copy of the file? (like, cp it somewhere)