2015-06-12 21 views
7

Cố gắng triển khai một số nội dung tĩnh cho GAE, vì chúng đã xóa tính năng đường ống đẩy để triển khai. Tôi đã thiết lập một dự án hoàn toàn mới. Nó ở trong khu vực Mỹ. Đã làm lại gcloud auth login. Vẫn nhận được phản hồi tương tự.triển khai ứng dụng xem trước gcloud trả về lỗi 400

Kết xuất gỡ lỗi chi tiết bên dưới. [REDACTED] là sự bổ sung của tôi vào mã.

$ gcloud preview app deploy dist/app.yaml --verbosity debug 
DEBUG: Running gcloud.preview.app.deploy with Namespace(__calliope_internal_deepest_parser=ArgumentParser(prog='gcloud.preview.app.deploy', usage=None, description="*(BETA)* This command is used to deploy both code and configuration to the App Engine\nserver. As an input it takes one or more ``DEPLOYABLES'' that should be\nuploaded. A ``DEPLOYABLE'' can be a module's .yaml file or a configuration's\n.yaml file.", version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=False), cmd_func=<bound method Command.Run of <googlecloudsdk.calliope.backend.Command object at 0x10bf14290>>, command_path=['gcloud', 'preview', 'app', 'deploy'], deployables=['dist/app.yaml'], document=None, env_vars=None, force=False, format=None, h=None, help=None, http_timeout=None, log_http=None, markdown=None, project=None, quiet=None, remote=False, server=None, set_default=False, trace_token=None, user_output_enabled=None, verbosity='debug', version=None). 
You are about to deploy the following modules: 
- [PROJECT_ID]/default/20150612t130942 From: [/Users/[ME]/Dropbox/Sites/[PROJECT_ID]/site/dist/app.yaml] 
Do you want to continue (Y/n)? Y 

Updating module [default]...DEBUG: Host: appengine.google.com 
DEBUG: Host: appengine.google.com 
DEBUG: Getting current resource limits. 
DEBUG: Send: /api/appversion/getresourcelimits, params={'version': '20150612t130942', 'app_id': '[PROJECT_ID]'} 
DEBUG: _Authenticate configuring auth; needs_auth=False 
DEBUG: Sending request to https://appengine.google.com/api/appversion/getresourcelimits?app_id=[PROJECT_ID]&version=20150612t130942 headers={'X-appcfg-api-version': '1', 'content-length': '0', 'Content-Type': 'application/octet-stream'} body= 
INFO: Attempting refresh to obtain initial access_token 
INFO: Refreshing access_token 
DEBUG: Got response: max_file_size: 32000000 
max_blob_size: 32000000 
max_files_to_clone: 2000 
max_total_file_size: 9223372036854775807 
max_file_count: 10000 

DEBUG: Using resource limits: {'max_file_size': 32000000, 'max_total_file_size': 9223372036854775807, 'max_blob_size': 32000000, 'max_files_to_clone': 2000, 'max_file_count': 10000} 
INFO: Reading app configuration. 
DEBUG: 
Starting update of app: [PROJECT_ID], version: 20150612t130942 
DEBUG: Scanning files on local disk. 
INFO: Processing file [app.yaml] 
INFO: Processing file [index.html] 
INFO: Processing file [views/6a0e56b1.main.html] 
INFO: Processing file [views/partials/90bc29e6.case-study.html] 
INFO: Processing file [views/partials/cc69dea5.home.html] 
INFO: Processing file [styles/9960b040.main.css] 
INFO: Processing file [scripts/8a12aff1.scripts.js] 
INFO: Processing file [scripts/8e6de882.libraries.js] 
DEBUG: Send: /api/appversion/create, params={'version': '20150612t130942', 'app_id': '[PROJECT_ID]', 'module': 'default'} 
DEBUG: _Authenticate configuring auth; needs_auth=False 
DEBUG: Sending request to https://appengine.google.com/api/appversion/create?app_id=[PROJECT_ID]&module=default&version=20150612t130942 headers={'X-appcfg-api-version': '1', 'content-length': '633', 'Content-Type': 'application/octet-stream'} body=api_version: '1' 
application: [PROJECT_ID] 
auto_id_policy: default 
builtins: 
- default: 'on' 
derived_file_type: 
- python_precompiled 
handlers: 
- script: index.html 
    secure: optional 
    url:/
- secure: optional 
    static_dir: styles 
    url: /styles 
- secure: optional 
    static_dir: scripts 
    url: /scripts 
- secure: optional 
    static_dir: views 
    url: /views 
- secure: optional 
    static_dir: fonts 
    url: /fonts 
- secure: optional 
    static_dir: images 
    url: /images 
- secure: optional 
    static_dir: res 
    url: /res 
