eikek / docspell

Assist in organizing your piles of documents, resulting from scanners, e-mails and other sources with miminal effort.
https://docspell.org
GNU Affero General Public License v3.0
1.5k stars 116 forks source link

Docspell doesn't upload documents #2600

Closed deimjons closed 1 month ago

deimjons commented 2 months ago

Hello. Docspell doesn't upload documents. Please help to solve this problem

Screenshot 2024-04-19 at 17 34 14

In the logs of docspell_restserver is an error

2024.04.19 17:32:48:0000 [io-comp...] [ERROR] org.http4s.ember.server.EmberServerBuilderCompanionPlatform - WebSocket connection terminated with exception
java.util.concurrent.TimeoutException: 60 seconds
        at timeout @ org.http4s.ember.core.Util$.timeoutMaybe(Util.scala:106)
        at main$ @ docspell.restserver.Main$.main(Main.scala:14)
        at timeout @ org.http4s.ember.core.Util$.timeoutMaybe(Util.scala:106)
        at timeout @ org.http4s.ember.core.Util$.timeoutMaybe(Util.scala:106)

in the logs of docspell_joex is an error

2024.04.19 17:30:08:0005 [io-comp...] [ERROR] docspell.pubsub.naive.NaivePubSub.publishRemote:173 - Error publishing job-finished message remotely
org.http4s.ember.client.internal.ClientHelpers$MissingOrInvalidHost: Invalid hostname: docspell_restserver
        at org.http4s.ember.client.internal.ClientHelpers$.$anonfun$getAddress$2(ClientHelpers.scala:243)
        at cats.ApplicativeError$LiftFromOptionPartially$.apply$extension(ApplicativeError.scala:371)
        at cats.syntax.OptionOps$LiftToPartiallyApplied.apply(option.scala:395)
        at org.http4s.ember.client.internal.ClientHelpers$.getAddress(ClientHelpers.scala:243)
        at org.http4s.ember.client.internal.ClientHelpers$.requestKeyToSocketWithKey(ClientHelpers.scala:103)
        at org.http4s.ember.client.EmberClientBuilder.$anonfun$build$8(EmberClientBuilder.scala:263)
        at org.typelevel.keypool.KeyPool$.$anonfun$take$6(KeyPool.scala:302)
        at scala.Option.fold(Option.scala:263)
        at org.typelevel.keypool.KeyPool$.$anonfun$take$5(KeyPool.scala:302)
        at flatMap @ org.http4s.ember.client.internal.ClientHelpers$.getAddress(ClientHelpers.scala:243)
        at make @ docspell.common.ThreadFactories$.executorResource(ThreadFactories.scala:48)
        at make @ docspell.common.ThreadFactories$.executorResource(ThreadFactories.scala:48)
        at ref @ fs2.concurrent.SignallingRef$.of(Signal.scala:240)
        at modify @ fs2.internal.Scope.close(Scope.scala:262)
        at onError$extension @ org.typelevel.keypool.KeyPool$Builder.keepRunning$1(KeyPool.scala:370)

The logs of docspell_db:

PostgreSQL init process complete; ready for start up.
2024-04-20 00:30:03.590 UTC [1] LOG:  starting PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-04-20 00:30:03.590 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-04-20 00:30:03.591 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2024-04-20 00:30:03.592 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-04-20 00:30:03.597 UTC [63] LOG:  database system was shut down at 2024-04-20 00:30:03 UTC
2024-04-20 00:30:03.603 UTC [1] LOG:  database system is ready to accept connections
2024-04-20 00:30:05.814 UTC [67] ERROR:  relation "flyway_schema_history" does not exist at character 22
2024-04-20 00:30:05.814 UTC [67] STATEMENT:  select count(1) from flyway_schema_history
2024-04-20 00:35:03.676 UTC [61] LOG:  checkpoint starting: time
2024-04-20 00:35:40.408 UTC [61] LOG:  checkpoint complete: wrote 357 buffers (2.2%); 0 WAL file(s) added, 0 removed, 0 recycled; write=36.113 s, sync=0.557 s, total=36.732 s; sync files=496, longest=0.034 s, average=0.002 s; distance=2911 kB, estimate=2911 kB; lsn=0/1BEAE28, redo lsn=0/1BEADF0

My docker-compose.yml

