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.jsonfile - 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]/versionsin your browser works fast? - Accessing
https://[DOMAIN]/versionsin 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
- Transaction and Session
I've been debugging for hours a problem that now I think it's because It's not allowed: In my project a user log in using the `node-appwrite` SDK (SSR) I store...
- Appwrite loading issue with Nuxt UI
For some reason when I add nuxt ui to my nuxt 4 project, appwrite will build the project but the project website will load indefinitely. Without adding Nuxt UI,...
- Push Notification FCM Error
Hello dear people. I tried to integrate Push Notifications into my Flutter App. Everything works fine on Android/iOS Simulator + Testflight but as soon as I s...