Skip to content

Database plausible_events_db doesn't exist #49

Description

@productdevbook
version: "3.8"
services:
  mail:
    image: bytemark/smtp:latest
    env_file:
      - plausible-conf.env
    networks:
      - internal
    labels:
      - traefik.enable=false

  plausible_db:
    image: postgres:latest
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=postgres
    networks:
      - internal
    labels:
      - traefik.enable=false

  plausible_events_db:
    image: yandex/clickhouse-server:21.3.2.5
    volumes:
      - event-data:/var/lib/clickhouse
      - ./clickhouse/clickhouse-config.xml:/etc/clickhouse-server/config.d/logging.xml:ro
      - ./clickhouse/clickhouse-user-config.xml:/etc/clickhouse-server/users.d/logging.xml:ro
    ulimits:
      nofile:
        soft: 262144
        hard: 262144
    networks:
      - internal
    labels:
      - traefik.enable=false

  plausible:
    image: plausible/analytics:latest
    command: sh -c "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh db init-admin && /entrypoint.sh run"
    depends_on:
      - plausible_db
      - plausible_events_db
      - mail
    ports:
      - 8000
    env_file:
      - plausible-conf.env
    networks:
      - traefik-public
      - internal
    deploy:
      labels:
        - traefik.enable=true
        - traefik.constraint-label=traefik-public
        - traefik.http.routers.plausible.rule=Host(`site`)
        - traefik.http.routers.plausible.entrypoints=https
        - traefik.http.services.plausible.loadbalancer.server.port=8000
        - traefik.http.routers.plausible.tls=true
        - traefik.http.routers.plausible.tls.certresolver=le

volumes:
  db-data:
    driver: local
  event-data:
    driver: local
  geoip:
    driver: local

networks:
  traefik-public:
    external: true
  internal:
    external: false

2022.07.11 09:51:18.477067 [ 51 ] {} DynamicQueryHandler: Code: 81, e.displayText() = DB::Exception: Database plausible_events_db doesn't exist, Stack trace (when copying this message, always include the lines below):

  1. DB::DatabaseCatalog::assertDatabaseExistsUnlocked(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) const @ 0xeb0668a in /usr/bin/clickhouse
  2. DB::DatabaseCatalog::assertDatabaseExists(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) const @ 0xeb06522 in /usr/bin/clickhouse
  3. DB::Context::setCurrentDatabase(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) @ 0xeaa3cb1 in /usr/bin/clickhouse
  4. DB::HTTPHandler::processQuery(DB::Context&, DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::__1::optionalDB::CurrentThread::QueryScope&) @ 0xf845fda in /usr/bin/clickhouse
  5. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0xf84a8ee in /usr/bin/clickhouse
  6. DB::HTTPServerConnection::run() @ 0xf8d35ff in /usr/bin/clickhouse
  7. Poco::Net::TCPServerConnection::start() @ 0x11f7ccbf in /usr/bin/clickhouse
  8. Poco::Net::TCPServerDispatcher::run() @ 0x11f7e6d1 in /usr/bin/clickhouse
  9. Poco::PooledThread::run() @ 0x120b4df9 in /usr/bin/clickhouse
  10. Poco::ThreadImpl::runnableEntry(void*) @ 0x120b0c5a in /usr/bin/clickhouse
  11. start_thread @ 0x9609 in /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
  12. __clone @ 0x122293 in /usr/lib/x86_64-linux-gnu/libc-2.31.so
    (version 21.3.2.5 (official build))
    ^C * Terminal will be reused by tasks, press any key to close it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions