Coder Social home page Coder Social logo

Comments (4)

ezk06eer avatar ezk06eer commented on June 9, 2024

@Pad0y thanks for trying faraday!

We tested the docker-compose and no issues here:

image Beforehand, delete **any volumes associated and also pull a fresh image** when doing so. Also please `mv $HOME/.faraday $HOME/.faraday-bkp`

can you please share the entire output?
also:
docker image ls

the latest image id should be cff58b10bafe

From what is see it seems more a conflicting docker install than a broken image.

try this and let us know:

https://docs.docker.com/engine/install/ubuntu/#uninstall-old-versions

from faraday.

Pad0y avatar Pad0y commented on June 9, 2024

Thank you very much for your reply. I found that the md5 mirror is inconsistent with what you provided. Perhaps it is a network problem. Now I can pull the mirror and start it normally, but there are still some problems.

Attaching to faraday_redis, faraday_db, faraday_app
app_1    | Tue Mar 26 13:53:51 UTC 2024 Using existing server.ini
db_1     |
db_1     | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1     |
db_1     | 2024-03-26 13:53:51.103 UTC [1] LOG:  starting PostgreSQL 12.7 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit
db_1     | 2024-03-26 13:53:51.103 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1     | 2024-03-26 13:53:51.104 UTC [1] LOG:  listening on IPv6 address "::", port 5432
redis_1  | 1:C 26 Mar 2024 13:53:50.943 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1  | 1:C 26 Mar 2024 13:53:50.944 # Redis version=6.2.14, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1  | 1:C 26 Mar 2024 13:53:50.944 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1  | 1:M 26 Mar 2024 13:53:50.944 * monotonic clock: POSIX clock_gettime
db_1     | 2024-03-26 13:53:51.110 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1     | 2024-03-26 13:53:51.129 UTC [20] LOG:  database system was shut down at 2024-03-26 13:51:49 UTC
redis_1  | 1:M 26 Mar 2024 13:53:50.944 * Running mode=standalone, port=6379.
db_1     | 2024-03-26 13:53:51.133 UTC [1] LOG:  database system is ready to accept connections
redis_1  | 1:M 26 Mar 2024 13:53:50.944 # Server initialized
redis_1  | 1:M 26 Mar 2024 13:53:50.944 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1  | 1:M 26 Mar 2024 13:53:50.945 * Loading RDB produced by version 6.2.14
redis_1  | 1:M 26 Mar 2024 13:53:50.945 * RDB age 121 seconds
redis_1  | 1:M 26 Mar 2024 13:53:50.945 * RDB memory usage when created 0.77 Mb
redis_1  | 1:M 26 Mar 2024 13:53:50.945 # Done loading RDB, keys loaded: 0, keys expired: 0.
redis_1  | 1:M 26 Mar 2024 13:53:50.945 * DB loaded from disk: 0.000 seconds
redis_1  | 1:M 26 Mar 2024 13:53:50.945 * Ready to accept connections
app_1    | Update swagger...
app_1    | 2024-03-26T13:56:07+0000 - faraday.server.websockets.dispatcher - WARNING {MainThread} [pid:9] [dispatcher.py:54 - remove_sid()]  Could not update agents table. (psycopg2.OperationalError) could not connect to server: Connection timed out
app_1    | 	Is the server running on host "db" (172.20.0.3) and accepting
app_1    | 	TCP/IP connections on port 5432?
app_1    |
app_1    | (Background on this error at: http://sqlalche.me/e/13/e3q8)
app_1    | /usr/local/lib/python3.8/site-packages/apispec/ext/marshmallow/openapi.py:135: UserWarning: Multiple schemas resolved to the name Service. The name has been modified. Either manually add each of the schemas with a different name or provide a custom schema_name_resolver.
app_1    |   name = get_unique_schema_name(self.spec.components, name)
app_1    | /usr/local/lib/python3.8/site-packages/apispec/ext/marshmallow/common.py:65: UserWarning: Only explicitly-declared fields will be included in the Schema Object. Fields defined in Meta.fields or Meta.additional are ignored.
app_1    |   warn_if_fields_defined_in_meta(fields, Meta)
app_1    | Tue Mar 26 13:56:09 UTC 2024 Running migrations ...
app_1    | 2024-03-26T13:58:20+0000 - faraday.server.websockets.dispatcher - WARNING {MainThread} [pid:15] [dispatcher.py:54 - remove_sid()]  Could not update agents table. (psycopg2.OperationalError) could not connect to server: Connection timed out
app_1    | 	Is the server running on host "db" (172.20.0.3) and accepting
app_1    | 	TCP/IP connections on port 5432?
app_1    |
app_1    | (Background on this error at: http://sqlalche.me/e/13/e3q8)

I have opened all the corresponding ports in the firewall, but it still seems that the connection is unsuccessful. In addition, the log shows that db has an abnormal shutdown. I am not sure what happened. and I have deleted the. faraday directory and recreated the container.
image
This is the yaml file,the difference is that the default db location is modified to use a custom mount location.

version: '3.8'
services:
  db:
    image: postgres:12.7-alpine
    restart: always
    container_name: faraday_db
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=faraday
    ports:
      - '5432'
    volumes:
      - "/docker/faraday/pgdata:/var/lib/postgresql/data:rw"
  redis:
    image: 'redis:6.2-alpine'
    container_name: faraday_redis
    ports:
      - '6379'
  app:
    image: index.docker.io/faradaysec/faraday
    restart: always
    container_name: faraday_app
    entrypoint: "/entrypoint.sh"
    volumes:
     - "$HOME/.faraday:/home/faraday/.faraday:rw"
    environment:
      - PGSQL_USER=postgres
      - PGSQL_PASSWD=postgres
      - PGSQL_HOST=db
      - PGSQL_DBNAME=faraday
      - REDIS_SERVER=redis
    depends_on:
     - db
     - redis
    ports:
     - "5985:5985"

from faraday.

ezk06eer avatar ezk06eer commented on June 9, 2024

Hi your docker-compose is not healty, it seems you modified it, the volume name is wrong it should be db:

can you please use the default?

cheers!

version: '3.8'
services:
  db:
    image: postgres:12.7-alpine
    restart: always
    container_name: faraday_db
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=faraday
    ports:
      - '5432'
    volumes:
      - "db:/var/lib/postgresql/data:rw"
  redis:
    image: 'redis:6.2-alpine'
    container_name: faraday_redis
    ports:
      - '6379'
  app:
    image: index.docker.io/faradaysec/faraday
    restart: always
    container_name: faraday_app
    entrypoint: "/entrypoint.sh"
    volumes:
     - "$HOME/.faraday:/home/faraday/.faraday:rw"
    environment:
      - PGSQL_USER=postgres
      - PGSQL_PASSWD=postgres
      - PGSQL_HOST=db
      - PGSQL_DBNAME=faraday
      - REDIS_SERVER=redis
    depends_on:
     - db
     - redis
    ports:
     - "5985:5985"
volumes:
  db:
    driver: local

from faraday.

Pad0y avatar Pad0y commented on June 9, 2024

It looks like the same problem,It seems to have the same problem. I will find another machine to re-test it tomorrow. Maybe the problem is not in the mirror image...I can try to rebuild the image myself and maybe it will work. Anyway, thank you very much for your patience.
image
image
image

from faraday.

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.