GAE PubSub PUSH results in 400, endpoint is OK otherwise

57 views
Skip to first unread message

gu...@genotek.ru

unread,
Oct 2, 2017, 1:03:59 PM10/2/17
to Google App Engine

I am starting with a push PubSub, and manually test a PUSH PubSub service. To the end I created a topic, a push subscription, and then manually submit a message from the google web console to a GAE app with a https endpoint. These manual messages result in 400 (see below) in the logs.

curl test of the same end point is working fine.

What am I missing?

This is flex environment with custom, albeit php, runtime


 {httpRequest: {
  referer:  "-"   
  remoteIp:  "10.0.0.1"   
  requestMethod:  "POST"   
  requestUrl:  "/pubsub/mypushendpoint"   
  responseSize:  "32607"   
  status:  400   
  userAgent:  "CloudPubSub-Google"   
 }
 insertId:  "XXXXXXXX"  
 jsonPayload: {
  latencySeconds:  "0.026"   
  time:  null   
  trace:  "XXXXXXX"   
 }
 labels: {
  compute.googleapis.com/zone:  "XXXXXXX"   
 }
 logName:  "projects/XXXXXXX/logs/appengine.googleapis.com%2Fnginx.request"  
 receiveTimestamp:  "XXXXXXX"  
 resource: {
  labels: {
   module_id:  "XXXXXXX"    
   project_id:  "XXXXXXX"    
   version_id:  "XXXXXXX"    
  }
  type:  "gae_app"   
 }
 timestamp:  "XXXXXXX"  
}

Jordan (Cloud Platform Support)

unread,
Oct 2, 2017, 3:43:04 PM10/2/17
to Google App Engine
400 Bad Request means that your App Engine endpoint does not know how to handle the POST request from Pub/Sub. You need to configure your App Engine endpoint to accept POST requests to properly handle your pushed Pub/Sub messages.

Note that Google Groups is meant for general product discussions and not for technical support. If you require further technical support for configuring App Engine as a Pub/Sub endpoint, it is recommended to post your complete question on Stack Overflow using the supported Google Cloud tags.  
Reply all
Reply to author
Forward
0 new messages