No connection to the usb port

I am trying to get Octoprint to work in a container.
but I cannot configure my usb port on my host machine and in my container, so that communication is done correctly.
On my host machine, I have a symbolic link of /dev/bus/usb/00x/00x -> /dev/ttyACM0
I also created a Docker user and a Docker group which I made owner of /dev/bus/usb/00x/00x.
I also set her a 777 right.
In my container I added:
“devices”: [
{
“CgroupPermissions”: “rwm”,
“PathInContainer”: “/dev/ttyACM0”,
“PathOnHost”: “/dev/ttyACM0”
}
]
but I still get the error:
Unexpected error while connecting to serial port: AUTO SerialException: ‘Could not configure port: (25,’ Not a tty ‘)’ @ comm.py:_openSerial:2661 (hook default)

Do I need to map it to /dev/ttyUSB0 …
I had already tested with another container but I did not manage to make usb work either.

no solution ?! :anguished:

still no idea? :cry:

The problem is identical whatever the usb port used and for my case, I use an octoprint docker and it’s a cable which is connected to the usb port. it is to connect a 3d printer.
It is a synology system.

We have a Docker Swarm running with three Raspberry Pis. We are unable to connect to a 3D printer using Octoprint through the Docker container. When running Octoprint it reads “No serial port found…”(See the Figure below!)

Figure 9

When we use Octoprint without Docker Containers we can connect to the 3D printers!

The Docker Compose file that is being used is the following:

version: '3'
volumes:
    octoprint-1:
    octoprint-2:
    octoprint-3:
    octoprint-4:
    octoprint-5:
    octoprint-6:
services:
creality1:
    image: octoprint/octoprint
    ports:
    #Port to reach octoprint that will control PRINTER #1
      - 5001:80
    devices:
    #Printer that belongs to creality1 container (PRINTER #1)
      - /dev/ttyUSB0:/dev/ttyUSB0
    volumes:
      - octoprint-1:/home/octoprint/.octoprint
    restart: always
  creality2:
    image: octoprint/octoprint
    ports:
    #Port to reach octoprint that will control PRINTER #2
      - 5002:80
    devices:
    #Printer that belongs to creality2 container (PRINTER #2)
      - /dev/ttyUSB1:/dev/ttyUSB1
    volumes:
      - octoprint-2:/home/octoprint/.octoprint
    restart: always
prusa1:
    image: octoprint/octoprint
    ports:
    #Port to reach octoprint that will control PRINTER #3
      - 5003:80
    devices:
    #Printer that belongs to creality1 container (PRINTER #3)
      - /dev/ttyACM0:/dev/ttyACM0
    volumes:
      - octoprint-3:/home/octoprint/.octoprint
    restart: always
  prusa2:
    image: octoprint/octoprint
    ports:
    #Port to reach octoprint that will control PRINTER #4
      - 5004:80
    devices:
    #Printer that belongs to creality2 container (PRINTER #4)
      - /dev/ttyACM1:/dev/ttyACM1
    volumes:
      - octoprint-4:/home/octoprint/.octoprint
    restart: always
  ender3:
    image: octoprint/octoprint
    ports:
    #Port to reach octoprint that will control PRINTER #5
      - 5005:80
    devices:
    #Printer that belongs to Ender 3 container (PRINTER #5)
      - /dev/ttyUSB0:/dev/ttyUSB0
    volumes:
      - octoprint-5:/home/octoprint/.octoprint
    restart: always
  CreatorPro:
    image: octoprint/octoprint
    ports:
    #Port to reach octoprint that will control PRINTER #6
      - 5006:80
    devices:
    #Printer that belongs to Creator Pro container (PRINTER #6)
      - /dev/ttyACM0:/dev/ttyACM0
    volumes:
      - octoprint-6:/home/octoprint/.octoprint
    restart: always

Any suggestions that may have are welcomed.

If the documentation still is up to date, this is the reason why it doesn’t work with swarm stack deployments:

Thanks, Metin Y. for your quick reply.