No Golang Website Certificate
Symptom
When TF-Serving is compiled, the message "unable to find valid certification path to requested target" is displayed, indicating that no Golang certificate is available. The details are as follows:
ERROR: /home/cya/boss/tfserving/serving/WORKSPACE:77:10: fetching _go_download_sdk rule //external:go_sdk: Traceback (most recent call last):
File "/home/cya/boss/tfserving/serving/output/ba6572d0268f10026d9549fa2ae08318/external/io_bazel_rules_go/go/private/sdk.bzl", line 71, column 21, in _go_download_sdk_impl
ctx.download(
Error in download: java.io.IOException: Error downloading [https://golang.org/dl/?mode=json&include=all, https://golang.google.cn/dl/?mode=json&include=all] to /home/cya/boss/tfserving/serving/output/ba6572d0268f10026d9549fa2ae08318/external/go_sdk/versions.json: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
WARNING: errors encountered while analyzing target '//tensorflow_serving/model_servers:tensorflow_model_server': it will not be built
Key Process and Cause Analysis
No valid certificate of the requested target is available when you download the dependencies.
Conclusion and Solution
- Open the tls-ca-bundle.pem file that stores certificate information.
vi /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
- Press i to enter the insert mode and add the following content:
# GOOGLE -----BEGIN CERTIFICATE----- MIID2TCCAsGgAwIBAgIJALQPO9XxFFZmMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYD VQQGEwJjbjESMBAGA1UECAwJR3VhbmdEb25nMREwDwYDVQQHDAhTaGVuemhlbjEP MA0GA1UECgwGSHVhd2VpMQswCQYDVQQLDAJJVDEuMCwGA1UEAwwlSHVhd2VpIFdl YiBTZWN1cmUgSW50ZXJuZXQgR2F0ZXdheSBDQTAeFw0xNjA1MTAwOTAyMjdaFw0y NjA1MDgwOTAyMjdaMIGCMQswCQYDVQQGEwJjbjESMBAGA1UECAwJR3VhbmdEb25n MREwDwYDVQQHDAhTaGVuemhlbjEPMA0GA1UECgwGSHVhd2VpMQswCQYDVQQLDAJJ VDEuMCwGA1UEAwwlSHVhd2VpIFdlYiBTZWN1cmUgSW50ZXJuZXQgR2F0ZXdheSBD QTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANk9kMn2ivB+6Lp23PIX OaQ3Z7YfXvBH5HfecFOo18b9jC1DhZ3v5URScjzkg8bb616WS00E9oVyvcaGXuL4 Q0ztCwOszF0YwcQlnoLBpAqq6v5kJgXLvGfjx+FKVjFcHVVlVJeJviPgGm4/2FLh odoreBqPRAfLRuSJ5U+VvgYipKMswTXh7fAK/2LkTf1dpWNvRsoXVm692uFkGuNx dCdUHYCI5rl6TqMXht/ZINiclroQLkd0gJKhDVmnygEjwAJMMiJ5Z+Tltc6WZoMD lrjETdpkY6e/qPhzutxDJv5XH9nXN33Eu9VgE1fVEFUGequcFXX7LXSHE1lzFeae rG0CAwEAAaNQME4wHQYDVR0OBBYEFDB6DZZX4Am+isCoa48e4ZdrAXpsMB8GA1Ud IwQYMBaAFDB6DZZX4Am+isCoa48e4ZdrAXpsMAwGA1UdEwQFMAMBAf8wDQYJKoZI hvcNAQELBQADggEBAKN9kSjRX56yw2Ku5Mm3gZu/kQQw+mLkIuJEeDwS6LWjW0Hv 3l3xlv/Uxw4hQmo6OXqQ2OM4dfIJoVYKqiLlBCpXvO/X600rq3UPediEMaXkmM+F tuJnoPCXmew7QvvQQvwis+0xmhpRPg0N6xIK01vIbAV69TkpwJW3dujlFuRJgSvn rRab4gVi14x+bUgTb6HCvDH99PhADvXOuI1mk6Kb/JhCNbhRAHezyfLrvimxI0Ky 2KZWitN+M1UWvSYG8jmtDm+/FuA93V1yErRjKj92egCgMlu67lliddt7zzzzqW+U QLU0ewUmUHQsV5mk62v1e8sRViHBlB2HJ3DU5gE= -----END CERTIFICATE-----
- Press Esc, type :wq!, and press Enter to save the file and exit.
Parent topic: Troubleshooting