appwrite: 🐛 Bug Report: Error Invalid endpoint or your Appwrite server is not running as expected
👟 Reproduction steps
When i try to login using Appwrite CLI and Server Name (FQDN), i get this error message:
✗ Error Invalid endpoint or your Appwrite server is not running as expected.
I have a Nginx as reverse proxy and already did a lot of configurations. A simple curl is ok:
curl https://appwrite.domain.com/v1/health/version
{"version":"1.2.1"}
Login with IP address, fine!
$ appwrite login
? Enter your email [felipe@domain.com](mailto:felipe@domain.com)
? Enter your password *******
? Enter the endpoint of your Appwrite server http://10.0.0.1/v1
✓ Success
Login with FQDN, fail…
$ appwrite login
? Enter your email [felipe@domain.com](mailto:felipe@domain.com)
? Enter your password *******
? Enter the endpoint of your Appwrite server https://appwrite.domain.com/v1
✗ Error Invalid endpoint or your Appwrite server is not running as expected.
Testing CLI with --verbose
> appwrite client --endpoint https://appwrite.domain.com/v1 --verbose
Error: Invalid endpoint or your Appwrite server is not running as expected.
at C:\snapshot\sdk-for-cli\lib\commands\generic.js:90:23
at processTicksAndRejections (node:internal/process/task_queues:96:5)
OBS: Could not find C:\snapshot\sdk-for-cli\
im my computer. Is it normal?
This is the Nginx server config /etc/nginx/sites-enabled/appwrite.conf :
server{
listen 80;
server_name appwrite.domain.com;
return 301 https://appwrite.domain.com$request_uri;
}
server{
listen 443 ssl;
server_name appwrite.domain.com;
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
add_header X-Served-By $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://10.0.0.1;
}
}
SSL settings are in nginx.conf
👍 Expected behavior
$ appwrite login ? Enter your email felipe@domain.com ? Enter your password ******* ? Enter the endpoint of your Appwrite server https://appwrite.domain.com/v1 ✓ Success
👎 Actual Behavior
$ appwrite login ? Enter your email felipe@domain.com ? Enter your password ******* ? Enter the endpoint of your Appwrite server https://appwrite.domain.com/v1 ✗ Error Invalid endpoint or your Appwrite server is not running as expected.
🎲 Appwrite version
Version 1.2.x
💻 Operating system
Linux
🧱 Your Environment
Cloud Provider: Azure Appwrite Version: 1.2.1 Nginx - Reverse Proxy
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn’t find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (9 by maintainers)
Thanks for reaching out on Discord! 🙏🏼
After modifying the error handler to log the exception, I saw the error was:
It seems the certificate on your server didn’t have the full certificate chain so node wasn’t able to fully verify the certificate. The workaround is either to:
~/.appwrite/prefs.json
to set theendpoint
to your endpoint andselfSigned
totrue
.