pkumar0
pkumar0

Reputation: 2239

Connecting to mongodb instance on google app engine

I am trying to open the mongodb instance I created using the compute engine cloud launcher so that I can access it from anywhere. Can you help me understand what is going wrong here?

gcloud config set project my-project

gcloud compute firewall-rules create allow-mongo-arbiter --description "Incoming mongo allowed." --target-tags=mongo-arbiter --allow tcp:27017

Created [allow-mongo].
NAME        NETWORK SRC_RANGES RULES     SRC_TAGS            TARGET_TAGS
allow-mongo-arbiter default            tcp:27017              mongo-arbiter

gcloud compute firewall-rules create allow-mongo-server --description "Incoming mongo allowed." --target-tags=mongo-server --allow tcp:27017

Created [allow-mongo-server].
NAME               NETWORK SRC_RANGES RULES     SRC_TAGS           TARGET_TAGS
allow-mongo-server default            tcp:27017                    mongodb-server

When I ssh to the mongo server, 27017 is listening. Tried resetting the VMs

There is no port open: telnet 27017 does not connect

Upvotes: 1

Views: 773

Answers (1)

Nick
Nick

Reputation: 3591

The issue was that the tags were not attached to the instances. Always good to have another anonymous user sanity-check the things we don't expect~!!

Upvotes: 1

Related Questions