Telegraf error: database "qdb" creation failed:

Hi All,

I’m using Telegraf in conjunction with QuestDB.
Relevant part of telegraf.conf:
urls = [ 9009"]
database = " qdb"

After starting Telegraf I get an error:
2021-12-21T19:23:48Z W! [outputs.influxdb] When writing to []: database “qdb” creation failed: Post “”: context deadline exceeded (Client.Timeout exceeded while awaiting headers)

Any ideas?

P.A. I had to remove the http part in front of because the forum engine told me that I can’t have more than one link in a post…


Per this page it looks like QuestDB supports using Telegraf, but you need to use UDP or TCP. See the page I linked to for the format of the URL to use.


Hi @jpowers,

Thank you for your reply!
I changed the configuration line:
urls = [“tcp://”]
i.e. I changed http to tcp

Now I get another error message:
2021-12-21T19:43:37Z E! [agent] Failed to connect to [outputs.influxdb], retrying in 15s, error was ‘unsupported scheme [“tcp://”]: “tcp”’
and after 15s:
2021-12-21T19:43:52Z E! [telegraf] Error running agent: connecting output outputs.influxdb: Error connecting to output “outputs.influxdb”: unsupported scheme [“tcp://”]: “tcp”
server terminates

Best regards,

After this I changed “tcp” to “udp” and the error went way, but I want TCP…
I replied too quickly. Instead I should have changed the config to:

Write metrics to a local QuestDB instance over TCP

address = “tcp://”

and that (url–>address), yes

Per that page if you want TPC it looks like you need to use the socket_writer output:

  # Write metrics to a local QuestDB instance over TCP
  address = "tcp://"


Just to be clear:
First I configured the [[outputs.influxdb]], but I should not have done that. Instead I should have configured [[outputs.socket_writer]].
So my new config looks like:
address = “tcp4://”

That seems to get rid of the error.
Now I have to solve the JSON parsing error I get…

Telegraf error: [inputs.mqtt_consumer] Error in plugin: metric parse error:

Thanks for your help!

1 Like