Budibase / budibase

Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
https://budibase.com
Other
22.47k stars 1.55k forks source link

Docker Compose pull caused "Error creating app" and "Error initialising app: Not Found" #8648

Closed zawiya closed 1 year ago

zawiya commented 1 year ago

Hosting

Describe the bug All was working well 2 days ago until I ran a docker-compose pull Now I get an "Error initialising app: Not Found" when trying to open any of my existing apps and an "Error creating app" when trying to create a new app. When trying to create a new one, I get the below console error: "Unable to write to object store bucket."

To Reproduce Steps to reproduce the behavior:

  1. Run `sudo docker-compose down; sudo docker-compose pull; sudo docker-compose up -d;"
  2. Click on one of your existing apps.
  3. See error

Expected behavior My apps should open as usual. I can't edit, or manage them.

Screenshots image

Desktop (please complete the following information):

zawiya commented 1 year ago

When I run it un-detached I see minio giving me these warnings/errors:

minio-service_1       | WARNING: MINIO_ACCESS_KEY and MINIO_SECRET_KEY are deprecated.
minio-service_1       |          Please use MINIO_ROOT_USER and MINIO_ROOT_PASSWORD
minio-service_1       | ERROR Unable to use the drive /data: Drive /data: found backend type fs, expected xl or xl-single - to migrate to a supported backend visit https://min.io/docs/minio/linux/operations/install-deploy-manage/migrate-fs-gateway.html: Invalid arguments specified

Any ideas?

zawiya commented 1 year ago

When I run budi backups --export --env .env I get the error: Error - Error: Unable to access MinIO/S3 - check environment config.

zawiya commented 1 year ago

I added the below to the docker-compose.yaml:

minio-service:
    restart: unless-stopped
    image: minio/minio:RELEASE.2022-10-24T18-35-07Z

It now works however does this mean I can never update minio?

CartCaved commented 1 year ago

I encountered the same issue on an air-gapped network. Worked again after finding this issue and realising it was the minio image, so I could revert.

sahjanivishal commented 1 year ago

Facing the same issue, @zawiya Can you please share your docker-compose.yaml (with secrets redacted ofcourse)? I'm using the all in one image for budibase

zawiya commented 1 year ago

It's below @sahjanivishal The main change is:

minio-service:
    restart: unless-stopped
    image: minio/minio:RELEASE.2022-10-24T18-35-07Z

docker-compose.yaml

version: "3"

# optional ports are specified throughout for more advanced use cases.

services:
  app-service:
    restart: unless-stopped
    image: budibase.docker.scarf.sh/budibase/apps
    container_name: bbapps
    environment:
      SELF_HOSTED: 1
      COUCH_DB_URL: http://${COUCH_DB_USER}:${COUCH_DB_PASSWORD}@couchdb-service:5984
      WORKER_URL: http://worker-service:4003
      MINIO_URL: http://minio-service:9000
      MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
      MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
      INTERNAL_API_KEY: ${INTERNAL_API_KEY}
      BUDIBASE_ENVIRONMENT: ${BUDIBASE_ENVIRONMENT}
      PORT: 4002
      JWT_SECRET: ${JWT_SECRET}
      LOG_LEVEL: info
      SENTRY_DSN: https://a34ae347621946bf8acded18e5b7d4b8@o420233.ingest.sentry.io/5338131
      ENABLE_ANALYTICS: "true"
      REDIS_URL: redis-service:6379
      REDIS_PASSWORD: ${REDIS_PASSWORD}
      BB_ADMIN_USER_EMAIL: ${BB_ADMIN_USER_EMAIL}
      BB_ADMIN_USER_PASSWORD: ${BB_ADMIN_USER_PASSWORD}
      PLUGINS_DIR: ${PLUGINS_DIR}
    depends_on:
      - worker-service
      - redis-service
#    volumes:
#      - /some/path/to/plugins:/plugins

  worker-service:
    restart: unless-stopped
    image: budibase.docker.scarf.sh/budibase/worker
    container_name: bbworker
    environment:
      SELF_HOSTED: 1
      PORT: 4003
      CLUSTER_PORT: ${MAIN_PORT}
      JWT_SECRET: ${JWT_SECRET}
      MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
      MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
      MINIO_URL: http://minio-service:9000
      APPS_URL: http://app-service:4002
      COUCH_DB_USERNAME: ${COUCH_DB_USER}
      COUCH_DB_PASSWORD: ${COUCH_DB_PASSWORD}
      COUCH_DB_URL: http://${COUCH_DB_USER}:${COUCH_DB_PASSWORD}@couchdb-service:5984
      SENTRY_DSN: https://a34ae347621946bf8acded18e5b7d4b8@o420233.ingest.sentry.io/5338131
      INTERNAL_API_KEY: ${INTERNAL_API_KEY}
      REDIS_URL: redis-service:6379
      REDIS_PASSWORD: ${REDIS_PASSWORD}
    depends_on:
      - redis-service
      - minio-service
      - couch-init

  minio-service:
    restart: unless-stopped
    image: minio/minio:RELEASE.2022-10-24T18-35-07Z
    volumes:
      - minio_data:/data
    environment:
      MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
      MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
      MINIO_BROWSER: "off"
    command: server /data --console-address ":9001"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3

  proxy-service:
    restart: unless-stopped
    ports:
      - "${MAIN_PORT}:10000"
    container_name: bbproxy
    image: budibase/proxy
    environment:
      - PROXY_RATE_LIMIT_WEBHOOKS_PER_SECOND=10
      - PROXY_RATE_LIMIT_API_PER_SECOND=20
    depends_on:
      - minio-service
      - worker-service
      - app-service
      - couchdb-service

  couchdb-service:
    restart: unless-stopped
    image: ibmcom/couchdb3
    environment:
      - COUCHDB_PASSWORD=${COUCH_DB_PASSWORD}
      - COUCHDB_USER=${COUCH_DB_USER}
    volumes:
      - couchdb3_data:/opt/couchdb/data

  couch-init:
    image: curlimages/curl
    environment:
      PUT_CALL: "curl -u ${COUCH_DB_USER}:${COUCH_DB_PASSWORD} -X PUT couchdb-service:5984"
    depends_on:
      - couchdb-service
    command: ["sh","-c","sleep 10 && $${PUT_CALL}/_users && $${PUT_CALL}/_replicator; fg;"]

  redis-service:
    restart: unless-stopped
    image: redis
    command: redis-server --requirepass ${REDIS_PASSWORD}
    volumes:
      - redis_data:/data

  watchtower-service:
    restart: always
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --debug --http-api-update bbapps bbworker bbproxy
    environment:
      - WATCHTOWER_HTTP_API=true
      - WATCHTOWER_HTTP_API_TOKEN=budibase
      - WATCHTOWER_CLEANUP=true
    labels:
      - "com.centurylinklabs.watchtower.enable=false"

volumes:
  couchdb3_data:
    driver: local
  minio_data:
    driver: local
  redis_data:
    driver: local
melohagan commented 1 year ago

Hey @zawiya

What version of Budibase were you running before upgrading to 2.1.24 ? Even if you could remember whether it was 2.1.x or 2.0.x would be useful

Would you be able to share either/both of your apps via app export?

fuerst commented 1 year ago

Getting the same error after upgrading from v2.0.30 to v2.2.14.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity.