I'm running into an issue where when I run appwrite client --endpoint [endpoint]
I am getting the error: ✗ Error Invalid endpoint or your Appwrite server is not running as expected.
.
I've tried deleting and changing the ~/.appwrite/prefs.json
with no luck. Once I did change it to {}
, and I had thought I had figure it out. But when I rebuilt the server from scratch it doesn't work.
I've got a terraform+ansible script that provisions and creates the server cluster (docker swarm) so I know the cluster is exactly the same every time.
I've got another cluster I've had running for a while and that endpoint can be added every time, just not the new one. All the services are up and running in docker and I can create the whole database, functions, deployments, users, etc... the CLI just isn't wanting to connect.
Any ideas what might be wrong?
The endpoint is correct. It's formatted as https://subdomain.domain.com/v1
. The DNS record is available and I can do whatever I want via the console.
I think that it might need to wait until the SSL is provisioned?
First try this
- Delete (or move)
~/.appwrite/prefs.json
file - curl your endpoint like so
curl endpoint.com/versions
Check if you're getting the versions JSON 3. Run this command
appwrite client --selfSigned true
- Login
appwrite login
I'm getting a curl: (6) Could not resolve host: [domain]
for the 2nd command. I was thinking that might be DNS, but the browser can access it. So something is taking a bit for curl to access it.
Browser and curl are running on the same machine?
yes
what version of appwrite are you on?
V1.3.8
so you did curl https://[DOMAIN]/versions
and got the could not resolve host error?
Ya, but it reliability works after a while
Just take 10+ mins
So to summarize
- Accessing
https://[DOMAIN]/versions
in your browser works fast? - Accessing
https://[DOMAIN]/versions
in the command line is slow?
Didn't try /versions
in the browser, but the domain resolves and the console works.
So what doesn't?
appwrite-cli and curl not accessing /versions
Are you using wsl? mac? windows?
mac
Try to run
ipconfig /flushdns
Then run the curl https://[DOMAIN]/versions
and share the results
next time I spin the cluster down and re-deploy I'll try that and /versions
in the browser.
I believe this worked on macOS. I did have to use this instead of the command you used: sudo killall -HUP mDNSResponder
[SOLVED] New Appwrite Instance not working with CLI
Recommended threads
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...
- Create admin user?
I'm not really sure how this is supposed to work, I installed Appwrite through docker-compose and set it up. When I launched the app and went into it, I created...