edgedb-python icon indicating copy to clipboard operation
edgedb-python copied to clipboard

Unable to connect edgedb instance running in GCP VM

Open rajeshdhanda opened this issue 2 years ago • 2 comments

Instance running in VM $ edgedb instance list ┌───────┬────────────┬───────┬──────────────────┬─────────┐ │ Kind │ Name │ Port │ Version │ Status │ ├───────┼────────────┼───────┼──────────────────┼─────────┤ │ local │ quickstart │ 10700 │ 1.0-rc.3+147eb62 │ running │ └───────┴────────────┴───────┴──────────────────┴─────────┘ I want to connect to instance from outside of vm using conn = edgedb.connect(host= "vm external ip", port=10700) but still not able to connect. getting error ClientConnectionFailedTemporarilyError: [Errno 111] Connection refused After 114 attempts in 30.1 sec Is the server running on host 'VM external IP' and accepting TCP/IP connections on port 10700? firewall rules and network tags checked already.

@elprans @1st1 @tailhook @fantix

rajeshdhanda avatar Dec 22 '21 07:12 rajeshdhanda

Try listening on the external IP address too: https://www.edgedb.com/docs/reference/admin/configure#examples

conn = edgedb.connect(host= "vm external ip", port=10700)

You'll probably meet certificate issues here too - either set EDGEDB_CLIENT_SECURITY=insecure_dev_mode or use edgedb instance link on the client host. These methods are intended for development not production though.

fantix avatar Dec 23 '21 16:12 fantix

That's right. edgedb project and edgedb instance are intended to be ran on a development machine and the instances they manage listen on localhost by default. Here's a draft guide on how to deploy EdgeDB to GCP in production mode.

elprans avatar Dec 23 '21 16:12 elprans

Closing due to inactivity. Please feel free to ask more questions in our community.

fantix avatar May 25 '23 18:05 fantix