Our GAE/Go application returns 401 response to /_ah/start like below.
app.yaml is this.
runtime: go
api_version: go1
application: (out app)
version: 777
threadsafe: true
manual_scaling:
instances: 1
handlers:
- url: /_ah/.*
script: _go_app
- url: /.*
script: _go_app
login: required
secure: always
Why we have this error? How can I fix this?
We know deleting manual_scaling can fix this error, but we would like to restrict the number of our instance.
Related
I was working on google Pubsub with App Engine, to get notifications from google play about InApp subscriptions status.
When I deploy my app with the command "gcloud app deploy", error message comes:
ERROR: (gcloud.app.deploy) An error occurred while parsing file: [/home/testaccount/php-docs-samples/pubsub/app/app.yaml]
Unable to assign value 'pubsub.js' to attribute 'url':
Value 'pubsub.js' for url does not match expression '^(?:(?!^)/.|..|((.).*(?!$).)$'
in "/home/testaccount/php-docs-samples/pubsub/app/app.yaml", line 6, column 8
My app.yaml file:
runtime: php55
api_version: 1
threadsafe: true
handlers:
- url: pubsub.js
static_files: pubsub.js
- url: /.*
script: index.php
env_variables:
GOOGLE_PROJECT_ID: "testproject"
I have followed the insturctions in the linl:
Writing and Responding to Pub/Sub Messages
I did not modify app.yaml file, I do not know what is going on? I tried to deploy "Hello, World!" for PHP on App Engine" exmaple and it worked.
Please help me to solve it.
url should start with a slash. Try:
- url: /pubsub.js
static_files: pubsub.js
After a week searching about why I get HTTP error 500 (Internal Server Error) when I browse https://testproject.uc.r.appspot.com/, I got the reason, it was from app.yaml file, all errors came from php version.
Old app.yaml:
runtime: php55
api_version: 1
threadsafe: true
handlers:
- url: /pubsub.js
static_files: pubsub.js
upload: pubsub.js
- url: /.*
script: index.php
env_variables:
GOOGLE_PROJECT_ID: "testproject"
New app.yaml:
runtime: php72
handlers:
- url: /pubsub.js
static_files: pubsub.js
upload: pubsub.js
- url: /.*
script: auto
env_variables:
GOOGLE_PROJECT_ID: "testproject"
Thank God.
I have an App Engine Python Application which has an endpoint that puts a task in the Task Queue. - This is working fine.
I have a Task Handler Python Application which will be execute the task in the queue.
When the task handler is invoked, the below error accurs
Request failed because URL requires user login. For requests invoked within App Engine (offline requests like Task Queue, or webhooks like XMPP and Incoming Mail), the URL must require admin login (or no login).
My App Engine Python Application app.yml is below
service: dataload-test
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: main.app
- url: /_ah/queue/deferred
script: google.appengine.ext.deferred.deferred.application
login: admin
libraries:
- name: ssl
version: latest
builtins:
- deferred: on
- appstats: on
env_variables:
GAE_USE_SOCKETS_HTTPLIB : 'true'
My Task Handler Application app.yml is below
service: adobe-dataload-worker
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: load_data_worker.app
login: admin
Any help would be appreciated
Your wildcard - url: /.* handler is handling EVERY URL.
Put that last, or else the deferred handler will never be seen:
handlers:
- url: /_ah/queue/deferred
script: google.appengine.ext.deferred.deferred.application
login: admin
- url: /.*
script: main.app
Really simple setup; I just want to access any php file from the api folder (technically would like to specifiy /api/.* or something along that lines to include any subfolders) but this setup only returns 404; I have a feeling it is completely ignoring this line - url: /api/app/(.+\.php)$ because if I type asdfasdf.appspot.com/api/app/main.php (there is a main.php in the root directory) it loads. So this tells me it is staying in the root path the whole time. Any suggestions?
application: fsfhakjsldhf9
version: 1
runtime: php55
api_version: 1
threadsafe: yes
env_variables:
MYSQL_DSN: mysql:unix_socket=/cloudsql/fudfsy9:us-central1:fuasdfe-prod1;dbname=f25dsfss9
MYSQL_USERNAME: fddadfs
MYSQL_PASSWORD: 'asfdasdff'
MYSQL_DATABASE: 'asdfasdf'
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: /files
static_dir: files
- url: /api/app/(.+\.php)$
script: \1
secure: always
- url: /.*
script: main.php
The - url: /api/app/(.+\.php)$ also needed script: /api/app/\1 to match
When I was trying to run one of the application on google app engine I keep on getting a yell icon the means error. How can I fix it ,so I can run my application.
The error is one the left end side of hello-udacity
Here is the link of the picture of the error: https://plus.google.com/u/1/115545843446144625696/posts/aoRyoN2r2Sd?pid=6168940381509733874&oid=115545843446144625696
In main.py
import webapp2
class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.write('Hello udacity!')
app = webapp2.WSGIApplication([('/', MainHandler)],
debug=True)
In app.yaml
application: hello-udacity
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: .*
script: main.app
libraries:
- name: webapp2
version: "2.5.2"
The app.yaml file uses the YAML syntax and so your app.yaml should comply with those. The following is a clearer configuration
application: hello-udacity
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: .*
script: main.app
libraries:
- name: webapp2
version: "2.5.2"
For more on this see about app.yaml in the developer docs
I added like following in app.yaml
application: mywebfont
version: 1
runtime: python
api_version: 1
handlers:
- url: /font/.*
script: font.py
- url: /
static_files: html/index.html
upload: static_files
- url: .*
script: main.py
It's working fine in localhost.
After deploy , I can't check my application home page. It's always show 404 not found error.
try with:
application: mywebfont
version: 1
runtime: python
api_version: 1
handlers:
- url: /font/.*
script: font.py
- url: /
static_files: html/index.html
upload: html/index.html
- url: .*
script: main.py