I'm trying to follow the Google AppEngine "Hello World" example (on Windows 10), but the plumbing seems to be broken. When I execute
dev_appserver.py app.yaml
from the command prompt (as administrator) I get
"ERROR: (dev_appserver) Access is denied: [C:\Users\Allen\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\bundledpython\DLLs\select.pyd]"
I have confirmed that the path to dev_appserver.py is in my PATH environment variable. What else can I do?
Related
I am trying to run my server on a Linux mint 18.1 machine on a google app engine.
The following command :
/home/mint/Downloads/google-cloud-sdk/platform/google_appengine/dev_appserver.py --log_level info --storage_path /media/mint/TI31315100A/PycharmProjects/database.db /media/mint/TI31315100A/PycharmProjects/optimallinux
Returns the following error :
bash: /home/mint/Downloads/google-cloud-sdk/platform/google_appengine/dev_appserver.py: Permission denied
I have checked the pathes and the files, everything is right.
Also, I have tried to run the command with sudo and reinstalled the app-engine sevral times, but nothing helped.
I am trying to connect Google Container Engine from my local machine using gcloud sdk but i am getting below error.
C:\Program Files (x86)\Google\Cloud SDK>gcloud container clusters get-credential
s cluster-2 --zone us-central1-a --project myapp-00000
Fetching cluster endpoint and auth data.
ERROR: (gcloud.container.clusters.get-credentials) environment variable HOME or
KUBECONFIG must be set to store credentials for kubectl
I have check at HOME location there is not .kube folder created and not environment variable set by default, so i have created KUBECONFIG environment by myself after that i am getting below error :-
ERROR: gcloud crashed (OSError): [Errno 13] Permission denied: 'C:\\Tool\\config'
i have started gcloud sdk as admin and it have all the correct Permission.
EDIT
I am using below version (which are latest as of today)
Google Cloud SDK 129.0.0
kubectl
kubectl-windows-x86_64 1.4.0
C:\Program Files (x86)\Google\Cloud SDK>kubectl version
Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0",
I take it you set KUBECONFIG env to 'C:\Tool\config'? That error is gcloud failing to write due to missing admin privileges; I don't know if you need to run the shell as admin. You might also try the HOME directory. Note that gcloud will attempt to create any missing directories on the path to the kubeconfig file.
I had the same issue.
It turns out that KUBECONFIG refers to a file and not to a directory.
So if you set up KUBECONFIG to 'C:\Tool\config\kubectl.cfg' it should work fine.
I recently upgraded my cloud SDK, and now I can no longer deploy to app engine flexible. I deploy my app with the following command:
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.cmd preview app deploy --promote vm.yaml
I am getting get the following output and crash (abridged):
WARNING: Could not acquire lock C:\Users\Michael\AppData\Roaming\gcloud\credentials.lock in 0 seconds
WARNING: The credentials file (C:\Users\Michael\AppData\Roaming\gcloud\credentials) is not writable. Opening in read-only mode. Any refreshed credentials will only be valid for this run.
WARNING: Could not acquire lock C:\Users\Michael\AppData\Roaming\gcloud\credentials.lock in 0 seconds
WARNING: The credentials file (C:\Users\Michael\AppData\Roaming\gcloud\credentials) is not writable. Opening in read-only mode. Any refreshed credentials will only be valid for this run.
WARNING: Could not acquire lock C:\Users\Michael\AppData\Roaming\gcloud\credentials.lock in 0 seconds
WARNING: The credentials file (C:\Users\Michael\AppData\Roaming\gcloud\credentials) is not writable. Opening in read-only mode. Any refreshed credentials will only be valid for this run.
...
ERROR: gcloud crashed (OSError): [Errno 13] Permission denied: 'C:\\Users\\Michael\\AppData\\Roaming\\gcloud\\credentials.lock'
If you would like to report this issue, please run the following command:
gcloud feedback
Below is some of the output from gcloud feedback
Trace:
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\gcloud_main.py:171
gcloud_cli.Execute()
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\calliope\cli.py:719
result = args.calliope_command.Run(cli=s...
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\calliope\backend.py:1404
resources = command_instance.Run(args)
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\lib\surface\app\deploy.py:91
return deploy_util.RunDeploy(self, args,...
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\command_lib\app\deploy_util.py:206
service, code_bucket_ref)
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\api_lib\app\deploy_app_command_util.py:233
_UploadFiles(files_to_upload, bucket_ref...
C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\api_lib\app\deploy_app_command_util.py:175
results = pool.map(_UploadFile, tasks)
c:\Python27\lib\multiprocessing\pool.py:251
return self.map_async(func, iterable, ch...
c:\Python27\lib\multiprocessing\pool.py:567
raise self._value
OSError: [Errno 13] Permission denied: 'C:\\Users\\Michael\\AppData\\Roaming\\gcloud\\credentials.lock'
Installation information:
Google Cloud SDK [120.0.0]
Platform: [Windows, x86_64]
Python Version: [2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)]]
Python Location: [c:\Python27\python.exe]
[output truncated]
Any ideas?
This is a bug with the Google SDK's parallel upload feature introduced in June 2016. Work-around the bug by turning off the feature with the following command:
gcloud config set app/num_file_upload_processes 1
The command above limits the number of parallel uploads to 1 thread/process, so they don't step on each other's feet.
I recently had the same issue. Go to the directory shown in the error message. You'd find two credientials files. Delete the one with the LOCK extension( it would be the empty one). Then redeploy your project. Worked perfectly for me.
I've also ran into this issue as well. How it happened --> I ran gcloud app deploy command, but later realised that the deployment took much longer to finish (perhaps hanging), then I killed the batch process i.e. CTRL +C. When I reissued the command thats when I got into this issue. So the SOLUTION, do what's already said above i.e. go and delete the credentials.lock file (in my case it found in C:\Users\Sam\AppData\Roaming\gcloud directory)
The better way is to solve this error is to reinstall after deleting the root directory where lock file is.
I'm running the following command to deploy my Managed VMs app (on Windows 10):
gcloud preview app deploy app.yaml --project=<PROJECT> --promote
The deployment starts bug hangs on the following line:
Copying certificates for secure access. You may be prompted to create an SSH keypair.
And after some time I get the error:
ERROR: (gcloud.preview.app.deploy) Unable to copy certificates.
I've already:
Made sure that there are SSH keys in ~\.ssh\google_compute_engine
Tried to run with --quiet - same results
Renamed ssh-term.exe to ssh.exe - same results
Run the command as an administrator.
Run the command with --verbosity debug, which prints the following line multiple times: DEBUG: File [f] does not exist locally.
Any help will be much appreciated!
Found the cause! It was the project's firewall that blocked SSH by default. Fixed that and it worked.
Glad you fixed it, I had the same problem and will use your fix. I did happen accros a work around. By using the Container Build API to perform the build.
enter the command
gcloud config set app/use_cloud_build true
Before you
gcloud preview app deploy
Cite: https://github.com/isusanin/google-cloud-sdk/issues/533
Whenever I try to deploy my app (a proxy) it returns this message:
C:\Python27\pythonw.exe: can't open file 'C:\Program Files\Google\google_appengine\appcfg.py': [Errno 2] No such file or directory
2013-12-05 00:16:31 (Process exited with code 2)
I've checked it a thousand times and both the app in the engine and the title of the project on my app engine account page, have the same server name. I set the preferences correctly, yet the error is always that the file doesn't exist.
The error is saying the program appcfg which does the deployment doesnt exist.
Something about you SDK environment is wrong. Have a look and see if you can find appcfg.py in the patgh in the error message, and check where your SDK is currently installed.