InfluxDB2.0 - set up issue, able to run daemon but not able to set up further

Hi,

I am able to run the InfluxDB2.0 daemon process “influxd” on a linux box and the port is configured to 8111. I see in the log that the daemon is listening to 8111, but I’m not able to launch “Influx setup” to create a database or any further operations to set up. Please let me know what I’m missing here?

Thanks in advance for ur help.
Rajesh

What error(s) are you getting?

On my environment I just pointed my browser at the ip+port and I got the welcome wizard setup screen and was on my way…

I see the web page saying " This site can’t be reached"

“SYSWDL1832” refused to connect.

But we already have Influx-1.8 running on this box as well, where I can create database and measurements.
I’m not sure if the 2.0 Influxd process is running perfectly fine… below is all I see in its logs. Is this all that is required for daemon process?

ts=2020-07-30T09:44:55.174845Z lvl=info msg=“Welcome to InfluxDB” log_id=0OJmbYXW000 version=2.0.0-beta.15 commit=f54848f443 build_date=2020-07-23T18:27:19Z
ts=2020-07-30T09:44:55.187745Z lvl=info msg=“Resources opened” log_id=0OJmbYXW000 service=bolt path=/home/atetest/.influxdbv2/influxd.bolt
ts=2020-07-30T09:44:55.191880Z lvl=info msg=“Opening Series File (start)” log_id=0OJmbYXW000 service=storage-engine service=series-file op_name=series_file_open path=/home/atetest/.influxdbv2/engine/_series op_event=start
ts=2020-07-30T09:44:55.215534Z lvl=info msg=“Opening Series File (end)” log_id=0OJmbYXW000 service=storage-engine service=series-file op_name=series_file_open path=/home/atetest/.influxdbv2/engine/_series op_event=end op_elapsed=23.661ms
ts=2020-07-30T09:44:55.217071Z lvl=info msg=“Index opened” log_id=0OJmbYXW000 service=storage-engine index=tsi partitions=8
ts=2020-07-30T09:44:55.217626Z lvl=info msg=“Reloaded WAL” log_id=0OJmbYXW000 service=storage-engine path=/home/atetest/.influxdbv2/engine/wal duration=0.050ms
ts=2020-07-30T09:44:55.217666Z lvl=info msg=Starting log_id=0OJmbYXW000 service=storage-engine component=retention_enforcer check_interval=1h

ts=2020-07-30T09:44:55.218042Z lvl=info msg=“Starting query controller” log_id=0OJmbYXW000 service=storage-reads concurrency_quota=20 initial_memory_bytes_quota_per_query=9223372036854775807 memory_bytes_quota_per_query=9223372036854775807 max_memory_bytes=0 queue_size=15

ts=2020-07-30T09:44:55.521603Z lvl=info msg=Listening log_id=0OJmbYXW000 transport=http addr=127.0.0.1:8111 port=8111

When I run > influx setup
the command takes long time and next day I see the below error…

Error: failed to determine if instance has been configured: Get http://localhost:9999/api/v2/setup: EOF

I see it is still trying for port 9999, when I’ve changed it to 8111.
Is there anyway I can change the port for the influx setup please?

Thanks,
Rajesh

Possibly a bug not yet handled if you change the port. Do you have the option of running it using the default port 9999?

Unfortunately no, the 9999 port is being used by another app in our environment which I do not have control on…

But can you please confirm if the daemon process logs are correct and they look as it should? Just want to make sure nothing is missing in the config for daemon…

Can you paste the flags you’re running the daemon with?

What flags are you running the influx client binary with ?

I have set the daemon config to the below config.toml file
query-concurrency = 20
query-queue-size = 15
secret-store = “vault”
session-length = 120
http-bind-address = “127.0.0.1:8111”
reporting-disabled = true
log-level = “info”

The Influx client library is with following command

./influx setup

I thought it will pick up the same config.toml file in the folder?

I’m confused. Are you having problems with influxdb 1.x or the beta 2.0 ? The docs I linked are for 2.0

Edit; I hadn’t noticed those config files existed before, cool!

I think you need to tell the influx client to use a different port. Does this work?

influx -u http://localhost:8111

Did this work for you ?

Hi, thanks for the response… currently I see a problem with running the daemon process. We have influx1.8 running in parallel on the same machine…

when I start the command to bring up the daemon process > ./influxd
The influx2.0 isn’t coming up due to the below error.

ts=2020-08-03T01:52:53.296456Z lvl=error msg=“Failed opening bolt” log_id=0OOWBbTl000 error=“unable to open boltdb; is there a chronograf already running? timeout”
Error: unable to open boltdb; is there a chronograf already running? timeout

Not sure if I can suppress this one with a config…

Should be able to. This is what settled on. Although full disclosure I’m only running v2 instance, but I can’t see why it wouldn’t be possible to do what you’re wanting to

