Indranil Bera
Indranil Bera

Reputation: 11

Gcp PubSub not pushing message to REST Endpoint

I am facing an problem, Gcp PubSub not pushing message to my registered endpoint. Let me narrate in details the steps I have executed.

Note,

  1. I am not using app engine
  2. I am deploying my simple spring boot app on PCF (Pivotal Cloud Foundry...PaaS) hosted on GCP (IaaS)

Steps:

  1. 1st I have created an service account with required permission to access GCP PubSub
  2. Next am using this service account to create/subscribe/register my endpoint to the topic
  3. Next, as expected I have registered & verified my domain ownership & added my push endpoint path say https://example.com with GCP
  4. Deployed my app in Pcf

Test Executed:

  1. I am able to successfully create & subscribe the topic
  2. Successfully registered my push end point like https://example.com/myPushEp with the newly created topic
  3. Successfully able to post message to the topic.

As my push ep is registered with gcp pubsub topic so asa the message is posted it must be pushed into registered endpoint, but unfortunately it not pushing any message to the registered endpoint. I am completely clueless what is the mistake.

Can any one guide me where I am doing the mistakes. Its an simple spring boot rest application, do I am making any mistake in coding or any configuration.

Upvotes: 1

Views: 1705

Answers (4)

Mike
Mike

Reputation: 809

also faced this (burned 4 hours on it) it was something broken in the firebase subdomain Redirecting to the actual function.. just gave it the orignal URL of the functions and it just worked... nothing in the google logs not even a line..

Upvotes: 0

mohammed_ayaz
mohammed_ayaz

Reputation: 688

One reason might be that the SSL Certificate of your push endpoint might be expired. It took me half a day to figure it out. Pubsub requires a working SSL certificate.

You can look up the type of errors in Google's stack monitoring. If it is a pubsub_interal_push error then most likely it is a certificate issue.

Usually, Google doesn't accept URLs without HTTPS but in my case - I had an HTTP URL. The certificate had an issue.

Upvotes: 0

yaugenka
yaugenka

Reputation: 2871

I faced the same problem and the funny turnout was that it was my server's fail2ban who banned google ip addresses.

Upvotes: 0

David Torres
David Torres

Reputation: 11

I recommend you looking in Cloud Monitoring, you can use the push metrics, which start with the name "Push Request", to figure out if your messages are being pushed to your endpoint and if your endpoint is returning errors to Pub/Sub.

Upvotes: 1

Related Questions