Google Cloud Tasks not dispatching HTTP requests

Viewed 659

I'll start this by saying I'm new to using Google Cloud Tasks, so please forgive me if this is an obvious issue.

I've created a new Cloud Task queue using gcloud with the command:

gcloud tasks queues create default

I've then proceeded to add tasks to the queue from a Ruby on Rails applciation, and from the command-line using this command:

gcloud tasks create-http-task --queue=default --url=https://google.com --method GET

I then see the tasks being added to the queue, but the HTTP requests are never made. As well the queue itself says that there's no "Tasks In Queue" even though the ones I've made are listed in the tasks list right below this message:

enter image description here

I've enabled logging with:

gcloud tasks queues update default --log-sampling-ratio=1.0

and can see the tasks being created in the logs, but there are no logs for the individual tasks.

The Cloud Run service I'm invoking has been made publicly accessible, and if I manaully POST the task payload to the url in the task it works. I'm using GET google.com as I assume it's reliably accessible.

Is anyone able to tell me what I'm doing wrong? This is the last item I need to sort to wrap up our projects move to Google Cloud! Thank-you!

1 Answers

In case anyone else runs upon this, there's one more trick to enabling Google Cloud Tasks.

After making sure that App Engine is setup on your project, you also need to make sure that the application itself has not been disabled! It turns out the project I was on was using App Engine many years ago and the only application was disabled in the App Engine settings. Enabling this again made everything work as you'd expect.

You can find the setting by going to "App Engine", "Settings", then checking the "Disable Application" setting.

Good-luck to anyone reading this!

enter image description here

Related