Quentin123345 / google-cloud-sdk

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

Deploying Managed VM: Hang on "Sending auth config" #456

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Issue running command [gcloud preview app deploy].

What is the expected output? 
I expected the managed vm to deploy.

What do you see instead?
The app hangs on the line "Sending auth config", then crashes. 

Please provide any additional information below.
I'm not the only one to report this. See this SO post:
http://stackoverflow.com/questions/34423857/gae-managed-vm-deploy-gets-stuck-on-
docker-build

I run the cmd with --verbosity debug, here is some of the output leading up to 
it and the callstack at crash:

    INFO: Display disabled.
    Copying certificates for secure access. You may be prompted to create an SSH keypair.
    DEBUG: Loaded Command Group: ['gcloud', 'compute', 'copy_files']
    DEBUG: Detected docker environment variables: DOCKER_HOST=tcp://104.154.78.118:2376, DOCKER_CERT_PATH=tmpv0pnrs, DOCKER_TLS_VERIFY=True
    DEBUG: Couldn't find 'auths' section
    DEBUG: Found entry (registry='https://bucket.gcr.io', username=u'_token')
    DEBUG: Found entry (registry='https://appengine.gcr.io', username=u'_token')
    DEBUG: Found entry (registry='https://eu.gcr.io', username=u'_token')
    DEBUG: Found entry (registry='https://gcr.io', username=u'_token')
    DEBUG: Found entry (registry='https://us.gcr.io', username=u'_token')
    DEBUG: Found entry (registry='https://asia.gcr.io', username=u'_token')
    DEBUG: Found entry (registry='https://b.gcr.io', username=u'_token')
    INFO: Starting new HTTPS connection (1): 104.154.78.118
    DEBUG: "GET /v1.16/_ping HTTP/1.1" 200 2
    Building and pushing image for module [default]
    INFO: Looking for the Dockerfile in C:\Users\Michael\Projects\Sites\DocketAlarm
    INFO: Looking for the default Dockerfile for runtime [python27]
    INFO: Dockerfile for runtime [python27] is found in C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\dockerfiles. Copying it into application directory.
    INFO: Building docker image docketupdate.default.20160104t034332 from C:\Users\Michael\Projects\Sites\DocketAlarm/Dockerfile:
    ------------------------------------------------- DOCKER BUILD OUTPUT --------------------------------------------------
    DEBUG: Looking for auth config
    DEBUG: Sending auth config ('https://bucket.gcr.io', 'https://appengine.gcr.io', 'https://eu.gcr.io', 'https://gcr.io',
    'https://us.gcr.io', 'https://asia.gcr.io', 'https://b.gcr.io')
    INFO: Tearing down remote build vm.
    Beginning teardown of remote build environment (this may take a few seconds).
    DEBUG: ('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))
    Traceback (most recent call last):
      File "C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\cli.py", line 609,
    in Execute
        result = args.cmd_func(cli=self, args=args)
      File "C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\calliope\backend.py", line 1228, in Run
        resources = command_instance.Run(args)
      File "C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\surface\preview\app\deploy.py", line 256, in Run
        remote_build)
      File "C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\deploy_command_util.py", line 177, in BuildAndPushDockerImages
        info.file, docker_client, image_name)
      File "C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\deploy_command_util.py", line 248, in BuildAndPushDockerImage
        image.Build(docker_client)
      File "C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\lib\googlecloudsdk\api_lib\app\docker_image.py", line 98, in Build
        nocache=self._nocache, rm=self._rm, pull=False)
      File "C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\third_party\docker\docker\api\build.py", line 97, in build
        timeout=timeout,
      File "C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\third_party\docker\docker\client.py", line 107, in _post
        return self.post(url, **self._set_request_timeout(kwargs))
      File "C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\third_party\requests\sessions.py", line 507, in post
        return self.request('POST', url, data=data, json=json, **kwargs)
      File "C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\third_party\requests\sessions.py", line 464, in request
        resp = self.send(prep, **send_kwargs)
      File "C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\third_party\requests\sessions.py", line 576, in send
        r = adapter.send(request, **kwargs)
      File "C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\third_party\requests\adapters.py", line 415, in send
        raise ConnectionError(err, request=request)
    ConnectionError: ('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))
    DEBUG: Loaded Command Group: ['gcloud', 'compute', 'instances', 'delete']
    ERROR: gcloud crashed (ConnectionError): ('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))

    If you would like to report this issue, please run the following command:
      gcloud feedback

Here is the output of gcloud info:
    Google Cloud SDK [91.0.1]

    Platform: [Windows, x86_64]
    Python Version: [2.7 (r27:82525, Jul  4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)]]
    Python Location: [c:\Python27\python.exe]
    Site Packages: [Disabled]

    Installation Root: [C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk]
    Installed Components:
      core: [2015.12.16]
      bq-win: [2.0.18]
      core-win: [2015.11.24]
      gcloud: []
      windows-ssh-tools: [2015.09.21]
      gsutil: [4.16]
      gsutil-win: [4.15]
      bq: [2.0.18]
    System PATH: [C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\..\bin\sdk;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Ethereum 0.9.41\bin;C:\Program Files (x86)\Skype\Phone\;c:\Python27;C:\Python27\Scripts;C:\Program Files (x86)\Google\google_appengine\;C:\cygwin\bin;C:\Users\Michael\AppData\Local\Programs\Git\cmd;C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin]
    Cloud SDK on PATH: [True]

    WARNING: There are old versions of the Google Cloud Platform tools on your system PATH.
      C:\Program Files (x86)\Google\google_appengine\dev_appserver.py

    Installation Properties: [C:\Users\Michael\AppData\Local\Google\Cloud SDK\google-cloud-sdk\properties]
    User Config Directory: [C:\Users\Michael\AppData\Roaming\gcloud]
    User Properties: [C:\Users\Michael\AppData\Roaming\gcloud\properties]
    Current Workspace: [None]
    Workspace Config Directory: [None]
    Workspace Properties: [None]

    Account: [michael.sander@gmail.com]
    Project: [docketupdate]

    Current Properties:
      [core]
        project: [docketupdate]
        account: [michael.sander@gmail.com]
        disable_usage_reporting: [False]
      [app]
        promote_by_default: [false]
        suppress_change_warning: [true]
      [compute]
        region: [us-central1]
        zone: [us-central1-f]

    Logs Directory: [C:\Users\Michael\AppData\Roaming\gcloud\logs]
    Last Log File: [C:\Users\Michael\AppData\Roaming\gcloud\logs\2016.01.04\03.54.01.581000.log]

Original issue reported on code.google.com by michael....@gmail.com on 4 Jan 2016 at 8:57

GoogleCodeExporter commented 8 years ago
Thanks for reporting this. We'll investigate.

Original comment by z...@google.com on 4 Jan 2016 at 1:54

GoogleCodeExporter commented 8 years ago
Let me know if you'd like the full log files, don't think they contain much 
more than what I've already posted.

Original comment by michael....@gmail.com on 4 Jan 2016 at 4:02

GoogleCodeExporter commented 8 years ago
Michael, are you the same person that reported the issue on Stack Overflow: 
http://stackoverflow.com/questions/34423857/gae-managed-vm-deploy-gets-stuck-on-
docker-build ?

Either way, are you able to reproduce this consistently? If so, could you share 
your Dockerfile? Feel free to email it to me directly at dlorenc@google.com

If you're able to SSH into the VM, the output of "cat /var/log/docker.log" 
might be helpful.

Original comment by dlor...@google.com on 5 Jan 2016 at 10:09

GoogleCodeExporter commented 8 years ago
I was the one who commented on the post, but I'm not the original poster.
I'll look into pulling those files.

Michael Sander
michael.sander@gmail.com
607-227-9859

Original comment by michael....@gmail.com on 6 Jan 2016 at 2:33

GoogleCodeExporter commented 8 years ago
I've been having this issue too with my node app. 

In my office, some people can deploy the app just fine and others are hitting 
this bug, despite us all using the same version of gcloud SDK (91.0.1), the 
same OS (OS X 10.11), same version of python (2.7.10 apple-compatible), etc.

I can provide some info that you asked for too, see below.

Dockerfile:
FROM node:4.2.3
RUN apt-get update -y && apt-get install -y -q --fix-missing \
  graphicsmagick \
  imagemagick
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app/
RUN npm --unsafe-perm install  --production
COPY . /usr/src/app
CMD [ "npm", "start" ]

I SSHed into the VM and the output of /var/log/docker.log just repeats these 
view messages (the first one a lot more frequently than the others):
time="2016-01-06T14:53:01.689552671Z" level=info msg="GET /version"
time="2016-01-06T14:53:04.881663725Z" level=info msg="GET /images/json"
time="2016-01-06T14:53:04.928656071Z" level=info msg="GET 
/containers/json?all=1"

Original comment by rich...@10kcoffees.com on 6 Jan 2016 at 4:18

GoogleCodeExporter commented 8 years ago
Hmm, one idea, Docker stores credentials in a file called ".dockercfg" if you 
run "cat ~/.dockercfg", do you see any entries for "index.docker.io"?

Don't paste the contents of .dockercfg here, for registries other than GCR it 
can contain private credentials.

Original comment by dlor...@google.com on 6 Jan 2016 at 5:17

GoogleCodeExporter commented 8 years ago

Original comment by z...@google.com on 6 Jan 2016 at 5:30

GoogleCodeExporter commented 8 years ago
I don't have an entry there for "index.docker.io", though all the other entries 
have the email set to "not@val.id" (I'm guessing they're examples).

I'm not sure if this is the cause though, as I can deploy other apps without 
hitting this issue.

Original comment by rich...@10kcoffees.com on 6 Jan 2016 at 5:46

GoogleCodeExporter commented 8 years ago
Same here. Below is the file with the auth sections redacted. I'm running on 
windows btw, so I don't have a ~/.dockercfg. I snooped around and found it in 
C:\home\Michael\.dockercfg, which is a bit of a weird place to put it.

{
  "https://bucket.gcr.io": {
    "email": "not@val.id", 
    "auth": "<REDACTED 1>"
  }, 
  "https://appengine.gcr.io": {
    "email": "not@val.id", 
    "auth": "<REDACTED 1>"
  }, 
  "https://eu.gcr.io": {
    "email": "not@val.id", 
    "auth": "<REDACTED 1>"
  }, 
  "https://gcr.io": {
    "email": "not@val.id", 
    "auth": "<REDACTED 2>"
  }, 
  "https://us.gcr.io": {
    "email": "not@val.id", 
    "auth": "<REDACTED 2>"
  }, 
  "https://asia.gcr.io": {
    "email": "not@val.id", 
    "auth": "<REDACTED 1>"
  }, 
  "https://b.gcr.io": {
    "email": "not@val.id", 
    "auth": "<REDACTED 1>"
  }
}

Original comment by michael....@gmail.com on 6 Jan 2016 at 6:40