Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 907954 - dev-db/influxdb-2.7.1: update from 1.8.10 breaks everything (mainly net-analyzer/telegraf)
Summary: dev-db/influxdb-2.7.1: update from 1.8.10 breaks everything (mainly net-analy...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: William Hubbs
Keywords: PullRequest
Depends on:
Reported: 2023-06-06 16:03 UTC by Mario Klebsch
Modified: 2023-08-22 20:19 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Mario Klebsch 2023-06-06 16:03:03 UTC
A few days ago, my system updated form influxdb-1.8.10 to influxdb-2.7.1 and everything seems to be screwed up.

The influxes log is flooded with

> Error: unknown shorthand flag: 'c' in -config
> See 'influxd -h' for help

and influxdb terminates immediately.

I was unable to migrate my existing influx data, yet and neither telegraph nor other programs continue to work. Telegraf fails too:

> # INFLUX_TOKEN='...' /usr/bin/telegraf -test -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d -once
> 2023-06-06T16:01:36Z I! Starting Telegraf 
> 2023-06-06T16:01:36Z W! [outputs.influxdb] When writing to [http://localhost:8086]: database "telegraf" creation failed: 401 Unauthorized
> 2023-06-06T16:01:37Z I! [agent] Hang on, flushing any cached metrics before shutdown
> 2023-06-06T16:01:37Z E! [outputs.influxdb] When writing to [http://localhost:8086]: 401 Unauthorized
> 2023-06-06T16:01:37Z E! [agent] Error writing to outputs.influxdb: could not write any address
> 2023-06-06T16:01:37Z I! [agent] Stopping running outputs
> 2023-06-06T16:01:37Z E! [telegraf] Error running agent: output plugins unable to send 76 metrics
> #

Comment 1 Mario Klebsch 2023-06-06 16:05:39 UTC
The influx CLI seems to be missing, but I cannot find a use flag to control, wether the CLI is built or not.
Comment 2 David Roman 2023-06-07 00:15:06 UTC
Influxdb 2.x introduces a lot of breaking changes. There is an official guide to migrate the DB from 1.x to 2.x here Also Influxdb removed the CLI from the repository and that's why it was not installed by the ebuild. I was searching if it have been moved and I found it was moved to

Never tried telegraf but it seems that the current version on ::gentoo is pretty old (more than 2 years ago), maybe it doesn't support influxdb 2.x?

When I can I will try to solve at least some of the issues (and add a warning about the potential incompatibility issues). For now probably it's better to keep using 1.x version until all the components you need are updated.  

Sorry for the inconvenience and thank you for the report.
Comment 3 Mario Klebsch 2023-06-07 06:39:30 UTC
I manually compiled influx-cli-2.7.3 and telegraf-1.26.3.

With the new version of telegraf and after changing the config file to use the new database driver outputs.influxdb_v2, I finally got telegraph recording new samples.

I still have to update my own code writing to influxdb.

When I setup my system with influxdb, it was working almost on first try, so that I never really learned using influxdb. Now I am missing this knowledge for my transition to influxdb-2.x. :-(
Comment 4 Larry the Git Cow gentoo-dev 2023-06-12 19:01:06 UTC
The bug has been referenced in the following commit(s):

commit 220a7926c6592d853c854e1e5709b7971d90a97e
Author:     William Hubbs <>
AuthorDate: 2023-06-12 18:56:24 +0000
Commit:     William Hubbs <>
CommitDate: 2023-06-12 19:00:52 +0000

    dev-db/influx-cli: new package, add 2.7.3
    This is the command line interface for influxdb-2.x.
    Signed-off-by: William Hubbs <>

 dev-db/influx-cli/Manifest                |  2 ++
 dev-db/influx-cli/influx-cli-2.7.3.ebuild | 28 ++++++++++++++++++++++++++++
 dev-db/influx-cli/metadata.xml            | 10 ++++++++++
 3 files changed, 40 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2023-06-14 00:47:35 UTC
The bug has been closed via the following commit(s):

commit 9a93a860ea862040216c5a4b6845a0fbfe0db926
Author:     David Roman <>
AuthorDate: 2023-06-08 10:32:05 +0000
Commit:     William Hubbs <>
CommitDate: 2023-06-14 00:44:31 +0000

    dev-db/influxdb: add instructions for upgrading db
    Signed-off-by: William Hubbs <>

 dev-db/influxdb/influxdb-2.7.1-r1.ebuild | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 6 Mario Klebsch 2023-06-14 05:13:48 UTC
The /etc/init.d/influxdb-script still passes the -config-parameter to influxdb, which is not valid in influxdb version 2.x, anymore.

> Error: unknown shorthand flag: 'c' in -config
> See 'influxd -h' for help
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-14 05:15:29 UTC
Also, influx-db is missing the completions from David's PR.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-14 05:15:35 UTC
(In reply to Sam James from comment #7)
> Also, influx-db is missing the completions from David's PR.

influx cli*