influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.92k stars 3.55k forks source link

error: found flags from an InfluxDB 1.x configuration #25262

Open DARSHAN-THE-CODER opened 2 months ago

DARSHAN-THE-CODER commented 2 months ago

Describe Development Experience Issue:

Hi, I want to run influxdb2-2.7.8. I have influxdb.toml config file with this configuration

[http] http-bind-address = ":8087" pprof-disabled = true https-enabled = false tls-cert = "/etc/ssl/influxdb2.pem"

[shard-precreation] storage-shard-precreator-check-interval = "10m" storage-shard-precreator-advance-period = "30m"

etc..

Which is written as specified in the v2 documentation, and starting influxd with the command export INFLUXD_CONFIG_PATH=/mnt1/influxdb2-2.7.8/etc/influxdb2/influxdb2.toml && /mnt1/influxdb2-2.7.8/usr/bin/influxd But getting error saying :

error: found flags from an InfluxDB 1.x configuration in config file at /mnt1/influxdb2-2.7.8/etc/influxdb2/influxdb2.toml 
- see https://docs.influxdata.com/influxdb/latest/reference/config-options/ for flags supported on this version of InfluxDB: 
- http.pprof-disabled,data.engine-path,data.storage-cache-max-memory-size,shard-precreation.storage-shard-precreator-check-interval,shard-precreation.storage-shard-precreator-advance-period,http.tls-cert,http.http-bind-address,bind-address,retention.storage-retention-check-interval

Steps to reproduce:

  1. Save config file as influxdb2.toml
  2. run export INFLUXD_CONFIG_PATH=/mnt1/influxdb2-2.7.8/etc/influxdb2/influxdb2.toml && /mnt1/influxdb2-2.7.8/usr/bin/influxd
  3. specify path accordingly

Desired result:

Influxdb should start on port specified

Actual result:

Getting error with config file, though specified as given in documentation

Hardware Environment:

Operating System:

Linux 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 x86_64 x86_64 GNU/Linux

Code Editing Tool:

Build Environment:

[ ] I'm using sccache

alexlouden commented 2 months ago

I don't think you need the headers on your toml file - can you just try this?

http-bind-address = ":8087"
pprof-disabled = true
https-enabled = false
tls-cert = "/etc/ssl/influxdb2.pem"

storage-shard-precreator-check-interval = "10m"
storage-shard-precreator-advance-period = "30m"