Connecting Google Cloud Memorystore with App Engine service

Laurin

I'm currently trying to connect my App Engine node.js service to a Google Cloud Memorystore. Following this guide, I need both to run in the same network and region (in my case Europe). This seems impossible since I can only create the Redis instance in europe-west-1 or europe-west-4, while App Engine offers me europe-west, europe-west-2 or europe-west-3.

I'm assuming 'same region' stands for europe-west-x ? If this is true, I'm still unable to connect, configuring the Node.js on the IP X.X.X.X:XXXX as described in the gcloud console (for my active Redis instance) the app throws connection failed, ETIMEDOUT.

Is the region the reason?

The instance has the authorized network set to default and the apps app.yaml has:

network: name: default

UPDATE:

Even when i have GAE in europe-west-1 and Memorystor in europe-west as suggested i get

Redis connection to X.X.X.X:XXXX failed - connect ETIMEDOUT X.X.X.X:XXXX

I'm using node_redis with the following code fragment to test the connection (REDIS_PORT and REDIS_IP are the values i see on the Memorystore instance page):

const redis = require('redis'); 
let redisClient = redis.createClient(REDIS_PORT, REDIS_IP);

redisClient.set("string key", "string val", redis.print);
redisClient.hset("hash key", "hashtest 1", "some value", redis.print);
redisClient.hset(["hash key", "hashtest 2", "some other value"], redis.print);
redisClient.hkeys("hash key", function (err, replies) {
    console.log(replies.length + " replies:");
    replies.forEach(function (reply, i) {
        console.log("    " + i + ": " + reply);
    });
    redisClient.quit();
});
redisClient.on("error", function (err) {
    console.log("Redis rror " + err);
});
Laurin

I realized the GAE service has to run in the flex environment, so the application is based on Google Compute Engine aswell. The env: flex was missing in the app.yaml. The communication between GAE and Memorystore is working with this configuration.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Connecting to Google Cloud SQL in Google App Engine

From Dev

Django app on Google App Engine not connecting to Google Cloud SQL

From Dev

Connecting to Google Cloud SQL from App Engine: access denied

From Dev

ENOENT when connecting to Google Cloud SQL from App Engine

From Dev

Connecting Mongoose on Google App Engine

From Dev

Connecting a Google Cloud App Engine app to its Cloud SQL Instance-allowing database access

From Dev

Google Cloud App Engine Standard Environment Node JS connection timeout when connecting Redis on Compute Engine

From Java

Google Cloud App Engine cron job - not calling the service

From Dev

How can I run PHP Service on Google Cloud App Engine

From Dev

Connecting from App Engine to Cloud SQL not working

From Dev

Connecting App Engine to Cloud SQL Access Denied

From Dev

Turn off Google Cloud Memorystore?

From Dev

MySQL server has gone away in Rails app hosted on Google Compute Engine connecting to Cloud SQL

From Dev

Connecting to Firebase from Python Google App Engine

From

Connecting Heroku App to Atlas MongoDB Cloud service

From Dev

Google Cloud: Storage and App Engine

From Dev

Google cloud storage with app engine

From Java

google app engine service unavailable

From Dev

SpringBoot App with Hibernate deployed on App Engine failed connecting to Cloud SQL

From Dev

Google Computer Engine or Google Cloud Service?

From Dev

Connecting Google Cloud Run Service to Google Cloud SQL database

From Dev

How to connect to Redis instance (memorystore) from Google's Standard App Engine (Python 3.7)

From Dev

Connecting Google Cloud SQL with Wordpress on Google Compute Engine

From Dev

Nodejs app on Google Cloud App Engine not starting

From Dev

Connecting to Cloud SQL from App Engine is slower than from localhost

From Dev

Problem while connecting to Cloud SQL from App Engine Flexible

From Dev

Google cloud endpoint on Google app engine

From Dev

Error connecting Django to Google CloudSQL Postgres database in Google App Engine

From Dev

Google Cloud API: Can't create domain mapping with App Engine service account

Related Related

  1. 1

    Connecting to Google Cloud SQL in Google App Engine

  2. 2

    Django app on Google App Engine not connecting to Google Cloud SQL

  3. 3

    Connecting to Google Cloud SQL from App Engine: access denied

  4. 4

    ENOENT when connecting to Google Cloud SQL from App Engine

  5. 5

    Connecting Mongoose on Google App Engine

  6. 6

    Connecting a Google Cloud App Engine app to its Cloud SQL Instance-allowing database access

  7. 7

    Google Cloud App Engine Standard Environment Node JS connection timeout when connecting Redis on Compute Engine

  8. 8

    Google Cloud App Engine cron job - not calling the service

  9. 9

    How can I run PHP Service on Google Cloud App Engine

  10. 10

    Connecting from App Engine to Cloud SQL not working

  11. 11

    Connecting App Engine to Cloud SQL Access Denied

  12. 12

    Turn off Google Cloud Memorystore?

  13. 13

    MySQL server has gone away in Rails app hosted on Google Compute Engine connecting to Cloud SQL

  14. 14

    Connecting to Firebase from Python Google App Engine

  15. 15

    Connecting Heroku App to Atlas MongoDB Cloud service

  16. 16

    Google Cloud: Storage and App Engine

  17. 17

    Google cloud storage with app engine

  18. 18

    google app engine service unavailable

  19. 19

    SpringBoot App with Hibernate deployed on App Engine failed connecting to Cloud SQL

  20. 20

    Google Computer Engine or Google Cloud Service?

  21. 21

    Connecting Google Cloud Run Service to Google Cloud SQL database

  22. 22

    How to connect to Redis instance (memorystore) from Google's Standard App Engine (Python 3.7)

  23. 23

    Connecting Google Cloud SQL with Wordpress on Google Compute Engine

  24. 24

    Nodejs app on Google Cloud App Engine not starting

  25. 25

    Connecting to Cloud SQL from App Engine is slower than from localhost

  26. 26

    Problem while connecting to Cloud SQL from App Engine Flexible

  27. 27

    Google cloud endpoint on Google app engine

  28. 28

    Error connecting Django to Google CloudSQL Postgres database in Google App Engine

  29. 29

    Google Cloud API: Can't create domain mapping with App Engine service account

HotTag

Archive