prototipando / google-cloud-sdk

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

app-engine-go not supported #521

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

I have installed both the Go App Engine SDK and the Google Cloud SDK. Since I 
found that the Cloud SDK also supports App Engine, I have configured my 
environment to use the Cloud SDK instead of the App Engine SDK.

My environment is the following (zsh on Arch Linux):

unset GOARCH
unset GOBIN
unset GOOS

export GOROOT="$APPENGINE_HOME/goroot"
export PATH="$PATH":"$GCLOUD_HOME/bin":"$GOROOT/bin"
export APPENGINE_DEV_APPSERVER="$GCLOUD_HOME/bin/dev_appserver.py"

Note that I had to use GOROOT from the App Engine SDK.

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

When I ran goapp serve, I get the following stack trace:

Traceback (most recent call last):
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 83, in <module>
    _run_file(__file__, globals())
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 79, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 1040, in <module>
    main()
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 1033, in main
    dev_server.start(options)
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 824, in start
    self._dispatcher.start(options.api_host, apis.port, request_data)
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/dispatcher.py", line 193, in start
    _module, port = self._create_module(module_configuration, port)
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/dispatcher.py", line 278, in _create_module
    threadsafe_override=threadsafe_override)
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 1155, in __init__
    super(AutoScalingModule, self).__init__(**kwargs)
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 537, in __init__
    self._module_configuration)
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 234, in _create_instance_factory
    module_configuration=module_configuration)
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/go_runtime.py", line 113, in __init__
    self._module_configuration)
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/go_application.py", line 163, in __init__
    self._arch = self._get_architecture()
  File "/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/go_application.py", line 196, in _get_architecture
    for platform in os.listdir(os.path.join(GOROOT, 'pkg', 'tool')):
OSError: [Errno 2] No such file or directory: 
'/data/sdk/google-cloud/google-cloud-sdk/platform/google_appengine/goroot/pkg/to
ol'
error while running dev_appserver.py: exit status 1

The Cloud SDK knows about go runtime; what is the reason why goroot is not 
included?

Creating a symlink to the goroot directory from the App Engine SDK solves the 
problem.

What is the output of 'gcloud info'?

Google Cloud SDK [95.0.0]

Platform: [Linux, x86_64]
Python Version: [2.7.11 (default, Dec  6 2015, 15:43:46)  [GCC 5.2.0]]
Python Location: [/usr/bin/python2]
Site Packages: [Disabled]

Installation Root: [/data/sdk/google-cloud/google-cloud-sdk]
Installed Components:
  core: [2016.01.29]
  app-engine-python: [1.9.31]
  core-nix: [2015.11.24]
  gcloud: []
  gsutil-nix: [4.15]
  beta: [2016.01.12]
  gsutil: [4.16]
  bq: [2.0.18]
  gcd-emulator: [v1beta3-1.0.0]
  bq-nix: [2.0.18]
System PATH: 
[/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_
perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/manlio/.local/bin:/data/sdk/g
oogle-cloud/google-cloud-sdk/bin:/data/sdk/appengine/go_appengine/goroot/bin]
Cloud SDK on PATH: [True]

Installation Properties: [/data/sdk/google-cloud/google-cloud-sdk/properties]
User Config Directory: [/home/manlio/.config/gcloud]
User Properties: [/home/manlio/.config/gcloud/properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]

Account: [manlio.perillo@gmail.com]
Project: [aurora-asd]

Current Properties:
  [core]
    project: [aurora-asd]
    account: [manlio.perillo@gmail.com]
    disable_usage_reporting: [True]

Logs Directory: [/home/manlio/.config/gcloud/logs]
Last Log File: [/home/manlio/.config/gcloud/logs/2016.02.04/22.47.10.243755.log]

Please provide any additional information below.

Original issue reported on code.google.com by manlio.p...@gmail.com on 4 Feb 2016 at 10:49

GoogleCodeExporter commented 8 years ago
This is a known problem. Currently you need to download the App Engine SDK for 
Go directly from 
https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go.

Original comment by stephe...@google.com on 5 Feb 2016 at 4:46

GoogleCodeExporter commented 8 years ago

Original comment by z...@google.com on 18 Feb 2016 at 7:00