What's Actually Happening

MinIO object storage server fails to start. Service exits immediately or hangs during initialization.

The Error You'll See

```bash $ minio server /data

ERROR Unable to initialize backend: disk not found ```

Permission error:

bash
ERROR Unable to read config: permission denied

Port error:

bash
ERROR Unable to listen on port 9000: address already in use

Certificate error:

bash
ERROR Unable to load TLS certificate: file not found

Cluster error:

bash
ERROR Unable to connect to peers: connection refused

Why This Happens

  1. 1.Disk not found - Data directory doesn't exist or inaccessible
  2. 2.Permission denied - Insufficient permissions on data directory
  3. 3.Port conflict - Port 9000 or 9001 already in use
  4. 4.TLS issues - Invalid or missing certificates
  5. 5.Configuration errors - Wrong environment variables
  6. 6.Distributed setup issues - Peers unreachable

Step 1: Check MinIO Process

```bash # Check MinIO process: ps aux | grep minio

# Check systemd service: systemctl status minio

# Check logs: journalctl -u minio -f

# Manual start with debug: minio server /data --console-address ":9001" --debug

# Check version: minio --version

# Check config directory: ls -la /etc/minio/

# Check data directory: ls -la /data

# Check environment: cat /etc/default/minio

# Common env file: MINIO_ROOT_USER=admin MINIO_ROOT_PASSWORD=password MINIO_VOLUMES="/data" MINIO_OPTS="--console-address :9001"

# Start manually: minio server $MINIO_VOLUMES

# Check docker if using container: docker ps -a | grep minio docker logs minio-container ```

Step 2: Check Disk and Storage

```bash # Check data directory exists: ls -la /data

# Create data directory: mkdir -p /data

# Check disk space: df -h /data

# Check disk permissions: ls -la /data

# Fix permissions: chmod 755 /data chown minio:minio /data

# Check mount: mount | grep /data

# Mount disk if needed: mount /dev/sdb1 /data

# Check filesystem: df -T /data

# Check disk errors: dmesg | grep -i error

# Check for disk I/O: iostat -x /data

# Verify disk writable: touch /data/test rm /data/test

# Check for minimum disk requirements: # MinIO requires minimum disk space # Default: 2GB minimum per drive

# Configure minimum size: export MINIO_DISK_MIN_SIZE=1GB

# Check disk health: smartctl -a /dev/sdb

# For distributed mode: # Check all disks across nodes for node in node1 node2 node3 node4; do ssh $node "ls -la /data && df -h /data" done ```

Step 3: Fix Port Issues

```bash # Check ports in use: netstat -tlnp | grep -E "9000|9001" ss -tlnp | grep -E "9000|9001"

# Check what's using port: lsof -i :9000 lsof -i :9001

# Kill process on port: kill -9 <pid>

# Use different port: minio server /data --address ":9002" --console-address ":9003"

# In environment: MINIO_OPTS="--address :9002 --console-address :9003"

# Check firewall: iptables -L -n | grep 9000

# Allow ports: iptables -I INPUT -p tcp --dport 9000 -j ACCEPT iptables -I INPUT -p tcp --dport 9001 -j ACCEPT

# Using ufw: ufw allow 9000/tcp ufw allow 9001/tcp

# Using firewalld: firewall-cmd --add-port=9000/tcp --permanent firewall-cmd --add-port=9001/tcp --permanent firewall-cmd --reload

# Check reverse proxy: # If behind nginx/traefik, check upstream config

# Test port locally: nc -zv localhost 9000 nc -zv localhost 9001 ```

Step 4: Fix Permission Issues

```bash # Check user running MinIO: ps aux | grep minio

# Check data directory owner: ls -la /data

# Fix ownership: chown -R minio:minio /data

# Or if running as root: chown -R root:root /data

# Check config directory: ls -la /etc/minio/ chown -R minio:minio /etc/minio/

# Check cert directory: ls -la /root/.minio/certs/ # or /etc/minio/certs/

# Fix cert permissions: chmod 600 /etc/minio/certs/*.key chmod 644 /etc/minio/certs/*.crt

# Check systemd service user: cat /etc/systemd/system/minio.service | grep User

# Create minio user: useradd -r -s /bin/false minio

# Fix systemd service: # In /etc/systemd/system/minio.service: [Service] User=minio Group=minio

# Reload systemd: systemctl daemon-reload systemctl restart minio

# Check file descriptors: ulimit -n

# Increase file descriptors: ulimit -n 65535

# In systemd service: [Service] LimitNOFILE=65535 ```

