2014-12-05 65 views
2

在我的機器上設置Google Cloud的託管虛擬機環境時出現錯誤。這裏是我是如何調用的命令:gcloud預覽app setup-managed-vms給出錯誤 - 500服務器錯誤:內部服務器錯誤

$ gcloud preview app setup-managed-vms 
Select the runtime to download the base image for: 
[1] Java 
[2] Python27 
[3] Go 
[4] All 
Please enter your numeric choice (4): 2 

Pulling base images for runtimes [python27] from Google Cloud Storage 
Pulling image: google/appengine-python27 
Traceback (most recent call last): 
    File "/home/tuxdna/software/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 175, in <module> 
    main() 
    File "/home/tuxdna/software/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 171, in main 
    _cli.Execute() 
    File "/home/tuxdna/software/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 385, in Execute 
    post_run_hooks=self.__post_run_hooks, kwargs=kwargs) 
    File "/home/tuxdna/software/google-cloud-sdk/./lib/googlecloudsdk/calliope/frontend.py", line 274, in _Execute 
    pre_run_hooks=pre_run_hooks, post_run_hooks=post_run_hooks) 
    File "/home/tuxdna/software/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 928, in Run 
    result = command_instance.Run(args) 
    File "/home/tuxdna/software/google-cloud-sdk/lib/googlecloudsdk/appengine/app_commands/setup_managed_vms.py", line 39, in Run 
    args.image_version) 
    File "/home/tuxdna/software/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/pull.py", line 54, in PullBaseDockerImages 
    util.PullSpecifiedImages(docker_client, image_names, version, bucket) 
    File "/home/tuxdna/software/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/util.py", line 232, in PullSpecifiedImages 
    'Error pulling {image}: {e}'.format(image=image_name, e=e)) 
googlecloudsdk.appengine.lib.images.util.DockerPullError: Error pulling google/appengine-python27: 500 Server Error: Internal Server Error ("Invalid registry endpoint https://localhost:49154/v1/: Get https://localhost:49154/v1/_ping: read tcp 127.0.0.1:49154: connection reset by peer. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry localhost:49154` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/localhost:49154/ca.crt") 

在服務器日誌中我看到:

$ tail -f /var/log/messages 
....OUTPUT SKIPPED.... 
Dec 6 01:02:40 localhost docker: [error] server.go:1207 Handler for POST /images/create returned error: Invalid registry endpoint https://localhost:49154/v1/: Get https://localhost:49154/v1/_ping: read tcp 127.0.0.1:49154: connection reset by peer. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry localhost:49154` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/localhost:49154/ca.crt 
Dec 6 01:02:40 localhost docker: [error] server.go:110 HTTP Error: statusCode=500 Invalid registry endpoint https://localhost:49154/v1/: Get https://localhost:49154/v1/_ping: read tcp 127.0.0.1:49154: connection reset by peer. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry localhost:49154` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/localhost:49154/ca.crt 
Dec 6 01:02:40 localhost docker: [info] POST /v1.10/containers/3581906e323a639e634961795e2877cf8afd5431f09db5962c9b10a825363605/kill 
....OUTPUT SKIPPED.... 

現在關於機/泊塢窗的設置,我有以下設置泊塢窗上的Fedora 20爲顯示:

$ docker --tlsverify -H tcp://localhost:4243 info 
Containers: 14 
Images: 91 
Storage Driver: devicemapper 
Pool Name: docker-253:1-1704138-pool 
Pool Blocksize: 65.54 kB 
Data file: /var/lib/docker/devicemapper/devicemapper/data 
Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata 
Data Space Used: 3.783 GB 
Data Space Total: 107.4 GB 
Metadata Space Used: 6.14 MB 
Metadata Space Total: 2.147 GB 
Library Version: 1.02.85 (2014-04-10) 
Execution Driver: native-0.2 
Kernel Version: 3.17.3-200.fc20.x86_64 
Operating System: Fedora 20 (Heisenbug) 

我也有設置TLS如下所述:

所以,現在我可以這樣做:

$ docker --tlsverify -H tcp://localhost:4243 images 
REPOSITORY     TAG     IMAGE ID   CREATED    VIRTUAL SIZE 
gcloud-credentials-image  latest    a8e7cda4c92c  13 hours ago  2.434 MB 
ubuntu      14.04    86ce37374f40  9 days ago   192.7 MB 
fedora      latest    7d3f07f8de5f  9 weeks ago   374.1 MB 

$ docker --tlsverify -H tcp://localhost:4243 ps -a 
CONTAINER ID  IMAGE        COMMAND    CREATED    STATUS      PORTS      NAMES 
9fbb4918103b  google/docker-registry:latest  "/bin/sh -c 'cd /doc 13 hours ago  Exited (-1) 13 hours ago        jovial_nobel      
48b994c1bfb0  gcloud-credentials-image:latest "/true"    13 hours ago  Exited (0) 13 hours ago        gcloud-credentials-1417757452.28 
25c1be92b411  google/docker-registry:latest  "/bin/sh -c 'cd /doc 14 hours ago  Exited (0) 14 hours ago        pensive_heisenberg  

什麼我錯在這裏做什麼?

在此先感謝。

+0

我也有類似的麻煩,但在我的情況下不會出現TLS問題 – 2014-12-05 22:53:10

回答

0

在您發佈的錯誤輸出中,它顯示它正嘗試連接端口49154,您似乎能夠訪問本地主機上的圖像4243。有什麼辦法可以讓這些端口號相互一致嗎?