Skip to content

mc: <ERROR> Unable to initialize service restart UI: could not open a new TTY: open /dev/tty: no such device or address. #5272

@EnoahNetzach

Description

@EnoahNetzach

Expected behavior

No error, service restarts.

Actual behavior

Error gets printed, the restart doesn't fail

Steps to reproduce the behavior

  1. docker-compose.yml:
services:
  minio:
    image: minio/minio:latest
    restart: always
    ports:
      - '9000:9000'
      - '9001:9001'
    volumes:
      - ./.volumes/minio-data:/data
    environment:
      MINIO_ROOT_USER: minio
      MINIO_ROOT_PASSWORD: minio123
    command: server /data --console-address ":9001"

  minio-init:
    image: minio/mc:latest
    depends_on:
      - minio
    volumes:
      - ./commands/init-minio.sh:/usr/local/bin/init_minio.sh
    entrypoint: sh -c
    command: /usr/local/bin/init_minio.sh
  1. commands/init-minio.sh:
#!/bin/bash

until mc alias set local http://minio:9000 minio minio123; do sleep 1; done;
mc admin config set local notify_webhook:1 endpoint=http://host.docker.internal:8000/report auth_token=ignore
mc admin service restart local
echo "exit: $?"
  1. docker compose up, which prints:
Added `local` successfully.
Successfully applied new settings.
Please restart your server 'mc admin service restart local'.
mc: <ERROR> Unable to initialize service restart UI: could not open a new TTY: open /dev/tty: no such device or address.
exit: 1

mc --version

inside minio/mc:latest

mc version RELEASE.2025-08-13T08-35-41Z (commit-id=7394ce0dd2a80935aded936b09fa12cbb3cb8096)
untime: go1.24.6 linux/arm64
Copyright (c) 2015-2025 MinIO, Inc.
License GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>

System information

#  docker compose version
Docker Compose version v2.39.4-desktop.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions