Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to delete phantom network on google app engine?

Hello.  I set up google app engine to connect to mongodb atlas.  After some trial and error due to confusing documentation I was able to get it to work.  However this was a personal account as i was waiting for the proper account to be setup. 

Now i have to switch to the proper account.  I tried to create a new servlerless vpc connector, but i get a subnet error.  I use 10.8.0.0/28.  So i deleted the vpc connector that was setup as well and tried again.  Same error.  Also i am not sure if the vpc is actually deleted because it sort of shows up.  However it has a red exclamation point.  Something about it still being in use.

I stopped the service and disabled the instance.  Still the same error.

What else can i do to fix this error and create a new connection to mongodb atlas?

There are two errors.  Under vpc networks it shows default and when i hover over the red exclamation is shows:

"Operation type [delete] failed with message "The network resource 'projects/projectname/global/networks/default' is already being used by 'projects/projectname/global/networkInstances/v-1667228111-6255e51b-2a2d-43f4-9dce-0584aebbefd2"

When i try to recreate the serverless  connector under subnet it says, "IP range must be an unused CIDR range with mask 28, such as 10.8.0.0/28", even though i entered "10.8.0.0/28".

I also deleted the connector definition from app.yaml and pushed the app.

It all worked the first time i created the connection to mongodb atlas.

Any thoughts?

1 2 355
2 REPLIES 2

Hi @sellbyowner,

Welcome to Google Cloud Community!

10.8.0.0/28 is only a sample IP and you can use other IP addresses as long as it's within the /28 range. You can check this screenshot for your reference:

5iTfH27WcfGB8i2.png

 

 

 

Another suggestion would be following this link. The error is caused by when deleting a Serverless Access VPC connector does not automatically remove the reference of the connector from the Serverless Service that was using it prior to its deletion.

You can check for recently deleted VPC Access connectors by using this filter:

protoPayload.serviceName="vpcaccess.googleapis.com"

protoPayload.methodName="google.cloud.vpcaccess.v1.VpcAccessService.DeleteConnector"

Follow the below instructions to find connector references in Serverless Services:

  1. In App Engine Standard Environment navigate to App Engine > Versions > Config column
  2. Click View and check for references of vpc_access_connector in the yaml.
  3. In Cloud Functions navigate to Cloud Functions > Select Cloud Function > Select version > Details tab > Network settings pane. Do this for all versions of the Cloud Function.
  4. In Cloud Run navigate to Cloud Run > Select instance > Revisions > Connections > VPC Connector.

If the aforementioned steps didn't work, you may file this as a bug through this link so that our engineers could take a look at it. Please be advised that this doesn't have a specific ETA but you can check its progress once the ticket has been created.

Hope this helps.

Deleting the VPC Connector doesn't delete the subnet it was created on. 

The simplest solution is to specify a different IP range when you create your next VPC Connector; but if you really wanted to, you could also go to the VPC network page, click on your network, and then delete the subnet associated with the 10.8.0.0/28 CIDR range to get back to the state you were in before you created that first VPC Connector. If this is confusing - just go with @robertcarlos 's suggestion!