Paperless-NGX suddenly stops working

Hi,
I have a Synology DS720+ on which I run Docker.
A long time ago I had installed Paperless-NGX via a Youtube video. Additionally with “redis”, “gotenberg” and “tika”. Since today it no longer works. I have no idea why. :frowning:

I had added this as a stack in Portainer. Now when I want to re-deploy the stack, Portainer shows me the following error message:

Type: Error
Title: Failure
Dettails: Failed to deploy a stack: time=“2025-01-26T15:47:17Z” level=warning msg="/data/compose/1/docker-compose. yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion” Network paperlessngx-1_default Creating Network paperlessngx-1_default Created Container paperlessngx-1-broker-1 Creating Container paperlessngx-1-gotenberg-1 Creating Container paperlessngx-1-tika-1 Creating Container paperlessngx-1-tika-1 Created Container paperlessngx-1-gotenberg-1 Created Container paperlessngx-1-broker-1 Created Container paperlessngx- 1-webserver-1 Creating Container paperlessngx-1-webserver-1 Created Container paperlessngx-1-tika-1 Starting Container paperlessngx-1-gotenberg-1 Starting Container paperlessngx-1-broker-1 Starting Container paperlessngx-1-tika-1 Started Container paperlessngx-1-broker-1 Started Container paperlessngx-1-webserver-1 Starting Container paperlessngx-1-gotenberg-1 Started Error response from daemon: driver failed programming external connectivity on endpoint paperlessngx-1-webserver-1 (4fc5cf47219fc23ce95ea4772f63de469e7f6e0a3e78cc4e4adba7ac11cc0108): Bind for 0.0.0.0:8810 failed: port is already allocated

This is what my stack looks like:

version: “3.4”
services:
  broker:
    image: docker.io/library/redis:7
    restart: unless-stopped
    volumes:
      - /volume1/docker/paperless-ngx/redisdata:/data

  webserver:
    image: ghcr.io/paperless-ngx/paperless-ngx:latest
    restart: unless-stopped
    depends_on:
      - broker
    ports:
      - 8810:8000
    healthcheck:
      test: [“CMD”, “curl”, “-fs”, “-S”, “--max-time”, “2”, “http://localhost:8000”]
      interval: 30s
      timeout: 10s
      retries: 5
    volumes:
      - /volume1/docker/paperless-ngx/data:/usr/src/paperless/data
      - /volume1/docker/paperless-ngx/media:/usr/src/paperless/media
      - /volume1/docker/paperless-ngx/export:/usr/src/paperless/export
      - /volume1/docker/paperless-ngx/consume:/usr/src/paperless/consume
# - /volume1/paperlessngxincoming:/usr/src/paperless/consume
    environment:
      PAPERLESS_REDIS: redis://broker:6379
      PAPERLESS_SECRET_KEY: I want to be the best!
      PAPERLESS_ADMIN_USER: ******
      PAPERLESS_ADMIN_PASSWORD: ******
      PAPERLESS_OCR_LANGUAGE: deu+eng
      PAPERLESS_CONSUMER_DELETE_DUPLICATES: true
      PAPERLESS_FILENAME_FORMAT: '{correspondent}/{created_year}/{created_month}/{title}'
      PAPERLESS_OCR_USER_ARGS: '{“invalidate_digital_signatures”:true}'
      PAPERLESS_TIME_ZONE: Europe/Berlin
      PAPERLESS_TIKA_ENABLED: 1
      PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000
      PAPERLESS_TIKA_ENDPOINT: http://tika:9998
      USERMAP_UID: 0
      USERMAP_GID: 0

  gotenberg:
    image: docker.io/gotenberg/gotenberg:8
    restart: unless-stopped
    command:
      - “gotenberg”
      - “--chromium-disable-javascript=true”
      - “--chromium-allow-list=file:///tmp/.*”

  tika:
    image: ghcr.io/paperless-ngx/tika:latest
    restart: unless-stopped

volumes:
  data:
  media:
  redisdata:

A few days ago I had installed “Paperless-NGX AI”. That also ran, or is still running, without any problems. At least the container.

Can someone please tell me what exactly is wrong? And above all why?

Thank you very much

Remove first line with version to remove message.

It seems port 8810 is already used, so Docker can’t start the container.

Thank you, that worked.
I have now changed the port to 8811.

No idea why the 8810 is/was supposedly and suddenly being used by something else.

Strange…

On Linux CLI, try netstat -tulpn to find processes listening on ports.

Where do I need to type that in? On Windows Shell? With Putty connected to my NAS? Or inside the container?

I also have a second Computer with Ubuntu, if that helps?!

On the machine where the containers are running. In your case it is the NAS. If you can SSH into the NAS, you can run netstat there. If netstat is not available, “ss” is the new alternative to netstat. If none of those are installed, you can run a container from the “nicolaka/netshoot” image on the host network.

The best if you use the command line to run the debug container (if needed) so nothing can mislead you. I remember similar errors by the way in portainer. I don1t remember exactly but Portainer is known to break the network sometimes. It is not that case, but if it doesn’t show a container that is using the port, you will not find it through portainer. So if you have access to the host (NAS), and the docker commands, you can run docker ps too and see if the port is shown in the list for any container.

This will work on DSM7.x (and even DSM6.x):

sudo netstat -tulpn

That worked. I also found two entries with the port 8810.

But what exactly does that mean? And why does the port appear twice?

One is TCPv4, one TCPv6. Rather unusual, that different processes use the same port on different TCP stacks.

Hmmm Okey, and… Should I react? Or is that fine?

Since it doesn’t seem intended, I would suggest changing the port of one of them.

Emby seems to be native process on the NAS, so changing the nginx container port should be easier to achieve.

Ok, I would try it. But I don’t have an nginx container running (anymore). I had that once months ago.
See attached screenshot.

I have installed Emby natively on the nas, but I changed the port myself in some config file back then. I think that would be a bigger effort. above all, I have Emby running on multiple devices everywhere. I would also have to change some clients.

So, where does the port used by nginx come from? How can I find out?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.