TL;DR InfluxDB Tech Tips – Knowing the Unexpected: Auth Failure, Data Truncation in Graphs & Change in Query Behavior

4 minutes

In this weekly post we recap the unexpected in InfluxDB and TICK-stack related issues from GitHub, IRC and the InfluxData Community.

Unexpected authentication failure

Q:  I’m having trouble authenticating with InfluxDB’s Command Line Interface (CLI) and I can’t figure out what I’m doing wrong. I’m including a variation of my password just because I’m at my wits end:

Connect to the CLI and create a user:

$ influx
Connected to http://localhost:8086 version 1.2.2
InfluxDB shell version: 1.2.2
> CREATE USER influxer WITH PASSWORD '[email protected]' WITH ALL PRIVILEGES
> exit

Connect to the CLI with those authentication credentials:

$ influx -username influxer -password [email protected]
Connected to http://localhost:8086 version 1.2.2
InfluxDB shell version: 1.2.2
> SHOW DATABASES
ERR: authorization failed  <--- Why? ????

I don’t see a typo anywhere. I have auth-enabled set to true in the configuration file. Am I missing a step?

A: We recommend single-quoting passwords if they have any special characters; some shells may attempt to inject variables into the password if it encounters a special character. So in your case, single-quote [email protected] and you should be good to go!

Unexpected data truncation in graphs

Q: I’m using Chronograf to visualize my data and my graphs seem to be returning truncated data (details below). Is there a default setting in InfluxDB or Chronograf that keeps them from truncating data in query responses? I’m working with OSS InfluxDB version 1.2.1 and Chronograf version 1.2.0-beta5.

My graph and the original query:

The number of points I’d expect to see:

The number of points I’m seeing based on the timestamps in the graph:

A: InfluxDB has a configuration option called max-row-limit. That option sets the maximum number of rows returned per query. In OSS version 1.2.1, the system sets that option to 10,000 by default; that’s why you’re seeing only 10,000 points in your graph. To disable the configuration option, just set max-row-limit to 0 and restart the process. The 0 allows for an unlimited number of rows returned per query.

Just a side note about your issue – in the most recent version of InfluxDB, v1.2.2, we’ve changed the default max-row-limit setting to 0.

Unexpected change in query behavior

Q: I’ve recently upgraded to OSS InfluxDB version 1.2.1 and am seeing a change in the number of points returned for a query that performs math on several selector functions. Was that change intentional? Is there a way to make the system behave like it did in version 1.1.1?

Query behaviour in version 1.1.1:

> SELECT MIN("avocado")*2,MAX("avocado")*2 FROM "mycart"

name: mycart
time  min  max
----  ---  ---
0     24   46   <--- Just one point!

Query behavior in version 1.2.1:

> SELECT MIN("avocado")*2,MAX("avocado")*2 FROM "mycart"

name: mycart
time                 min  max
----                 ---  ---
1490113486589201368  24           |
1490113497387418180       46      | <--- Two points!

A: That change is a known issue – we apologize for the unexpected change in behavior. We have a fix for it that will be part of the version 1.3.0 release! For now, as a workaround, you can use InfluxQL’s subqueries to replicate the behavior that you saw in version 1.1.1:

> SELECT "min"*2,"max"*2 FROM (SELECT MIN("avocado"),MAX("avocado") FROM "mycart")

name: mycart
time  min  max
----  ---  ---
0     24   46

 

What’s next:

  • Downloads for the TICK-stack are live on our “downloads” page.
  • Deploy on the Cloud: Get started with a FREE trial of InfluxDB Cloud featuring fully-managed clusters, Kapacitor and Grafana.
  • Deploy on Your Servers: Want to run InfluxDB clusters on your servers? Try a FREE 14-day trial of InfluxDB Enterprise featuring an intuitive UI for deploying, monitoring, and rebalancing clusters, plus managing backups and restores. 
  • Tell Your Story: Over 300 companies have shared their story on how InfluxDB is helping them succeed. Submit your testimonial and get a limited edition hoodie as a thank you.

Related Blog Posts

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top