I eventually moved to a different box where port 9999 is available for me to use and set up as per the instructions… everything went smooth.

The daemon process is running fine and I’m able to do influx set up in CLI and able to see the UI from a browser(which is cool).

I am now trying to set up bucket and put in some test data for playing around this…
Thanks a lot for the help with this guys.

1 Like

On the new box, I’m running both influx v1.8 and v2.0 in parallel, so no issues as far as I’m using the port 9999 for v2.0


Can someone please help me with this error?

U able to solve the error?

I met same error Error: failed to determine if instance has been configured.

My scenario is I use a script to run influxdb2.0 in docker and then call influx setup immediately.

I found the reason of this error is that the service is not ready when calling setup, the service self needs some time to launch before ready to receive traffic.

So I solved it by before calling setup, repeated to check the status of 127.0.0.1:8086/api/v2/setup until it returns a “true”.

I’m using an influx v2 with docker compose and it throws an error Failed opening bolt , unable to open boltdb: timeout. I can use influxdb UI without problem and telegraf but influx CLI has problems.

influxdbv2_telegraf_docker-influxdb-1      | 2021-12-15T02:00:23.879425000Z     info    found existing boltdb file, skipping setup wrapper      {"system": "docker", "bolt_path": "/var/lib/influxdb2/influxd.bolt"}
influxdbv2_telegraf_docker-influxdb_cli-1  | 2021-12-15T02:00:26.495371800Z     info    found existing boltdb file, skipping setup wrapper      {"system": "docker", "bolt_path": "/var/lib/influxdb2/influxd.bolt"}
influxdbv2_telegraf_docker-telegraf-1      | 2021-12-15T02:00:27Z I! Starting Telegraf 1.20.4
influxdbv2_telegraf_docker-telegraf-1      | 2021-12-15T02:00:27Z I! Using config file: /etc/telegraf/telegraf.conf
influxdbv2_telegraf_docker-telegraf-1      | 2021-12-15T02:00:27Z I! Loaded inputs: cpu disk diskio mem mqtt_consumer net processes swap system
influxdbv2_telegraf_docker-telegraf-1      | 2021-12-15T02:00:27Z I! Loaded aggregators:
influxdbv2_telegraf_docker-telegraf-1      | 2021-12-15T02:00:27Z I! Loaded processors:
influxdbv2_telegraf_docker-telegraf-1      | 2021-12-15T02:00:27Z I! Loaded outputs: influxdb_v2
influxdbv2_telegraf_docker-telegraf-1      | 2021-12-15T02:00:27Z I! Tags enabled: host=d713aad98982
influxdbv2_telegraf_docker-telegraf-1      | 2021-12-15T02:00:27Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"d713aad98982", Flush Interval:10s
influxdbv2_telegraf_docker-telegraf-1      | 2021-12-15T02:00:27Z I! [inputs.mqtt_consumer] Connected [tcp://cloud.thegrouplab.com:1883]
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.465650Z lvl=info msg="Welcome to InfluxDB" log_id=0YQxx~pG000 version=2.0.7 commit=2a45f0c037 build_date=2021-06-04T19:17:40Z
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.471326Z lvl=info msg="Resources opened" log_id=0YQxx~pG000 service=bolt path=/var/lib/influxdb2/influxd.bolt
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.483265Z lvl=info msg="Checking InfluxDB metadata for prior version." log_id=0YQxx~pG000 bolt_path=/var/lib/influxdb2/influxd.bolt
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.484829Z lvl=info msg="Using data dir" log_id=0YQxx~pG000 service=storage-engine service=store path=/var/lib/influxdb2/engine/data
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.485966Z lvl=info msg="Compaction settings" log_id=0YQxx~pG000 service=storage-engine service=store max_concurrent_compactions=6 throughput_bytes_per_second=50331648 throughput_bytes_per_second_burst=50331648
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.486010Z lvl=info msg="Open store (start)" log_id=0YQxx~pG000 service=storage-engine service=store op_name=tsdb_open op_event=start
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.589058Z lvl=info msg="index opened with 8 partitions" log_id=0YQxx~pG000 service=storage-engine index=tsi
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.611041Z lvl=info msg="Reading file" log_id=0YQxx~pG000 service=storage-engine engine=tsm1 service=cacheloader path=/var/lib/influxdb2/engine/wal/ad1ca59e4593c49e/autogen/1/_00001.wal size=1451257
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.779578Z lvl=info msg="Opened shard" log_id=0YQxx~pG000 service=storage-engine service=store op_name=tsdb_open index_version=tsi1 path=/var/lib/influxdb2/engine/data/ad1ca59e4593c49e/autogen/1 duration=213.930ms
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.779662Z lvl=info msg="Open store (end)" log_id=0YQxx~pG000 service=storage-engine service=store op_name=tsdb_open op_event=end op_elapsed=293.656ms
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.779673Z lvl=info msg="Starting retention policy enforcement service" log_id=0YQxx~pG000 service=retention check_interval=30m
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.779694Z lvl=info msg="Starting precreation service" log_id=0YQxx~pG000 service=shard-precreation check_interval=10m advance_period=30m
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.779743Z lvl=info msg="Starting query controller" log_id=0YQxx~pG000 service=storage-reads concurrency_quota=1024 initial_memory_bytes_quota_per_query=9223372036854775807 memory_bytes_quota_per_query=9223372036854775807 max_memory_bytes=0 queue_size=1024
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:32.780757Z lvl=info msg="Configuring InfluxQL statement executor (zeros indicate unlimited)." log_id=0YQxx~pG000 max_select_point=0 max_select_series=0 max_select_buckets=0
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:33.091001Z lvl=info msg=Starting log_id=0YQxx~pG000 service=telemetry interval=8h
influxdbv2_telegraf_docker-influxdb-1      | ts=2021-12-15T02:00:33.091732Z lvl=info msg=Listening log_id=0YQxx~pG000 service=tcp-listener transport=http addr=:8086 port=8086
influxdbv2_telegraf_docker-influxdb_cli-1  | ts=2021-12-15T02:00:35.937176Z lvl=info msg="Welcome to InfluxDB" log_id=0YQxyDO0000 version=2.0.7 commit=2a45f0c037 build_date=2021-06-04T19:17:40Z
influxdbv2_telegraf_docker-influxdb_cli-1  | Error: unable to open boltdb: timeout
influxdbv2_telegraf_docker-influxdb_cli-1  | See 'influxd -h' for help
influxdbv2_telegraf_docker-influxdb_cli-1  | ts=2021-12-15T02:00:36.901340Z lvl=error msg="Failed opening bolt" log_id=0YQxyDO0000 error="unable to open boltdb: timeout"
influxdbv2_telegraf_docker-influxdb_cli-1 exited with code 1
influxdbv2_telegraf_docker-influxdb_cli-1  | 2021-12-15T02:00:37.819873600Z     info    found existing boltdb file, skipping setup wrapper      {"system": "docker", "bolt_path": "/var/lib/influxdb2/influxd.bolt"}
influxdbv2_telegraf_docker-influxdb_cli-1  | ts=2021-12-15T02:00:45.805453Z lvl=info msg="Welcome to InfluxDB" log_id=0YQxyowG000 version=2.0.7 commit=2a45f0c037 build_date=2021-06-04T19:17:40Z
influxdbv2_telegraf_docker-influxdb_cli-1  | ts=2021-12-15T02:00:46.762005Z lvl=error msg="Failed opening bolt" log_id=0YQxyowG000 error="unable to open boltdb: timeout"
influxdbv2_telegraf_docker-influxdb_cli-1  | Error: unable to open boltdb: timeout
influxdbv2_telegraf_docker-influxdb_cli-1  | See 'influxd -h' for help
influxdbv2_telegraf_docker-influxdb_cli-1 exited with code 1
influxdbv2_telegraf_docker-influxdb_cli-1  | 2021-12-15T02:00:47.664190500Z     info    found existing boltdb file, skipping setup wrapper      {"system": "docker", "bolt_path": "/var/lib/influxdb2/influxd.bolt"}
influxdbv2_telegraf_docker-influxdb_cli-1  | ts=2021-12-15T02:00:54.543876Z lvl=info msg="Welcome to InfluxDB" log_id=0YQxzM3l000 version=2.0.7 commit=2a45f0c037 build_date=2021-06-04T19:17:40Z
influxdbv2_telegraf_docker-influxdb_cli-1  | Error: unable to open boltdb: timeout

How can fix this problem? Could I use influxdb with only telegraf without CLI?

Thanks in advance

@dhinojosac the Failed opening bolt , unable to open boltdb: timeout is usually because the bolt file is already opened by another process.

In the linked docker compose file, it has two influxdb containers being created and both mounting the data directory. This would cause the second container to fail to open the bolt file and generate that error.

@Anaisdg I’m not 100% clear on the need to have two influxdb containers in the compose file - since the linked file is in your github, I’m assuming you are familiar with it :wink:. The the container with the DOCKER_INFLUXDB_INIT_MODE=setup should start up influxdb and do the initial configuration on first launch, and then on subsequent launches it will see that the instance is already set up and not do it again - you shouldn’t need a separate container to do the setup. Maybe I’m missing something though!

Hello @wbaker,
I don’t remember exactly to be completely honest, but I believe it was because I can create the influxdb container and the telegraf container simultaneously. There were problems with a lag in the containers running and authentication and cert issues because of timing. I remember I needed a second one, the influxdb-cli, to get setup first and then configure the influxdb container first. The telegraf container depends on the influxdb-cli container when depends on the influxdb one. To ensure that a each step, running the container and setting up influxdb happens successfully before setting up and running telegraf.