module: default 
runtime: php 
threadsafe: true 
version: 20150612t130942 
vm_settings: 
    module_yaml_path: app.yaml 

INFO: Attempting refresh to obtain initial access_token 
INFO: Refreshing access_token 
Updating module [default].../DEBUG: Got http error 400. 
DEBUG: Unexpected results: {'status': '400', 'alternate-protocol': '443:quic,p=1', 'content-length': '318', 'expires': 'Fri, 01 Jan 1990 00:00:00 GMT', 'server': 'Google Frontend', 'cache-control': 'no-cache', 'date': 'Fri, 12 Jun 2015 18:09:47 GMT', 'content-type': 'text/plain'} 
Updating module [default]...done. 
DEBUG: (gcloud.preview.app.deploy) Server responded with code [400]: 
    Bad Request Unexpected HTTP status 400 
Traceback (most recent call last): 
    File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 538, in Execute 
    result = args.cmd_func(cli=self, args=args) 
    File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 1124, in Run 
    result = command_instance.Run(args) 
    File "/Users/[ME]/Applications/google-cloud-sdk/lib/googlecloudsdk/appengine/app_commands/deploy.py", line 119, in Run 
    client.DeployModule(module, version, info.parsed, info.file) 
    File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/appengine_client.py", line 276, in DeployModule 
    return appversion.DoUpload() 
    File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/appengine_deployments.py", line 1016, in DoUpload 
    missing_files = self.Begin() 
    File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/appengine_deployments.py", line 561, in Begin 
    payload=config_copy.ToYAML()) 
    File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/util.py", line 288, in Send 
    result = self.rpcserver.Send(url, payload=payload, **kwargs) 
    File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/util.py", line 353, in Send 
    response = self._server.Send(*args, **kwargs) 
    File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/external/tools/appengine_rpc_httplib2.py", line 269, in Send 
    'Unexpected HTTP status %s' % status) 
    File "/Users/[ME]/Applications/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/external/tools/appengine_rpc_httplib2.py", line 67, in RaiseHttpError 
    raise urllib2.HTTPError(url, response_info.status, msg, response_info, stream) 
RPCError: Server responded with code [400]: 
    Bad Request Unexpected HTTP status 400 
ERROR: (gcloud.preview.app.deploy) Server responded with code [400]: 
    Bad Request Unexpected HTTP status 400 
+0

Tôi chạy vào điều tương tự, tôi đã chạy 'gcloud auth login' cũng như' gcloud dự án cấu hình bộ [PROJECT_ID] ' – adefran83

+0

Same, tôi có vấn đề này cũng – theliberalsurfer

Trả lời

1

Đối với tôi, tôi đã không được kích hoạt thanh toán trong Tính> với Compute Engine> VM trường về dự án Console của Google của tôi. Nó hoạt dộng bây giờ!

+0

Thanh toán dường như được thiết lập đúng trên dự án của tôi . Điều đó dường như không ảnh hưởng đến bất cứ điều gì ... cảm ơn dù sao, vui vì nó đã làm việc cho bạn. – user2488234

+0

Bạn phải khởi tạo một phiên bản với gói thanh toán mặc định của bạn và sau đó triển khai ứng dụng của bạn. –

0

Nếu bạn đã cài đặt appcfg.py, bạn có thể chạy nó để triển khai và nó sẽ cung cấp thông báo lỗi chính xác, tôi nhận thấy tôi là api_version không hợp lệ cho thời gian chạy java (mà tôi không thể tìm thấy số hợp lệ và 1 không phải là nó)

2

Vấn đề chung là lỗi không có thông báo. Bắt đầu phát hành SDK đám mây vào ngày mai, lý do cho bất kỳ lỗi nào (vấn đề thanh toán, không đủ hạn ngạch, bất kỳ điều gì) sẽ được hiển thị, vì vậy, hãy thử tải SDK đám mây mới hơn vào ngày mai.

+1

Chỉ cần cập nhật, [1.9.23 SDK đã được phát hành hôm nay] (https://cloud.google.com/appengine/downloads), vì vậy như Ludo gợi ý, OP, vui lòng kiểm tra điều này để xem sự cố vẫn còn. – Nick

6

Bạn có thể phải đặt lại id dự án nếu bạn đã tắt/xóa ứng dụng trước đó khỏi bảng điều khiển đám mây của google.

gcloud config set project PROJECT_ID 
-1

Triển khai ban đầu của tôi là tốt và sau khi tải lên bản cập nhật, nó bắt đầu không thành công và gặp lỗi tương tự như bạn đã làm. Tôi đã tìm thấy sự cố với oauth. Đăng xuất khỏi google và chạy:

$ gcloud auth login 

Sau khi relogin, tôi đã có thể triển khai. Không có thay đổi cài đặt lại mã hóa hoặc quản lý VM được thực hiện.

Các vấn đề liên quan