vsellier / easy-cozy

Easy cozy-cloud deployment
26 stars 7 forks source link

Problem connecting Cozy to Db #12

Closed Eirikr70 closed 2 years ago

Eirikr70 commented 2 years ago

Hello and thanks for sharing your image, I have tried to adapt your docker-compose file to my system, that is ARM64, behind Nginx. Here is my docker-compose.yml.

version: '3.0'

services:
  db:
    image: treehouses/rpi-couchdb:2.3.0
    container_name: db
    volumes:
      - ./data:/opt/couchdb/data
    logging:
      driver: "json-file"
      options:
        max-size: "1M"
        max-file: "10"
    restart: unless-stopped

  cozy:
    image: vsellier/easy-cozy:latest
    container_name: cozy
    environment:
      COZY_ADMIN_PASSWORD: xxx
      COZY_TLD: cozy.xxx.fr
    volumes:
      - ./storage:/usr/local/cozy-stack/storage
    ports:
      - 8082:8080
    depends_on:
      - db
    logging:
      driver: "json-file"
      options:
        max-size: "1M"
        max-file: "10"
    restart: unless-stopped

The cozy container is correctly exposed but it seems not to be able to reach the db. Here is my docker-compose logs

eric@vault:~/easy-cozy $ sudo docker-compose logs
Attaching to cozy, db
db      | ****************************************************
db      | WARNING: CouchDB is running in Admin Party mode.
db      |          This will allow anyone with access to the
db      |          CouchDB port to access your database. In
db      |          Docker's default configuration, this is
db      |          effectively any other container on the same
db      |          system.
db      |          Use "-e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password"
db      |          to set it in "docker run".
db      | ****************************************************
cozy    | Hashed passphrase will be written in /etc/cozy/cozy-admin-passphrase
cozy    | time="2022-04-01T20:33:28Z" level=warning msg="Could not reach Couchdb 2 database: Get \"http://db:5984//_up\": dial tcp 192.168.224.2:5984: connect: connection refused, retrying in 1s"
cozy    | time="2022-04-01T20:33:29Z" level=warning msg="Could not reach Couchdb 2 database: Get \"http://db:5984//_up\": dial tcp 192.168.224.2:5984: connect: connection refused, retrying in 1s"
cozy    | time="2022-04-01T20:33:30Z" level=warning msg="Could not reach Couchdb 2 database: Get \"http://db:5984//_up\": dial tcp 192.168.224.2:5984: connect: connection refused, retrying in 1s"
cozy    | time="2022-04-01T20:33:31Z" level=warning msg="Could not reach Couchdb 2 database: Get \"http://db:5984//_up\": dial tcp 192.168.224.2:5984: connect: connection refused, retrying in 1s"
cozy    | time="2022-04-01T20:33:32Z" level=warning msg="Could not reach Couchdb 2 database: Get \"http://db:5984//_up\": dial tcp 192.168.224.2:5984: connect: connection refused, retrying in 1s"
cozy    | time="2022-04-01T20:33:33Z" level=warning msg="Could not reach Couchdb 2 database: Get \"http://db:5984//_up\": dial tcp 192.168.224.2:5984: connect: connection refused, retrying in 1s"
cozy    | time="2022-04-01T20:33:34Z" level=warning msg="Could not reach Couchdb 2 database: Get \"http://db:5984//_up\": dial tcp 192.168.224.2:5984: connect: connection refused, retrying in 1s"
cozy    | Error: Could not reach Couchdb 2 database: Get "http://db:5984//_up": dial tcp 192.168.224.2:5984: connect: connection refused
cozy    | Admin passphrase already exists, skipping initialization
cozy    | time="2022-04-01T20:33:37Z" level=warning msg="Could not reach Couchdb 2 database: Get \"http://db:5984//_up\": dial tcp 192.168.224.2:5984: connect: connection refused, retrying in 1s"
cozy    | time="2022-04-01T20:33:38Z" level=warning msg="Could not reach Couchdb 2 database: Get \"http://db:5984//_up\": dial tcp 192.168.224.2:5984: connect: connection refused, retrying in 1s"
cozy    | time="2022-04-01T20:33:39Z" level=warning msg="Could not reach Couchdb 2 database: Get \"http://db:5984//_up\": dial tcp 192.168.224.2:5984: connect: connection refused, retrying in 1s"
cozy    | time="2022-04-01T20:33:44Z" level=info msg="Started in-memory broker for 21 workers type" nspace=jobs
cozy    | Ready and waiting for connections:
cozy    |   http server major started on "0.0.0.0:8080"
cozy    |   http server admin started on "0.0.0.0:6060"

Got any clue where is the problem ?

Eirikr70 commented 2 years ago

Been going on for a while. This issue is no longer active.