Definite's Extractor

My findings on Life, Linux, Open Source, and so on.

Monthly Archives: February 2015

First thing to check when encountered “java.lang.SecurityException: Cannot set up certs for trusted CAs” and “java.lang.SecurityException: Cannot locate policy or framework files!”

I ran into following error

Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
at javax.crypto.b.<clinit>(Unknown Source)
... 49 more
Caused by: java.lang.SecurityException: Cannot locate policy or framework files!
at javax.crypto.b.c(Unknown Source)
at javax.crypto.b.access$600(Unknown Source)
at javax.crypto.b$0.run(Unknown Source)
at java.security.AccessController.doPrivileged(AccessController.java:341)
... 50 more

I checked system class path and other configure path.

But as Sean pointed out, it was just I mistakenly put https instead of http

Lesson Learnt:

Check the URL first! Especially the unnecessary https.

Docker: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

When I run

docker images

on my newly setup docker in Fedora 21, it shows:

FATA[0000] Get http:///var/run/docker.sock/v1.16/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

The problem resolve after I re-login. So the error seems like that the permission is not yet applied, as I just add myself to docker group without logout.

So, if you cannot or don’t want logout just yet, use

sg docker "docker <subCommand> ..."

As long as you are in docker group in /etc/group, sg won’t ask you password.