isusanin / google-cloud-sdk

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

Error deploying sample 2-structured-data #496

Open GoogleCodeExporter opened 8 years ago

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

What steps will reproduce the problem?

deploying project 2-structured-data (Getting started with Node.js):
gcloud preview app deploy app.yaml --promote

What is the expected output? What do you see instead?

ERROR: gcloud crashed (WindowsError): [Error 3] The system cannot find the path 
specified: 
'C:\\Users\\miguel\\AppData\\Local\\Google\\Cloud-SDK\\nodejs-getting-started\\2
-structured-data\\node_modules\\gcloud\\node_modules\\gce-images\\node_modules\\
google-auto-auth\\node_modules\\google-auth-library\\node_modules\\gtoken\\node_
modules\\google-p12-pem\\node_modules\\node-forge'

Please provide any additional information below.

Traceback (most recent call last):
  File "lib\googlecloudsdk\gcloud_main.py", line 169, in main
    gcloud_cli.Execute()
  File "lib\googlecloudsdk\calliope\cli.py", line 643, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "lib\googlecloudsdk\calliope\backend.py", line 1401, in Run
    resources = command_instance.Run(args)
  File "lib\surface\preview\app\deploy.py", line 369, in Run
    config_cleanup)
  File "lib\googlecloudsdk\api_lib\app\deploy_command_util.py", line 204, in BuildAndPushDockerImages
    info.file, docker_client, image_name)
  File "lib\googlecloudsdk\api_lib\app\deploy_command_util.py", line 278, in BuildAndPushDockerImage
    image.Build(docker_client)
  File "lib\googlecloudsdk\api_lib\app\docker_image.py", line 110, in Build
    nocache=self._nocache, rm=self._rm, pull=False)
  File "bin\..\./lib\third_party\docker\docker\api\build.py", line 49, in build
    context = utils.tar(path, exclude=exclude, dockerfile=dockerfile)
  File "bin\..\./lib\third_party\docker\docker\utils\utils.py", line 86, in tar
    t.add(os.path.join(root, path), arcname=path, recursive=False)
  File "C:\python27\lib\tarfile.py", line 2006, in add
    tarinfo = self.gettarinfo(name, arcname)
  File "C:\python27\lib\tarfile.py", line 1878, in gettarinfo
    statres = os.lstat(name)
[output truncated]

Original issue reported on code.google.com by mikeribe...@gmail.com on 25 Jan 2016 at 4:29

GoogleCodeExporter commented 8 years ago
Greetings!  This looks like it may be caused by the maxpath limitation on 
Windows - this happens sometimes with NPM modules that have a lot of nested 
dependencies.  

One fix might be to install NPM 3, which flattens dependencies:

  npm install -g npm@3

Hopefully this fixes things up for you.  Let us know how it goes!

Original comment by beckw...@google.com on 25 Jan 2016 at 6:04

GoogleCodeExporter commented 8 years ago
Thanks for yr prompt reply.

Installed npm3, same error.
Changed project location to c:\, and I was able to deploy.

Thanks again.
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=s
ig-email&utm_content=webmail>
This
email has been sent from a virus-free computer protected by Avast.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=s
ig-email&utm_content=webmail>
<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Original comment by mikeribe...@gmail.com on 26 Jan 2016 at 2:01

GoogleCodeExporter commented 8 years ago
Internal issue filed for the c:\ workaround. Thanks

Original comment by gsfow...@google.com on 27 Jan 2016 at 1:39

GoogleCodeExporter commented 8 years ago
Issue 527 has been merged into this issue.

Original comment by z...@google.com on 16 Feb 2016 at 11:11

GoogleCodeExporter commented 8 years ago
Having the same issue, did npm install -g npm@3 and move directory to c:/, 
still doesnt work

Original comment by jamesw...@amuzedesign.com on 2 Mar 2016 at 4:56

GoogleCodeExporter commented 8 years ago
If you're still seeing this problem - can you please share the console output?  
Could you also just do a quick `npm -v` to make sure we're seeing the same 
thing?

Original comment by beckw...@google.com on 2 Mar 2016 at 4:28

GoogleCodeExporter commented 8 years ago
Issue 634 has been merged into this issue.

Original comment by z...@google.com on 8 Mar 2016 at 5:00

GoogleCodeExporter commented 8 years ago
Hello, thank you for the quick response to my issue (634). 

I installed npm 3 (npm -v returns 3.8.0)

I first tried moving the 2-structured-data (containing app.js, package.json, 
app.yaml, etc.) to C:\ but that didn't work, here was the console output:

******
ERROR: gcloud crashed (WindowsError): [Error 3] The system cannot find the path 
specified: 
'C:\\2-structured-data\\node_modules\\gcloud\\node_modules\\gce-images\\node_mod
ules\\google-auto-auth\\node_modules\\google-auth-library\\node_modules\\jws\\no
de_modules\\base64url\\node_modules\\concat-stream\\node_modules\\readable-strea
m\\node_modules\\core-util-is\\float.patch'
******

I then tried emptying the 2-structured-data file and moving the contents 
themselves to C:\, at which point I was prompted to grant administrator 
permissions to the files. This seemed like a step in the right direction, 
though gcloud preview app deploy still didn't work, here was the console output 
leading upto and including the error:

*******
Verifying that Managed VMs are enabled and ready.
Provisioning remote build service.
Copying certificates for secure access. You may be prompted to create an SSH 
keypair.
Building and pushing image for module [default]
Beginning teardown of remote build environment (this may take a few seconds).
ERROR: gcloud crashed (IOError): [Errno 13] Permission denied: u'C:\\Dockerfile'
*******

Searching for a "Dockerfile" in C: doesn't return any results. Any thoughts? 
Thanks again!

Original comment by daniel.c...@gmail.com on 8 Mar 2016 at 6:22

GoogleCodeExporter commented 8 years ago
We're still investigating workarounds for this issue–it's due to a Windows 
MAX_PATH limitation.

Thank you for sharing your command output; it should help us diagnose.

Original comment by z...@google.com on 8 Mar 2016 at 6:25

GoogleCodeExporter commented 8 years ago
Thank you! I'll continue to try my own workarounds and share my command output 
if it helps....Btw, I did find a "Dockerfile" in my Google Cloud SDK folder. I 
tried moving it to C: and deploying again. I got this error:

ERROR: (gcloud.preview.app.deploy) There is a Dockerfile in the current 
directory, and the runtime field in C:\app.yaml is currently set to [runtime: 
nodejs]. To use your Dockerfile to build a custom runtime, set the runtime 
field in C:\app.yaml to [runtime: custom]. To continue using the [nodejs] 
runtime, please omit the Dockerfile from this directory.

I tried setting runtime:custom in the yaml file, and when I tried gcloud 
preview app deploy again, I got this error:

ERROR: gcloud crashed (IOError): [Errno 13] Permission denied: 'C:\\Program 
Files (x86)\\InstallShield Installation 
Information\\{40BF1E83-20EB-11D8-97C5-0009C5020658}\\setup.ilg'

Hopefully, this helps!

Original comment by daniel.c...@gmail.com on 8 Mar 2016 at 7:23

GoogleCodeExporter commented 8 years ago
Issue 641 has been merged into this issue.

Original comment by z...@google.com on 11 Mar 2016 at 1:35