bumplzz69 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

cacerts.txt error in 2015.04.14 #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$ gcloud preview app deploy dir

  ...
  File "/home/user/appengine/google-cloud-sdk/./lib/httplib2/__init__.py", line 80, in _ssl_wrap_socket
    cert_reqs=cert_reqs, ca_certs=ca_certs)
  File "/usr/lib/python2.7/ssl.py", line 912, in wrap_socket
    ciphers=ciphers)
  File "/usr/lib/python2.7/ssl.py", line 521, in __init__
    self._context.load_verify_locations(ca_certs)
IOError: [Errno 2] No such file or directory

I added a print statement to figure out which file it tries to read.

/home/user/appengine/google-cloud-sdk/lib/googlecloudsdk/appengine/lib/cacerts/c
acerts.txt

$ ls /home/user/appengine/google-cloud-sdk/lib/googlecloudsdk/appengine/lib/
appcfg                 appengine_client.py   external   
generate_source_context.py  __init__.pyc  yaml_parsing.py
appengine_adapter.py   appengine_client.pyc  flags.py   images                  
    util.py       yaml_parsing.pyc
appengine_adapter.pyc  docker                flags.pyc  __init__.py             
    util.pyc

As you can tell, no cacerts directory.

Original issue reported on code.google.com by pdknsk on 15 Apr 2015 at 7:37

GoogleCodeExporter commented 9 years ago
Thanks for the report.  Can you please attach the output of `gcloud info` 
including the version of Python you are running?

Original comment by markp...@google.com on 15 Apr 2015 at 8:54

GoogleCodeExporter commented 9 years ago
Google Cloud SDK [0.9.56]

Platform: [Linux, x86_64]
Python Version: [2.7.9 (default, Apr  2 2015, 15:33:21)  [GCC 4.9.2]]
Site Packages: [Disabled]

Installation Root: [/home/user/appengine/google-cloud-sdk]
Installed Components:
  core: [2015.04.14]
  app-engine-python: [1.9.18]
  core-nix: [2014.10.20]
  compute: [2015.04.14]
  app-engine-go-linux-x86_64: [1.9.18]
  app-engine-java: [1.9.18]
  gsutil-nix: [4.6]
  app-engine-managed-vms: []
  gsutil: [4.11]
  preview: [2015.04.14]
  app: [2015.04.14]

Original comment by pdknsk on 15 Apr 2015 at 8:58

GoogleCodeExporter commented 9 years ago
We just put out a patch release to address this.  Running `gcloud components 
update` should get you a working version.

Original comment by markp...@google.com on 15 Apr 2015 at 11:36

GoogleCodeExporter commented 9 years ago
Still have the same error. It still tries to read the same file. (I copied it 
manually for now.)

Google Cloud SDK [0.9.56]

Platform: [Linux, x86_64]
Python Version: [2.7.9 (default, Apr  2 2015, 15:33:21)  [GCC 4.9.2]]
Site Packages: [Disabled]

Installation Root: [/home/user/appengine/google-cloud-sdk]
Installed Components:
  core: [2015.04.15]
  app-engine-python: [1.9.18]
  core-nix: [2014.10.20]
  compute: [2015.04.14]
  app-engine-go-linux-x86_64: [1.9.18]
  app-engine-java: [1.9.18]
  gcloud: [2015.04.14]
  gsutil-nix: [4.6]
  gcloud-extensions-linux-x86_64: [0.14.1]
  beta: [2015.04.09]
  app-engine-managed-vms: []
  gsutil: [4.11]
  preview: [2015.04.14]
  app: [2015.04.15]

A list of all cacerts.txt on my system.

$ sudo find / -iname cacerts.txt
/home/user/appengine/google-cloud-sdk/platform/google_appengine/lib/httplib2/htt
plib2/cacerts.txt
/home/user/appengine/google-cloud-sdk/platform/google_appengine/lib/cacerts/cace
rts.txt
/home/user/appengine/google-cloud-sdk/platform/gsutil/third_party/httplib2/pytho
n3/httplib2/cacerts.txt
/home/user/appengine/google-cloud-sdk/platform/gsutil/third_party/httplib2/pytho
n2/httplib2/cacerts.txt
/home/user/appengine/google-cloud-sdk/platform/gsutil/third_party/boto/boto/cace
rts/cacerts.txt
/home/user/appengine/google-cloud-sdk/platform/gsutil/gslib/data/cacerts.txt
/home/user/appengine/google-cloud-sdk/.install/.backup/platform/google_appengine
/lib/httplib2/httplib2/cacerts.txt
/home/user/appengine/google-cloud-sdk/.install/.backup/platform/google_appengine
/lib/cacerts/cacerts.txt
/home/user/appengine/google-cloud-sdk/.install/.backup/platform/gsutil/third_par
ty/httplib2/python3/httplib2/cacerts.txt
/home/user/appengine/google-cloud-sdk/.install/.backup/platform/gsutil/third_par
ty/httplib2/python2/httplib2/cacerts.txt
/home/user/appengine/google-cloud-sdk/.install/.backup/platform/gsutil/third_par
ty/boto/boto/cacerts/cacerts.txt
/home/user/appengine/google-cloud-sdk/.install/.backup/platform/gsutil/gslib/dat
a/cacerts.txt
/home/user/appengine/google-cloud-sdk/.install/.backup/lib/httplib2/cacerts.txt
/home/user/appengine/google-cloud-sdk/lib/httplib2/cacerts.txt
/home/user/.local/lib/python2.7/site-packages/httplib2/cacerts.txt

Original comment by pdknsk on 16 Apr 2015 at 2:19

GoogleCodeExporter commented 9 years ago
PS. The list of files is before I copied it manually of course.

Original comment by pdknsk on 16 Apr 2015 at 2:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Current workaround:

cd path/to/google-cloud-sdk

mkdir -p lib/googlecloudsdk/appengine/lib/cacerts
cp ./lib/httplib2/cacerts.txt lib/googlecloudsdk/appengine/lib/cacerts

Original comment by e...@skytruth.org on 16 Apr 2015 at 3:36

GoogleCodeExporter commented 9 years ago
Thanks for the feedback. Can you try making a fresh installation (using the 
instructions here: https://cloud.google.com/sdk/) and see if you still have the 
same problem?

Original comment by vil...@google.com on 16 Apr 2015 at 3:49

GoogleCodeExporter commented 9 years ago
I did a reinstall, which I'm sure is effectively the same, and the
problem remains.

$ gcloud components reinstall

Original comment by pdknsk on 16 Apr 2015 at 3:55

GoogleCodeExporter commented 9 years ago
Since you have manually modified/added file(s) in your current installation, I 
would try this again with a fresh installation to make sure nothing strange is 
going on.

Original comment by vil...@google.com on 16 Apr 2015 at 9:45

GoogleCodeExporter commented 9 years ago
Same problem. Just for reproducibility, this is what I did.

wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz
tar -zvxf google-cloud-sdk.tar.gz
cd google-cloud-sdk/
./install.sh
gcloud components list
gcloud components remove bq dns sql compute gcutil
gcloud components update app beta

Original comment by pdknsk on 16 Apr 2015 at 10:06

GoogleCodeExporter commented 9 years ago
2015.04.21 works.

Original comment by pdknsk on 22 Apr 2015 at 8:33