GithubHelp home page GithubHelp logo

Comments (8)

Vladysl avatar Vladysl commented on June 9, 2024

The root cause of the issue, that odd-platform cannot connect to database. You need to start this docker service

database:
image: postgres:13.2-alpine
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DATABASE=${POSTGRES_DATABASE}
ports:
- 5432:5432

You will find all services here docker/demo.yaml
Also you can find ${POSTGRES_USER}, ${POSTGRES_PASSWORD}, ${POSTGRES_DATABASE} here - docker/.env
If you have any questions, feel free to join our slack and we will assist you - Slack

from odd-platform.

huashaoxu avatar huashaoxu commented on June 9, 2024

This is what I did. I have executed the deployment according to the configuration of demo.yaml, and the database has been started and can be accessed normally in navicat. But collect cannot access it normally.

from odd-platform.

Vladysl avatar Vladysl commented on June 9, 2024

This exception was thrown by odd-platform, not by collector. Collector always restarts because odd-platform cannot start and collector trying to reach it.
From this exception, I can assume, that smth wrong with your DB.
could you please double check, is there postgresql://127.0.0.1:5432/odd-platform DB ?

from odd-platform.

huashaoxu avatar huashaoxu commented on June 9, 2024

odd-platform can start normally and can be accessed normally using a web browser. When I used the collector to collect another database, I found that collect was not working properly and always restarted.

from odd-platform.

Vladysl avatar Vladysl commented on June 9, 2024

could you please let me know

  1. Do you start. all this in Docker? If yes, could you please share a list of your docker containers ? 
  2. It is strange that you are trying to access 127.0.0.1:5432 localhost instead of jdbc:postgresql://database:5432/${POSTGRES_DATABASE}
  3. Could you please share your docker compose file in case you made some modifications in there ?

from odd-platform.

huashaoxu avatar huashaoxu commented on June 9, 2024

docker-compose.yaml:

version: '3.3'
services:
  database:
    image: postgres:13.2-alpine
    restart: always
    env_file: .env
    environment:
      - POSTGRES_USER=${POSTGRES_USER}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DATABASE=${POSTGRES_DATABASE}
    ports:
      - 5432:5432
    volumes:
      - odd_platform_db_home:/var/lib/postgresql/data

  odd-platform:
    image: dsatair2023/odd-platform:0.21.0
    restart: always
    environment:
      - SPRING_DATASOURCE_URL=jdbc:postgresql://database:5432/${POSTGRES_DATABASE}
      - SPRING_DATASOURCE_USERNAME=${POSTGRES_USER}
      - SPRING_DATASOURCE_PASSWORD=${POSTGRES_PASSWORD}
    env_file: .env
    ports:
      - 8080:8080

  odd-platform-enricher:
    image: python:3.9.12-alpine3.15
    volumes:
      - ./injector:/injector
      - ./config/injector:/samples
    command:
      - sh
      - ./injector/start.sh
    env_file: .env
    environment:
      - PLATFORM_HOST_URL=${PLATFORM_HOST_URL}
      - PYTHONUNBUFFERED=1
    depends_on:
      - odd-platform

  sample-postgresql:
    image: postgres:13.2-alpine
    restart: always
    env_file: .env
    volumes:
      - ./config/dump.sql:/docker-entrypoint-initdb.d/init.sql
    environment:
      - POSTGRES_USER=${SAMPLE_POSTGRES_USER}
      - POSTGRES_PASSWORD=${SAMPLE_POSTGRES_PASSWORD}
      - POSTGRES_DATABASE=${SAMPLE_POSTGRES_DATABASE}

  odd-collector:
    image: dsatair2023/odd-platform:0.21.0
    restart: always
    env_file: .env
    volumes:
      - ./config/collector_config.yaml:/app/collector_config.yaml
    environment:
      - PLATFORM_HOST_URL=${PLATFORM_HOST_URL}

volumes:
  odd_platform_db_home:
    external: false

.env file:

POSTGRES_USER=odd-platform
POSTGRES_PASSWORD=odd-platform-password
POSTGRES_DATABASE=odd-platform

PLATFORM_HOST_URL=http://odd-platform:8080

SAMPLE_POSTGRES_USER=sample_odd_platform
SAMPLE_POSTGRES_PASSWORD=sample_odd_platform_password
SAMPLE_POSTGRES_DATABASE=sample_odd_platform

from odd-platform.

Vladysl avatar Vladysl commented on June 9, 2024

odd-collector:
image: dsatair2023/odd-platform:0.21.0
restart: always
env_file: .env
volumes:
- ./config/collector_config.yaml:/app/collector_config.yaml
environment:
- PLATFORM_HOST_URL=${PLATFORM_HOST_URL}

You are using odd-platform image for odd-collector
For odd-collector we expect smth like image: ghcr.io/opendatadiscovery/odd-collector:latest

from odd-platform.

RamanDamayeu avatar RamanDamayeu commented on June 9, 2024

Seems the issue was due to the miss configuration of docker-compose: we have to use different images for platform and for collectors.

from odd-platform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.