8000 SSL Certificate Error · Issue #902 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

SSL Certificate Error #902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
reyesmfabian opened this issue Feb 12, 2021 · 3 comments
Closed

SSL Certificate Error #902

reyesmfabian opened this issue Feb 12, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@reyesmfabian
Copy link

In a clean installation of version 0.7.0 the SSL certificate is not automatically generated for the production environment.

image

This is the composer file

`version: '3'

services:
traefik:
image: traefik:2.3
container_name: appwrite-traefik
command:
- --providers.file.directory=/storage/config
- --providers.file.watch=true
- --providers.docker=true
- --providers.docker.exposedByDefault=false
- --providers.docker.constraints=Label(traefik.constraint-label-stack,appwrite)
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- appwrite-config:/storage/config:ro
- appwrite-certificates:/storage/certificates:ro
depends_on:
- appwrite
networks:
- gateway
- appwrite

appwrite:
image: appwrite/appwrite:0.7.0
container_name: appwrite
restart: unless-stopped
networks:
- appwrite
labels:
- traefik.enable=true
- traefik.constraint-label-stack=appwrite
- traefik.http.routers.appwrite.rule=PathPrefix(/)
- traefik.http.routers.appwrite-secure.rule=PathPrefix(/)
- traefik.http.routers.appwrite-secure.tls=true
volumes:
- appwrite-uploads:/storage/uploads:rw
- appwrite-cache:/storage/cache:rw
- appwrite-config:/storage/config:rw
- appwrite-certificates:/storage/certificates:rw
- appwrite-functions:/storage/functions:rw
depends_on:
- mariadb
- redis
- clamav
- influxdb
environment:
- _APP_ENV
- _APP_SYSTEM_EMAIL_NAME={My Name}
- _APP_SYSTEM_EMAIL_ADDRESS={My Email}
- _APP_SYSTEM_SECURITY_EMAIL_ADDRESS={My Email}
- _APP_OPTIONS_ABUSE=disabled
- _APP_OPTIONS_FORCE_HTTPS=enabled
- _APP_CONSOLE_WHITELIST_EMAILS={My Email}
- _APP_OPENSSL_KEY_V1={MyKey}
- _APP_DOMAIN={My Public Domain}
- _APP_DOMAIN_TARGET={My Public Domain}
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_DB_HOST
- _APP_DB_PORT
- _APP_DB_SCHEMA
- _APP_DB_USER
- _APP_DB_PASS
- _APP_SMTP_HOST={SMTP Host}
- _APP_SMTP_PORT=587
- _APP_SMTP_SECURE=tls
- _APP_SMTP_USERNAME={SMTP Email}
- _APP_SMTP_PASSWORD={SMTP Pass}
- _APP_USAGE_STATS
- _APP_INFLUXDB_HOST
- _APP_INFLUXDB_PORT
- _APP_STORAGE_LIMIT
- _APP_FUNCTIONS_TIMEOUT
- _APP_FUNCTIONS_CONTAINERS
- _APP_FUNCTIONS_CPUS
- _APP_FUNCTIONS_MEMORY
- _APP_FUNCTIONS_MEMORY_SWAP
- _APP_FUNCTIONS_ENVS

appwrite-worker-usage:
image: appwrite/appwrite:0.7.0
entrypoint: worker-usage
container_name: appwrite-worker-usage
restart: unless-stopped
networks:
- appwrite
depends_on:
- redis
- telegraf
environment:
- _APP_ENV
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_STATSD_HOST
- _APP_STATSD_PORT

appwrite-worker-audits:
image: appwrite/appwrite:0.7.0
entrypoint: worker-audits
container_name: appwrite-worker-audits
restart: unless-stopped
networks:
- appwrite
depends_on:
- redis
- mariadb
environment:
- _APP_ENV
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_DB_HOST
- _APP_DB_PORT
- _APP_DB_SCHEMA
- _APP_DB_USER
- _APP_DB_PASS

appwrite-worker-webhooks:
image: appwrite/appwrite:0.7.0
entrypoint: worker-webhooks
container_name: appwrite-worker-webhooks
restart: unless-stopped
networks:
- appwrite
depends_on:
- redis
- mariadb
environment:
- _APP_ENV
- _APP_SYSTEM_SECURITY_EMAIL_ADDRESS
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_DB_HOST
- _APP_DB_PORT
- _APP_DB_SCHEMA
- _APP_DB_USER
- _APP_DB_PASS

appwrite-worker-tasks:
image: appwrite/appwrite:0.7.0
entrypoint: worker-tasks
container_name: appwrite-worker-tasks
restart: unless-stopped
networks:
- appwrite
depends_on:
- redis
- mariadb
environment:
- _APP_ENV
- _APP_SYSTEM_SECURITY_EMAIL_ADDRESS
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_DB_HOST
- _APP_DB_PORT
- _APP_DB_SCHEMA
- _APP_DB_USER
- _APP_DB_PASS

appwrite-worker-deletes:
image: appwrite/appwrite:0.7.0
entrypoint: worker-deletes
container_name: appwrite-worker-deletes
restart: unless-stopped
networks:
- appwrite
depends_on:
- redis
- mariadb
volumes:
- appwrite-uploads:/storage/uploads:rw
- appwrite-cache:/storage/cache:rw
- appwrite-certificates:/storage/certificates:rw
environment:
- _APP_ENV
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_DB_HOST
- _APP_DB_PORT
- _APP_DB_SCHEMA
- _APP_DB_USER
- _APP_DB_PASS

appwrite-worker-certificates:
image: appwrite/appwrite:0.7.0
entrypoint: worker-certificates
container_name: appwrite-worker-certificates
restart: unless-stopped
networks:
- appwrite
depends_on:
- redis
- mariadb
volumes:
- appwrite-config:/storage/config:rw
- appwrite-certificates:/storage/certificates:rw
environment:
- _APP_ENV
- _APP_SYSTEM_SECURITY_EMAIL_ADDRESS
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_DOMAIN_TARGET
- _APP_DB_HOST
- _APP_DB_PORT
- _APP_DB_SCHEMA
- _APP_DB_USER
- _APP_DB_PASS

appwrite-worker-functions:
image: appwrite/appwrite:0.7.0
entrypoint: worker-functions
container_name: appwrite-worker-functions
restart: unless-stopped
networks:
- appwrite
depends_on:
- redis
- mariadb
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- appwrite-functions:/storage/functions:rw
- /tmp:/tmp:rw
environment:
- _APP_ENV
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_DB_HOST
- _APP_DB_PORT
- _APP_DB_SCHEMA
- _APP_DB_USER
- _APP_DB_PASS
- _APP_FUNCTIONS_TIMEOUT
- _APP_FUNCTIONS_CONTAINERS
- _APP_FUNCTIONS_CPUS
- _APP_FUNCTIONS_MEMORY
- _APP_FUNCTIONS_MEMORY_SWAP
- _APP_USAGE_STATS

appwrite-worker-mails:
image: appwrite/appwrite:0.7.0
entrypoint: worker-mails
container_name: appwrite-worker-mails
restart: unless-stopped
networks:
- appwrite
depends_on:
- redis
environment:
- _APP_ENV
- _APP_SYSTEM_EMAIL_NAME={My Name}
- _APP_SYSTEM_EMAIL_ADDRESS={My Email}
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_SMTP_HOST={SMTP Host}
- _APP_SMTP_PORT=587
- _APP_SMTP_SECURE=tls
- _APP_SMTP_USERNAME={SMTP Email}
- _APP_SMTP_PASSWORD={SMTP Pass}

appwrite-maintenance:
image: appwrite/appwrite:0.7.0
entrypoint: maintenance
container_name: appwrite-maintenance
restart: unless-stopped
networks:
- appwrite
depends_on:
- redis
environment:
- _APP_ENV
- _APP_REDIS_HOST
- _APP_REDIS_PORT
- _APP_MAINTENANCE_INTERVAL
- _APP_MAINTENANCE_RETENTION_EXECUTION
- _APP_MAINTENANCE_RETENTION_ABUSE
- _APP_MAINTENANCE_RETENTION_AUDIT

appwrite-schedule:
image: appwrite/appwrite:0.7.0
entrypoint: schedule
container_name: appwrite-schedule
restart: unless-stopped
networks:
- appwrite
depends_on:
- redis
environment:
- _APP_ENV
- _APP_REDIS_HOST
- _APP_REDIS_PORT

mariadb:
image: appwrite/mariadb:1.2.0 # fix issues when upgrading using: mysql_upgrade -u root -p
container_name: appwrite-mariadb
restart: unless-stopped
networks:
- appwrite
volumes:
- appwrite-mariadb:/var/lib/mysql:rw
environment:
- MYSQL_ROOT_PASSWORD=rootsecretpassword
- MYSQL_DATABASE=${_APP_DB_SCHEMA}
- MYSQL_USER=${_APP_DB_USER}
- MYSQL_PASSWORD=${_APP_DB_PASS}
command: 'mysqld --innodb-flush-method=fsync'

redis:
image: redis:6.0-alpine3.12
container_name: appwrite-redis
restart: unless-stopped
networks:
- appwrite
volumes:
- appwrite-redis:/data:rw

clamav:
image: appwrite/clamav:1.2.0
container_name: appwrite-clamav
restart: unless-stopped
networks:
- appwrite
volumes:
- appwrite-uploads:/storage/uploads

influxdb:
image: influxdb:1.8-alpine
container_name: appwrite-influxdb
restart: unless-stopped
networks:
- appwrite
volumes:
- appwrite-influxdb:/var/lib/influxdb:rw

telegraf:
image: appwrite/telegraf:1.0.0
container_name: appwrite-telegraf
restart: unless-stopped
networks:
- appwrite

networks:
gateway:
appwrite:

volumes:
appwrite-mariadb:
appwrite-redis:
appwrite-cache:
appwrite-uploads:
appwrite-certificates:
appwrite-functions:
appwrite-influxdb:
appwrite-config:
`

@reyesmfabian reyesmfabian added the bug Something isn't working label Feb 12, 2021
@eldadfux
Copy link
Member

@thesmartrenovation please provide logs for both the main appwrite container and the certs container.

docker-compose logs appwrite

and

docker-compose logs appwrite-worker-certificates

@reyesmfabian
Copy link
Author

@eldadfux

docker-compose logs appwrite

appwrite | [Static Files] Loadded 92 files
appwrite | Issuing a TLS certificate for the master domain ({MYDOMAIN}) in 30 seconds.
appwrite | Make sure your domain points to your server IP or restart your Appwrite server to try again.
appwrite | Server started succefully (max payload is 10,000,000 bytes)
appwrite | Master pid 1, manager pid 8
appwrite | Worker 1 started succefully
appwrite | [2021-02-12 15:01:28 #1.1] INFO Server is shutdown now
appwrite | [Static Files] Loadded 92 files
appwrite | Issuing a TLS certificate for the master domain ({MYDOMAIN}) in 30 seconds.
appwrite | Make sure your domain points to your server IP or restart your Appwrite server to try again.
appwrite | Server started succefully (max payload is 10,000,000 bytes)
appwrite | Master pid 1, manager pid 8
appwrite | Worker 1 started succefully
appwrite | [2021-02-12 15:06:06 #1.1] INFO Server is shutdown now
appwrite | [Static Files] Loadded 92 files
appwrite | Issuing a TLS certificate for the master domain ({MYDOMAIN}) in 30 seconds.
appwrite | Make sure your domain points to your server IP or restart your Appwrite server to try again.
appwrite | Server started succefully (max payload is 10,000,000 bytes)
appwrite | Master pid 1, manager pid 8
appwrite | Worker 1 started succefully

docker-compose logs appwrite-worker-certificates

appwrite-worker-certificates | Appwrite certificates worker v1 has started
appwrite-worker-certificates | [notice] Starting worker 45e6416788e2:7:v1-certificates
appwrite-worker-certificates | [notice] Starting work on (Job{v1-certificates} | ID: bf9848395fd5a0c3c35ee9b53d32ecc4 | CertificatesV1 | [{"document":[],"domain":"{MYDOMAIN}","validateTarget":false,"validateCNAME":false}])
appwrite-worker-certificates | Saving debug log to /var/log/letsencrypt/letsencrypt.log
appwrite-worker-certificates | Plugins selected: Authenticator webroot, Installer None
appwrite-worker-certificates | Unable to register an account with ACME server
appwrite-worker-certificates | [critical] (Job{v1-certificates} | ID: bf9848395fd5a0c3c35ee9b53d32ecc4 | CertificatesV1 | [{"document":[],"domain":"{MYDOMAIN}","validateTarget":false,"validateCNAME":false}]) has failed Exception: Failed to issue a certificate in /usr/src/code/app/workers/certificates.php:120
appwrite-worker-certificates | Stack trace:
appwrite-worker-certificates | #0 /usr/src/code/vendor/resque/php-resque/lib/Resque/Job.php(201): CertificatesV1->perform()
appwrite-worker-certificates | #1 /usr/src/code/vendor/resque/php-resque/lib/Resque/Worker.php(303): Resque_Job->perform()
appwrite-worker-certificates | #2 /usr/src/code/vendor/resque/php-resque/lib/Resque/Worker.php(242): Resque_Worker->perform(Object(Resque_Job))
appwrite-worker-certificates | #3 /usr/src/code/vendor/resque/php-resque/bin/resque(185): Resque_Worker->work(5, false)
appwrite-worker-certificates | #4 {main}

@reyesmfabian
Copy link
Author
reyesmfabian commented Feb 12, 2021

ok, my bad.... The recommendation is to set the variables in the .env file and leave docker-compose.yml by deafult. _APP_ENV must to set APP_ENV=production

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0