NSS error

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

NSS error

Postby fernando » Fri Sep 12, 2014 11:21 am

I have code that runs on linux machine A (Ubuntu) but fails on linux machine B (Debian) with the following error,

[0912/111839:ERROR:nss_util.cc(714)] Error initializing NSS with a persistent database (sql:/home/XXX/.pki/nssdb): NSS error code: -8187

The only difference (besides the distribution) is that machine B has an NFS mounted home directory which (according to some bugs, http://code.google.com/p/chromium/issue ... ?id=158915) may be the issue.

I'm running this headless and am not concerned about profile information, etc. Is there any way to address this in my scenario?

Thanks.
fernando
Newbie
 
Posts: 6
Joined: Tue Sep 09, 2014 5:59 am

Re: NSS error

Postby magreenblatt » Fri Sep 12, 2014 11:33 am

Is your user temp directory on the NFS mount or are you specifying a CefSettings.cache_path value? Try specifying a value that's not on the NFS mount.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: NSS error

Postby fernando » Fri Sep 12, 2014 1:27 pm

I set cache_path to something not NFS mounted. Core parts of main() follow,

CefMainArgs main_args(argc, argv);
CefRefPtr<Application> app(new Application);
CefExecuteProcess(main_args, app.get(), NULL);
CefSettings settings;
CefString(&settings.cache_path).FromASCII("/data/XXX/cache/");
CefInitialize(main_args, settings, app.get(), NULL);
CefRunMessageLoop();
CefShutdown();

and receive the same error,

[0912/142213:ERROR:nss_util.cc(714)] Error initializing NSS with a persistent database (sql:/home/XXX/.pki/nssdb): NSS error code: -8187

Which is still referring to my home directory, not the directory set in cache_path.
fernando
Newbie
 
Posts: 6
Joined: Tue Sep 09, 2014 5:59 am

Re: NSS error

Postby magreenblatt » Fri Sep 12, 2014 1:39 pm

Looks like the NSS code is hard-coded to use your home directory in nss_util.cc (which makes sense because it's storing user credential information).
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: NSS error

Postby fernando » Fri Sep 12, 2014 2:16 pm

You're right. It looks like chromium flag "--homedir" allows you to change the value of "base::DIR_HOME". Do you know if there's some way to pass this up through cef? Throwing that switch does not seem to respect the new path.
fernando
Newbie
 
Posts: 6
Joined: Tue Sep 09, 2014 5:59 am

Re: NSS error

Postby magreenblatt » Fri Sep 12, 2014 2:28 pm

The "homedir" switch appears to only be supported on ChromeOS. The implementation is here. We could do something similar in CefMainDelegate::PreSandboxStartup() but it's probably better just to set the HOME environment variable to something on the local disk before running the CEF-based application.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 21 guests