
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
- 1.7.0 Self Hosted Upgrade
Hi, I've tried a fresh install on 1.7.0 and I've also done a fresh install on 1.6.2. 1.6.2 is working fine fresh, update to 1.7.0 and migrate fails Fresh inst...
- Functions not work on Server only Localh...
Hi, I successfully upgraded from 1.4 to 1.7, but I'm having a problem. The functions no longer work with the settings I had. I assume some changes were made. It...
- Console Login after upgrade
Hi, running a small instance self hosted, upgraded from 1.6.0 to 1.74 this morning before spotting the migration guide... When trying to login to the console n...
