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
- Sites Runtimes 1.8.0 Self-Hosting. Flutt...
I have a problem with the Flutter version for SITES RUNTIMES. I use self-hosting and updated to version 1.8.0, which according to the changelog says they updat...
- getFilePreview , getFileView , getFileDo...
I am on Appwrite self hosted 1.8.0 I use the web sdk 21.3.0 I created a bucket and it has this permission (users:create) then i enabled the file security then ...
- Custom Domain Verification Failed
Hi! I woke up to my app not working because of this custom domain verification failed error. I have not moved any DNS configuration since I set it up 3 years ag...