Step 5: Check TLS Configuration

```bash # Check certificate files: ls -la /root/.minio/certs/ ls -la /etc/minio/certs/

# Required files: # public.crt - Server certificate # private.key - Private key # CAs/ - CA certificates directory

# Check certificate: openssl x509 -in public.crt -text -noout | head -20

# Check certificate expiration: openssl x509 -in public.crt -noout -dates

# Check private key: openssl rsa -in private.key -check

# Verify cert/key match: openssl x509 -noout -modulus -in public.crt | openssl md5 openssl rsa -noout -modulus -in private.key | openssl md5 # Should match

# Generate new certificates: openssl req -new -newkey rsa:2048 -nodes \ -keyout private.key -out public.csr \ -subj "/CN=minio-server"

openssl x509 -req -days 365 -in public.csr \ -signkey private.key -out public.crt

# Or use MinIO with HTTP (no TLS): minio server /data --console-address ":9001"

# For production, use proper TLS certificates

# Check CA certificates: ls -la /root/.minio/certs/CAs/

# Add custom CA: cp ca.crt /root/.minio/certs/CAs/

# Use cert paths: minio server /data --certs-dir /etc/minio/certs

# Test HTTPS: curl -k https://localhost:9000/minio/health/live ```

Step 6: Fix Distributed Setup

```bash # For distributed MinIO (4+ nodes):

# Check node count: # MinIO distributed requires minimum 4 nodes # For erasure coding

# Check volume format: # /data format for single node # http://node1/data format for distributed

# Distributed start: minio server http://node1/data http://node2/data http://node3/data http://node4/data

# Check all nodes reachable: ping node1 ping node2 ping node3 ping node4

# Test ports: for node in node1 node2 node3 node4; do nc -zv $node 9000 done

# Check all have same config: for node in node1 node2 node3 node4; do echo "=== $node ===" ssh $node "cat /etc/default/minio" done

# MINIO_ROOT_USER and MINIO_ROOT_PASSWORD must match

# Check disks on all nodes: for node in node1 node2 node3 node4; do echo "=== $node ===" ssh $node "ls -la /data && df -h /data" done

# All nodes must have /data directory

# Start all nodes simultaneously: # MinIO expects all nodes available at start

# Check network latency: ping -c 10 node1 | grep rtt ```

Step 7: Check Configuration

```bash # Check environment file: cat /etc/default/minio

# Required settings: MINIO_ROOT_USER=admin MINIO_ROOT_PASSWORD=admin123

# Volume specification: MINIO_VOLUMES="/data"

# For distributed: MINIO_VOLUMES="http://node{1...4}/data"

# Console address: MINIO_OPTS="--console-address :9001"

# Region: MINIO_REGION="us-east-1"

# Browser access: MINIO_BROWSER="on"

# Check config.json (deprecated): cat /root/.minio/config.json

# New format uses environment variables

# Check for invalid env vars: env | grep MINIO

# Clear invalid config: unset MINIO_INVALID_VAR

# Use correct user/password: # Minimum 8 characters for password # If password too short, may fail silently

# Set strong password: export MINIO_ROOT_PASSWORD="SecurePass123!"

# Check site name: # Optional but can cause issues MINIO_SITE_NAME="minio-server"

# Domain for virtual-host style: MINIO_DOMAIN="example.com" ```

Step 8: Check System Resources

```bash # Check memory: free -m

# MinIO can use significant memory # Depends on cache configuration

# Check CPU: lscpu

# Check disk I/O wait: top | grep wa

# Check file descriptors: ulimit -n

# Increase file descriptors: ulimit -n 65535

# Or in systemd: [Service] LimitNOFILE=65535

# Check max memory locked: ulimit -l

# Increase: ulimit -l unlimited

# Or in systemd: [Service] LimitMEMLOCK=infinity

# Check for OOM: dmesg | grep -i "out of memory"

# Check swap: swapon --show

# Configure cache: # Cache can improve performance # But consumes memory

export MINIO_CACHE="on" export MINIO_CACHE_QUOTA=80 export MINIO_CACHE_AFTER=3 export MINIO_CACHE_WATERMARK_LOW=70 export MINIO_CACHE_WATERMARK_HIGH=90

# Disable cache if memory constrained: export MINIO_CACHE="off" ```

Step 9: Debug Startup Issues

