influxdata / influxdata/influxdb

/etc/influxdb/config.yml does not work but config.toml works. influxdb v2

Open
#25,778 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area/2.x
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

I tried setting configuration with `/etc/influxdb/config.yml` and `/etc/influxdb/config.toml` while starting the systemd influxd.service. But only the configuration in `config.toml` seems to be read, since only this changes the port influxd is listening on in my setup.

__Steps to reproduce:__
List the minimal actions needed to reproduce the behaviour.

1. Install influxdb2 from `https://repos.influxdata.com/debian` on Ubuntu 24.04
2. Create configuration file `/etc/influxdb/config.yml`
3. `systemctl restart influxd`

```
#config.yml
http-bind-address: "localhost:8088"
```

__Expected behaviour:__
Influxd listens on localhost:8088

__Actual behaviour:__
Influxd listens on 0.0.0.0/8086 (default configuration)

__Environment info:__

* System info: Run `uname -srm` or similar and copy the output here (we want to know your OS, architecture etc).
```
Linux 6.8.0-51-generic x86_64
```
OS: Ubuntu 24.04
Influxdb: v2.7.11

__More details:__

```
#config.toml that works
http-bind-address = "localhost:8088"
```

The following permissions are set (Only either `config.toml` and `config.yml` are present throughout my tests):
```
ls -la /etc/influxdb/
total 8
drwxr-xr-x 1 root root 38 Jan 10 11:43 .
drwxr-xr-x 1 root root 4110 Jan 9 15:23 ..
-rwxr--r-- 1 root root 36 Jan 10 11:43 config.yml
-rwxr--r-- 1 root root 37 Jan 10 11:25 config.toml
```

I also tried to help influxd by setting the following configurations within the service:
```
WorkingDirectory=/etc/influxdb
Environment="INFLUXD_CONFIG_PATH=/etc/influxdb"
```

systemd service file:
```# If you modify this, please also make sure to edit init.sh

[Unit]
Description=InfluxDB is an open-source, distributed, time series database
Documentation=https://docs.influxdata.com/influxdb/
After=network-online.target

[Service]
User=influxdb
Group=influxdb
LimitNOFILE=65536
EnvironmentFile=-/etc/default/influxdb2
ExecStart=/usr/lib/influxdb/scripts/influxd-systemd-start.sh
KillMode=control-group
Restart=on-failure
Type=forking
PIDFile=/var/lib/influxdb/influxd.pid
StateDirectory=influxdb
StateDirectoryMode=0750
LogsDirectory=influxdb
LogsDirectoryMode=0750
UMask=0027
TimeoutStartSec=0

[Install]
WantedBy=multi-user.target
Alias=influxd.service
```

##### Relevant URLs
- https://docs.influxdata.com/influxdb/v2/reference/config-options/#influxdb-configuration-file
- https://docs.influxdata.com/influxdb/v2/reference/config-options/#http-bind-address

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documented configuration-file options and the systemd unit's ExecStart entry, /usr/lib/influxdb/scripts/influxd-systemd-start.sh, then compare how config.yml and config.toml are discovered under /etc/influxdb. Done means config.yml is either honored when influxd.service starts, making the daemon listen on localhost:8088, or the supported behavior is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.