I am trying to migrate my Go app to runtime go112, but dev_appserver.py throw the following error:
RuntimeError: Unknown runtime 'go112'; supported runtimes are 'custom', 'go', 'go111', 'java', 'java7', 'java8', 'php55', 'php72', 'python', 'python-compat', 'python27', 'python37'.
Current Go version is 1.12.11
Edit: I used apt-get to install the SDK.
apt-get update && apt-get install google-cloud-sdk google-cloud-sdk-app-engine-python\
google-cloud-sdk-app-engine-python-extras\
google-cloud-sdk-app-engine-java\
google-cloud-sdk-app-engine-go\
google-cloud-sdk-datalab\
google-cloud-sdk-datastore-emulator\
google-cloud-sdk-pubsub-emulator\
google-cloud-sdk-cbt\
google-cloud-sdk-cloud-build-local\
google-cloud-sdk-bigtable-emulator\
kubectl -y
That way it seems I can't use gcloud components update and the packages are not up-to-date in the repos.
Now my questions is: Does google-cloud-sdk-app-engine-go support go runtime 1.12? If not, when will it support runtime 1.12?
Update: I installed cloud SDK and run gcloud components update successfully on another computer, dev_server.py still throw the same error. Does the local SDK actually support rumtime 1.12?
go112 runtime is not available on local dev_appserver.py. This has been discussed on the App Engine Go forum at
https://groups.google.com/forum/#!topic/google-appengine-go/kHxZ9zIb_QE
The expectation is that starting from go112 runtime, there is no "appengine" way of running the go server and works normally like any go server outside GAE. There are a few open issues like dispatching urls though.
It sounds like you gcloud SDK is an old version and not recognize "runtime: go112", please run this command in order to update your SDK.
gcloud components update
After the update you can be able to deploy an app engine service using GO 1.12 runtime, check the changes that you need to perform in you App.yaml in this link
Related
AppEngine supports Go 1.16 for a year now. But dev_appengine.py still doesn't:
RuntimeError: Unknown runtime 'go116'; supported runtimes are 'custom', 'go', 'go111', 'go112', 'go113', 'go114', 'go115', 'java', 'java7', 'java8', 'php55', 'php72', 'php81', 'python', 'python-compat', 'python27', 'python310', 'python37', 'python38', 'python39'.
The official documentation is unhelpful.
How can I do local Go 1.16 development of my AppEngine app?
I assume you meant dev_appserver.py and not dev_appengine.py. If so, then
It looks like you're using GAE Standard env in which case, gcloud CLI version 409.0.0 (which seems to be the latest, at least for Mac) doesn't support go 1.1.6. The go runtimes supported in it are
go, go111, go112, go113, go114, go115
You can find the list of supported runtimes in the file
{{path to gcloud sdk_installation}}/platform/google_appengine/google/appengine/tools/devappserver2/runtime_factories.py
If you switch to GAE Flex, I believe you'll be able to use go 1.1.6 since you'll then be using a custom runtime
You can also just run your App as you would a standard go App e.g using command go run <go_package>
Anyone else getting this issue when deploying Go/Other projects to the App Engine?
Deployment was working fine on Tuesday, Sept 28. I tried to deploy on Friday, Oct 1 (yesterday) and today, but I still got the same error. It's not a code-related error as the code hasn't changed since the last deployment.
From the log:
Step #2 - "build": go:
gopkg.in/yaml.v3#v3.0.0-20200313102051-9f266ea9e77c: git fetch -f
origin refs/heads/:refs/heads/ refs/tags/:refs/tags/ in
/layers/google.go.gomod/gopath/pkg/mod/cache/vcs/5ea86ba1b933025fb7a7a539058d4acea777e0b3175c573a70130f7ea565323f:
exit status 128: Step #2 - "build": fatal: unable to access
'https://gopkg.in/yaml.v3/': server certificate verification failed.
CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
If I'm reading this right, is there a missing certificate in the App Engine? But then, I'm not sure what certificate it needs since I never had to provide one before. Maybe if I delete the certificate file, App Engine will recreate it?
Any ideas?
Experienced the certificate error too.
Assuming you are using the official golang image, to fix the certificate issue, you need to update ca-certificates and libgnutls30 packages.
RUN apt update && apt install ca-certificates libgnutls30 -y
I had the same issue is Travis CI build.
I changed the build image to ubuntu 20.04 (from 16.04)
and update package ca-certificates
sudo apt-get update
sudo apt-get install --reinstall ca-certificates
Solved ... mostly
This solution is for those running on App Engine Standard environment using Go 1.11
change your runtime in app.yaml to
runtime: go115
and change your go version in go.mod file:
module myapp
go 1.11
This will allow you to deploy your application. In my case, there were other changes I had to make to the app.yaml. For example, I had to add
app_engine_apis: true
I have my app deployed now but not completely running. I'll post relevant fixes here if I discover anything else. Hope this helps those that run into this issue.
To sum it all up -- it was an issue on the App Engine side. Other users experienced the same problem and the Google team resolved the issue.
For reference I've posted the issue here: https://issuetracker.google.com/issues/201753230
For my project, I reverted the "runtime: go115" changes to go111 (also removed app_engine_apis from app.yaml) and the application deployed as normal.
I've installed gcloud by following the instructions on:
https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
gcloud is in my path at /usr/bin/gcloud, but the package doesn't seem to have dev_appserver.py in my path. Is it installed? How do I run it?
Platform: Ubuntu 16.04
Edit: By running dpkg -L google-cloud-sdk I've found it at /usr/lib/google-cloud-sdk/bin/dev_appserver.py but when I try to run it I get:
This action requires the installation of components: [app-engine-
python]
You cannot perform this action because this Cloud SDK installation is
managed by an external package manager. If you would like to get the
Also not sure why it wasn't added to my path.
I know the original question concerns Ubuntu, but I just wanted to share some notes for macOS/OS X in case it's helpful for someone else.
I installed the google-cloud-sdk via Homebrew-Cask and overlooked the caveats note:
brew cask install google-cloud-sdk
After installing the SDK cask, I installed the Python App Engine component, as #Rodney Jonace mentioned:
gcloud components install -q app-engine-python
Going back to the caveats note mentioned above, I appended the following the my ~/.zshrc file:
source $(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc
source $(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc
Opening a new terminal tab, I was able to call the extra Python App Engine scripts (e.g., dev_appserver.py) and use the Zsh completions. Hope that helps!
The following articles were also useful:
http://www.javatronic.fr/tips/2014/10/17/installing_google_cloud_sdk_on_ubuntu_with_oh-my-zsh.html
http://www.rainbowbreeze.it/how-to-setup-a-google-app-engine-python-environment-on-mac-osx-using-homebrew/
The google-cloud-sdk deb package comes with the built-in component manager disabled, which is preventing that copy of dev_appserver.py from working through gcloud. If you update your apt-cache, you can install the google-cloud-sdk-app-engine-python and/or google-cloud-sdk-app-engine-java packages that have just started to be published. Directions here:
https://cloud.google.com/sdk/downloads#apt-get
This started after I ran the latest gcloud update:
gcloud components update
I used to be able to deploy my app something like this:
appcfg.py update app.yaml
Now I get:
appcfg.py: command not found
Is there a new gcloud command for deploying App Engine apps?
It appears the most recent version of gcloud dropped appcfg.py from the bin directory.
$ ls ~/google-cloud-sdk/bin/
bootstrapping bq dev_appserver.py gcloud git-credential-gcloud.sh gsutil
I found the appcfg.py script under the platform directory:
$ ls ~/google-cloud-sdk/platform/google_appengine
api_server.py dev_appserver.py LICENSE RELEASE_NOTES
appcfg.py ...
By linking it back to the bin directory, I was able to restore the command.
ln -sv ~/google-cloud-sdk/platform/google_appengine/appcfg.py ~/google-cloud-sdk/bin/
Credit to this post for helping me to figure this out.
gcloud app deploy is the preferred way when using gcloud. If you download the stand alone Google App Engine SDK, then you will have appcfg.py available.
https://cloud.google.com/sdk/gcloud/reference/app/deploy
in my case, i needed to run the following:
sudo ln -sv /usr/local/google-cloud-sdk/platform/google_appengine/appcfg.py /usr/local/google-cloud-sdk/bin/
using gcloud app deploy --project project-appengine-id
You'll need to have a billing account
As the standalone Google App Engine SDK is no longer available, if you still need access to appcfg.py (for instance, if you are trying to set up Eclipse for an App Engine Standard project that uses Python 2 according to these instructions), I have found that one way to get it is to just install an older version of the Cloud SDK.
Specifically, appcfg.py was apparently removed in Cloud SDK version 344.0.0 when the Python SDK was updated to version 1.9.93, so you can run:
gcloud components install app-engine-python
gcloud components update --version 343.0.0
and this will give you the most recent version of the app-engine-python component that still had that file.
Downloaded python v 1.6.4 of sdk and get following message when running local devserver:
INFO 2012-04-01 20:08:10,177 appcfg.py:582] Checking for updates to the SDK.
INFO 2012-04-01 20:08:11,660 appcfg.py:616] This SDK release is newer than the advertised release.
Re-installed after unistalling both sdk and python 2.7 used fresh download multiple times issue repeats. Also unable to upload an application using appcfg.py
Command typed appcfg.py update appdrectory/
and it spits out standard text
Usage: appcfg.py [options]
Action must be one of:
backends: Perform a backend action.
backends configure: Reconfigure a backend without stopping it.
.....
Suspect is linked to fact that have pre-release appcfg.py
How to un-isntall pre-release sdk and put in latest release sdk Is something special to be done.?
Your syntax should be: python appcfg.py update <directory>.
Is this what you have done?