```bash # Run with debug: minio server /data --debug

# Run with verbose logging: minio server /data --console-address ":9001" 2>&1 | tee minio.log

# Check startup sequence: minio server /data --debug 2>&1 | grep -E "Initializing|Starting|Listening"

# Test health endpoint: curl http://localhost:9000/minio/health/live curl http://localhost:9000/minio/health/ready

# Expected response: # 200 OK (empty body)

# Check cluster health (distributed): curl http://localhost:9000/minio/health/cluster

# Check for errors: minio server /data 2>&1 | grep -i error

# Check config parsing: minio server /data --debug 2>&1 | grep -i config

# Check disk initialization: minio server /data --debug 2>&1 | grep -E "disk|volume|backend"

# Check port binding: minio server /data --debug 2>&1 | grep -E "port|listen|address"

# Check erasure coding: minio server http://node{1...4}/data --debug 2>&1 | grep -i erasure ```

Step 10: MinIO Verification Script

```bash # Create verification script: cat << 'EOF' > /usr/local/bin/check-minio.sh #!/bin/bash

echo "=== MinIO Process ===" ps aux | grep minio | grep -v grep || echo "No MinIO process"

echo "" echo "=== Service Status ===" systemctl status minio 2>/dev/null || echo "Service not running"

echo "" echo "=== MinIO Version ===" minio --version 2>/dev/null || echo "MinIO not installed"

echo "" echo "=== Environment Configuration ===" cat /etc/default/minio 2>/dev/null || echo "No env config file"

echo "" echo "=== Data Directory ===" ls -la /data 2>/dev/null || echo "Data directory not found"

echo "" echo "=== Disk Space ===" df -h /data 2>/dev/null || echo "Cannot determine disk space"

echo "" echo "=== Certificate Files ===" ls -la /root/.minio/certs/ 2>/dev/null || ls -la /etc/minio/certs/ 2>/dev/null || echo "No certificates directory"

echo "" echo "=== Certificate Expiration ===" for cert in /root/.minio/certs/public.crt /etc/minio/certs/public.crt; do if [ -f "$cert" ]; then openssl x509 -in $cert -noout -dates 2>/dev/null fi done

echo "" echo "=== Port Status ===" netstat -tlnp 2>/dev/null | grep -E "9000|9001" || ss -tlnp | grep -E "9000|9001" || echo "Ports not listening"

echo "" echo "=== Health Check ===" curl -s http://localhost:9000/minio/health/live 2>&1 && echo "Live: OK" || echo "Live: FAILED" curl -s http://localhost:9000/minio/health/ready 2>&1 && echo "Ready: OK" || echo "Ready: FAILED"

echo "" echo "=== Console Access ===" curl -s -I http://localhost:9001 2>&1 | head -5 || echo "Console not accessible"

echo "" echo "=== Recent Logs ===" journalctl -u minio --no-pager -n 10 2>/dev/null || echo "No systemd logs"

echo "" echo "=== Recommendations ===" echo "1. Ensure data directory exists and is writable" echo "2. Check MINIO_ROOT_USER and MINIO_ROOT_PASSWORD set" echo "3. Verify ports 9000 and 9001 available" echo "4. Allow ports in firewall" echo "5. Check disk space adequate" echo "6. Verify certificates if using TLS" echo "7. For distributed, check all nodes reachable" EOF

chmod +x /usr/local/bin/check-minio.sh

# Usage: /usr/local/bin/check-minio.sh ```

MinIO Startup Checklist

CheckExpected
Data directoryExists and writable
Disk spaceAdequate (2GB+ min)
Port available9000, 9001 free
Credentials setMINIO_ROOT_USER/PASSWORD
TLS certificatesValid if HTTPS used
PermissionsCorrect ownership
Distributed nodesAll reachable (4+ nodes)

Verify the Fix

```bash # After fixing MinIO startup

# 1. Check process running ps aux | grep minio // MinIO process visible

# 2. Check health curl http://localhost:9000/minio/health/live // 200 OK response

# 3. Check console curl -I http://localhost:9001 // Console accessible

# 4. Test bucket creation mc alias set local http://localhost:9000 admin password mc mb local/testbucket // Bucket created

# 5. Test upload mc cp /tmp/testfile local/testbucket // File uploaded

# 6. Check logs journalctl -u minio -f // No errors ```

  • [Fix MinIO Bucket Not Accessible](/articles/fix-minio-bucket-not-accessible)
  • [Fix MinIO Bucket Policy Denied](/articles/fix-minio-bucket-policy-denied)
  • [Fix Ceph Cluster Not Healthy](/articles/fix-ceph-cluster-not-healthy)