version: '3.9'
services:
  docspell_restserver:
    image: docspell/restserver:latest
    container_name: docspell_restserver
    restart: unless-stopped
    depends_on:
      - docspell_solr
      - docspell_db
    environment:
      TZ: $TZ
      DOCSPELL_SERVER_INTERNAL__URL: http://docspell_restserver:7880
      DOCSPELL_SERVER_ADMIN__ENDPOINT_SECRET: admin
      DOCSPELL_SERVER_AUTH_SERVER__SECRET: k4nDNBV6V5vEo
      DOCSPELL_SERVER_BACKEND_JDBC_PASSWORD: vcbbnbfgchvjbk
      DOCSPELL_SERVER_BACKEND_JDBC_URL: jdbc:postgresql://docspell_db:5432/docspell
      DOCSPELL_SERVER_BACKEND_JDBC_USER: docspell
      DOCSPELL_SERVER_BIND_ADDRESS: 0.0.0.0
      DOCSPELL_SERVER_FULL__TEXT__SEARCH_ENABLED: true
      DOCSPELL_SERVER_FULL__TEXT__SEARCH_SOLR_URL: http://docspell_solr:8983/solr/docspell
      DOCSPELL_SERVER_INTEGRATION__ENDPOINT_ENABLED: true
      DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_ENABLED: true
      DOCSPELL_SERVER_INTEGRATION__ENDPOINT_HTTP__HEADER_HEADER__VALUE: dgfjfugyilhonbcv
      DOCSPELL_SERVER_BACKEND_SIGNUP_MODE: invite
      DOCSPELL_SERVER_BACKEND_SIGNUP_NEW__INVITE__PASSWORD: FSguCoHRsp6
      DOCSPELL_SERVER_BACKEND_ADDONS_ENABLED: false
    labels:
      traefik.enable: true
      traefik.docker.network: traefik
      traefik.http.services.docspell.loadbalancer.server.port: 7880

      traefik.http.routers.docspell-http.rule: Host(`docspell.example.com`)
      traefik.http.routers.docspell-http.entrypoints: web
      traefik.http.routers.docspell-http.middlewares: https-redirect

      traefik.http.routers.docspell-https.rule: Host(`docspell.example.com`)
      traefik.http.routers.docspell-https.entrypoints: websecure
      traefik.http.routers.docspell-https.tls: true
      traefik.http.routers.docspell-https.tls.certresolver: prod
    networks:
      - docspell
      - traefik
    ports:
      - 7880:7880

  docspell_joex:
    image: docspell/joex:latest
    container_name: docspell_joex
    restart: unless-stopped
    depends_on:
      - docspell_solr
      - docspell_db
    environment:
      TZ: $TZ
      DOCSPELL_JOEX_APP__ID: joex1
      DOCSPELL_JOEX_PERIODIC__SCHEDULER_NAME: joex1
      DOCSPELL_JOEX_SCHEDULER_NAME: joex1
      DOCSPELL_JOEX_BASE__URL: http://docspell_joex:7878
      DOCSPELL_JOEX_BIND_ADDRESS: 0.0.0.0
      DOCSPELL_JOEX_FULL__TEXT__SEARCH_ENABLED: true
      DOCSPELL_JOEX_FULL__TEXT__SEARCH_SOLR_URL: http://docspell_solr:8983/solr/docspell
      DOCSPELL_JOEX_JDBC_PASSWORD: vcbbnbfgchvjbk
      DOCSPELL_JOEX_JDBC_URL: jdbc:postgresql://docspell_db:5432/docspell
      DOCSPELL_JOEX_JDBC_USER: docspell
      DOCSPELL_JOEX_ADDONS_EXECUTOR__CONFIG_RUNNER: docker,trivial
      DOCSPELL_JOEX_CONVERT_HTML__CONVERTER: weasyprint
    networks:
      - docspell
    # ports:
    #   - 7878:7878

  docspell_consumedir:
    image: docspell/dsc:latest
    container_name: docspell_consumedir
    command:
      - dsc
      - "-d"
      - "http://docspell_restserver:7880"
      - "watch"
      - "--delete"
      - "-ir"
      - "--not-matches"
      - "**/.*"
      - "--header"
      - "Docspell-Integration: dgfjfugyilhonbcv"
      - "/opt/docs"
    restart: unless-stopped
    depends_on:
      - docspell_restserver
    volumes:
      - docs:/opt/docs
    networks:
      - docspell

  docspell_db:
    image: postgres:16.2
    container_name: docspell_db
    restart: unless-stopped
    environment:
      POSTGRES_USER: docspell
      POSTGRES_PASSWORD: vcbbnbfgchvjbk
      POSTGRES_DB: docspell
    volumes:
      - db:/var/lib/postgresql/data/
    networks:
      - docspell

  docspell_solr:
    image: solr:9
    container_name: docspell_solr
    restart: unless-stopped
    volumes:
      - solr:/var/solr
    command:
      - bash
      - -c
      - 'precreate-core docspell; exec solr -f -Dsolr.modules=analysis-extras'
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8983/solr/docspell/admin/ping"]
      interval: 1m
      timeout: 10s
      retries: 2
      start_period: 30s
    networks:
      - docspell

volumes:
  db:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: $VOLUMES_PATH_PREFIX/docspell/volumes/db
  docs:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: $VOLUMES_PATH_PREFIX/docspell/volumes/docs
  solr:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: $VOLUMES_PATH_PREFIX/docspell/volumes/solr
networks:
  traefik:
    external: true
  docspell:
    name: docspell
eikek commented 2 months ago

The hostname is not valid, as mentioned in the logs: Invalid hostname: docspell_restserver - underscores are not allowed in host names. The provided compose file uses dashes. You seem to have changed it to underscores? This issue is also relevant, mentioning the same error #2580

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. This only applies to 'question' issues. Always feel free to reopen or create new issues. Thank you!