dockerdocker-composeinfluxdbbitnami

The Bitnami InfluxDB container automatically exits


I use docker compose to deploy an influxdb container, the compose file is as follows

services:
  influxdb:
    image: bitnami/influxdb:latest
    volumes:
      - influxdb_data:/bitnami/influxdb
    environment:
      - INFLUXDB_ADMIN_USER=admin
      - INFLUXDB_ADMIN_USER_PASSWORD=123456
      - INFLUXDB_USER_BUCKET=rms
      - INFLUXDB_ADMIN_USER_TOKEN=123456
    networks:
      - rms-refactor
networks:
  rms-refactor:
    driver: bridge
volumes:
  influxdb_data:

When I used the docker compose up -d command to run the container, I found that influxdb would automatically exit. The container logs are as follows:

influxdb 08:10:26.11 INFO  ==> Welcome to the Bitnami influxdb container
2025-05-15T08:10:26.113905899Z influxdb 08:10:26.11 INFO  ==> Subscribe to project updates by watching https://github.com/bitnami/containers
2025-05-15T08:10:26.116468224Z influxdb 08:10:26.11 INFO  ==> Did you know there are enterprise versions of the Bitnami catalog? For enhanced secure software supply chain features, unlimited pulls from Docker, LTS support, or application customization, see Bitnami Premium or Tanzu Application Catalog. See https://www.arrow.com/globalecs/na/vendors/bitnami/ for more information.
2025-05-15T08:10:26.117906968Z influxdb 08:10:26.11 INFO  ==> 
2025-05-15T08:10:26.126942794Z influxdb 08:10:26.12 INFO  ==> ** Starting InfluxDB setup **
2025-05-15T08:10:26.159448246Z influxdb 08:10:26.15 INFO  ==> Custom configuration /opt/bitnami/influxdb/etc/config.yaml detected!
2025-05-15T08:10:26.161473844Z influxdb 08:10:26.16 WARN  ==> The 'INFLUXDB_' environment variables override the equivalent options in the configuration file.
2025-05-15T08:10:26.164071164Z influxdb 08:10:26.16 WARN  ==> If a configuration option is not specified in either the configuration file or in an environment variable, InfluxDB uses its internal default configuration
2025-05-15T08:10:26.166167155Z influxdb 08:10:26.16 INFO  ==> Starting InfluxDB in background...
2025-05-15T08:10:26.689275298Z influxdb 08:10:26.68 INFO  ==> Deploying InfluxDB from scratch
2025-05-15T08:10:26.690747592Z influxdb 08:10:26.69 INFO  ==> Creating primary setup...
2025-05-15T08:10:26.710207197Z influxdb 08:10:26.70 INFO  ==> Stopping InfluxDB...
2025-05-15T08:10:26.728830119Z Terminated

I expect to be able to start an influxdb container


Solution

  • InfluxDB admin passwords need to be >=8 in length, yours is 6 characters long. Note that the password length is enforced.

    With a slightly adjusted docker-compose.yaml, this can easily be tested:

    services:
      influxdb:
        image: docker.io/bitnami/influxdb:2
        ports:
          - "8086:8086"
          - "8088:8088"
        environment:
          - INFLUXDB_ADMIN_USER=admin
          - INFLUXDB_ADMIN_USER_PASSWORD=${INFLUXDB_ADMIN_PASSWORD}
          - INFLUXDB_USER_BUCKET=rms
          - INFLUXDB_ADMIN_USER_TOKEN=123456
        volumes:
          - influxdb_data:/bitnami/influxdb
        networks:
          - rms-refactor
    networks:
      rms-refactor:
        driver: bridge
    volumes:
      influxdb_data:
    

    Now, calling

    INFLUXDB_ADMIN_PASSWORD=123456 docker compose up
    

    gives us the same result

    influxdb-1  | influxdb 10:51:21.01 INFO  ==> Deploying InfluxDB from scratch
    influxdb-1  | influxdb 10:51:21.02 INFO  ==> Creating primary setup...
    influxdb-1  | influxdb 10:51:21.09 INFO  ==> Stopping InfluxDB...
    influxdb-1  | Terminated
    influxdb-1 exited with code 1
    

    whereas

    INFLUXDB_ADMIN_PASSWORD=12345678 docker compose up
    

    results in a starting server

    influxdb-1  | ts=2025-05-15T10:53:52.573989Z lvl=info msg=Listening log_id=0wWu6gzW000 service=tcp-listener transport=http addr=0.0.0.0:8086 port=8086
    

    I have opened an issue on GitHub.