Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

influx backup: Error: API compatibility check failed: Get "/health": unsupported protocol scheme "" #25460

Closed
wolfgangr opened this issue Oct 11, 2024 · 4 comments

Comments

@wolfgangr
Copy link

Steps to reproduce:

  1. have running influxDB
  2. try to make a backup

influx backup --host localhost --org myorg.lokal --token "=foo-bar-tralala=" /mnt/bck/myserver/influx/manual_backup_2024-10-11

Expected behaviour:
target backup directory populated with files

Actual behaviour:
backup fails with this message:

$ sudo /root/do_influx_full_backup.sh
Error: API compatibility check failed: Get "/health": unsupported protocol scheme ""

Environment info:

  • Please provide the command you used to build the project, including any RUSTFLAGS.

no clue, installed from repo:

Web UI: InfluxDB v2.7.10 Server: f302d97 Frontend: a977a9f

...:~/influxDB$ cat /etc/apt/sources.list.d/influxdb.list 
deb [signed-by=/usr/share/keyrings/influxdb-archive-keyring.gpg] https://repos.influxdata.com/debian  bookworm stable main

...:~/influxDB$ apt-cache policy influxdb2
influxdb2:
  Installed: 2.7.10-1
  Candidate: 2.7.10-1

...:~/influxDB$ apt-cache policy influxdb2-cli
influxdb2-cli:
  Installed: 2.7.5-1

:~/influxDB$ influx version
Influx CLI dev (git: a79a2a1b825867421d320428538f76a4c90aa34c) build_date: 2024-04-16T14:34:32Z


...:~/influxDB$ apt-cache policy influxdb2-client
influxdb2-client:
  Installed: (none)
  Candidate: 2.7.1-1

...:~/influxDB$ apt-cache policy influxctl
influxctl:
  Installed: (none)
  Candidate: 2.9.7

...:~/influxDB$ apt-cache policy influxdb
influxdb:
  Installed: (none)
  Candidate: 1.8.10-1
  Version table:
     1.8.10-1 500

hm.... uneducated guess: inconsistent versions shipped in the repo?

  • System info: Run uname -srm or similar and copy the output here (we want to know your OS, architecture etc).
    Linux 6.1.0-23-amd64 x86_64
    (debian 12.7)

  • If you're running IOx in a containerised environment then details about that would be helpful.
    n/a

  • Other relevant environment details: disk info, hardware setup etc.
    backup target path is a btrfs subvolume

Config:
Copy any non-default config values here or attach the full config as a gist or file.

:~/influxDB$ cat /etc/influxdb/config.toml
bolt-path = "/var/lib/influxdb/influxd.bolt"
engine-path = "/var/lib/influxdb/engine"
# https://community.influxdata.com/t/disabling-or-setting-session-idle-timeout/25207/4
session-renew-disabled = true
session-length = 1440 # session renewal after 1 day
# session-length = 28800 # i.e. 20 days

not sure, I think most errors are from previous mistakes
can't see log entries generated when I try a backup

Oct 11 11:06:56 homeserver influxd-systemd-start.sh[3570388]: ts=2024-10-11T09:06:56.141502Z lvl=info msg="Retention policy deletion check (start)" log_id=0sACX4pW000 service=retention op_name=retention_delete_check op_event=start
Oct 11 11:06:56 homeserver influxd-systemd-start.sh[3570388]: ts=2024-10-11T09:06:56.145880Z lvl=info msg="Pruning shard groups after retention check (start)" log_id=0sACX4pW000 service=retention op_name=retention_delete_check op_name=retention_prune_shard_groups op_event=start
Oct 11 11:06:56 homeserver influxd-systemd-start.sh[3570388]: ts=2024-10-11T09:06:56.164925Z lvl=info msg="Pruning shard groups after retention check (end)" log_id=0sACX4pW000 service=retention op_name=retention_delete_check op_name=retention_prune_shard_groups op_event=end op_elapsed=19.827ms
Oct 11 11:06:56 homeserver influxd-systemd-start.sh[3570388]: ts=2024-10-11T09:06:56.172125Z lvl=info msg="Retention policy deletion check (end)" log_id=0sACX4pW000 service=retention op_name=retention_delete_check op_event=end op_elapsed=102.262ms
Oct 11 11:08:47 homeserver influxd-systemd-start.sh[3570388]: ts=2024-10-11T09:08:47.935539Z lvl=info msg=Unauthorized log_id=0sACX4pW000 error="token required"
Oct 11 11:10:54 homeserver influxd-systemd-start.sh[3570388]: ts=2024-10-11T09:10:54.236213Z lvl=info msg=Unauthorized log_id=0sACX4pW000 error="token required"
Oct 11 11:36:56 homeserver influxd-systemd-start.sh[3570388]: ts=2024-10-11T09:36:56.070608Z lvl=info msg="Retention policy deletion check (start)" log_id=0sACX4pW000 service=retention op_name=retention_delete_check op_event=start
Oct 11 11:36:56 homeserver influxd-systemd-start.sh[3570388]: ts=2024-10-11T09:36:56.070672Z lvl=info msg="Pruning shard groups after retention check (start)" log_id=0sACX4pW000 service=retention op_name=retention_delete_check op_name=retention_prune_shard_groups op_event=start
Oct 11 11:36:56 homeserver influxd-systemd-start.sh[3570388]: ts=2024-10-11T09:36:56.070788Z lvl=info msg="Pruning shard groups after retention check (end)" log_id=0sACX4pW000 service=retention op_name=retention_delete_check op_name=retention_prune_shard_groups op_event=end op_elapsed=0.119ms
Oct 11 11:36:56 homeserver influxd-systemd-start.sh[3570388]: ts=2024-10-11T09:36:56.070815Z lvl=info msg="Retention policy deletion check (end)" log_id=0sACX4pW000 service=retention op_name=retention_delete_check op_event=end op_elapsed=0.248ms
@wolfgangr
Copy link
Author

minimized steps to reproduce:

:~/influxDB/scripts$ influx ping --host localhost
Error: Get "/health": unsupported protocol scheme ""

@wolfgangr
Copy link
Author

ah, this reveals the simple cause, camouflaged as a complicated one.
... and it's message in a web search reveals both the solution and the insight, that the influx product line exposes great potential to improve documentation ....

pick just the first one:
https://stackoverflow.com/questions/75408503/influx-write-command-is-throwing-error-unsupported-protocol-scheme

and - alas:

$ influx ping --host "http://localhost:8086"
OK

and ported to my backup command gives me a bunch of files that look trustworthy. :+1

@wolfgangr
Copy link
Author

I might close the issue, since my backup works now.
However, counting the huge amount of web search hits for

influx health: unsupported protocol scheme

I'd suppose to inform the documentation team.

@wolfgangr
Copy link
Author

issued a documentation issue here:
influxdata/docs-v2#5644
close the issue at hand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant