Hello! I’m trying to work through the documentation on data replication and stuck on the step of initializing a remote. I’ve tried running the following: (some authentication details removed)
❯ influx remote create \
--name LocalDB \
--remote-url "10.1.10.123:8086" \
--remote-api-token "BjhTP...iA==" \
--remote-org-id "dc6b...3118"
Error: failed to create remote connection "LocalDB" in local InfluxDB: 404 Not Found: path not found
❯
I’m not sure what’s going on here, as I can access 10.1.10.123:8086
in my browser without issue. The docs are surprisingly vague on what different error messages mean. Could someone help me figure out what’s wrong?
Hello @Neil_Balch,
Welcome!
I’ve noticed that some people are running into this problem if the don’t use an operator token. Supposedly you don’t need an operator token to create a remote stream, but I ran ibnto this error as well. The operator token is the first token that InfluxDB automatically generates for you after setup. Do you still have that token? It should be the one farthest in the list.
If you don’t have one you’ll have to reinstall and setup.
If you don’t have it
@Neil_Balch,
Wait I got a 401 not 404.
Can you please
run --http-debug
and make sure the right token is being used?
Sorry, --http-debug
on what parent command?
oh sorry with the CLI, any CLI command
Thakns for asking clarifying question
Does this help?
❯ influx remote create \
--name LocalDB \
--remote-url "http://10.1.10.123:8086" \
--remote-api-token "BjhTP8hm2CEy8GhJXrQVRdxKHgH9zlzqh1idgN6hRUQyyGCHpkM4onJyafrKk3zNVeHmNVtQQmoCw4P7wtc-iA==" \
--remote-org-id "dc6b110c29a23118" \
--http-debug
2022/07/25 12:58:05
GET /api/v2/orgs?org=Boundary+Layer+Technologies HTTP/1.1
Host: localhost:8086
User-Agent: influx/2.3.0 (linux) Sha/88ba346 Date/2022-04-06T19:30:53Z
Accept: application/json
Authorization: Token uz3onhdUGQOR00tDGTbAZ6Cq26AOlBs6MQFkP8edoA2SiZ4OM6CA5NRNZZUTKEM0eDwSUG7LDrvOq7jmfqxQuQ==
Accept-Encoding: gzip
2022/07/25 12:58:05
HTTP/1.1 200 OK
Content-Length: 791
Content-Type: application/json; charset=utf-8
Date: Mon, 25 Jul 2022 19:58:05 GMT
X-Influxdb-Build: OSS
X-Influxdb-Version: 2.1.1
{
"links": {
"self": "/api/v2/orgs"
},
"orgs": [
{
"links": {
"buckets": "/api/v2/buckets?org=Boundary Layer Technologies",
"dashboards": "/api/v2/dashboards?org=Boundary Layer Technologies",
"labels": "/api/v2/orgs/80d9a4e52b000207/labels",
"logs": "/api/v2/orgs/80d9a4e52b000207/logs",
"members": "/api/v2/orgs/80d9a4e52b000207/members",
"owners": "/api/v2/orgs/80d9a4e52b000207/owners",
"secrets": "/api/v2/orgs/80d9a4e52b000207/secrets",
"self": "/api/v2/orgs/80d9a4e52b000207",
"tasks": "/api/v2/tasks?org=Boundary Layer Technologies"
},
"id": "80d9a4e52b000207",
"name": "Boundary Layer Technologies",
"description": "",
"createdAt": "2021-06-26T00:49:10.38300491Z",
"updatedAt": "2021-06-26T00:49:10.383004977Z"
}
]
}
2022/07/25 12:58:05
GET /api/v2/orgs?orgID=80d9a4e52b000207 HTTP/1.1
Host: localhost:8086
User-Agent: influx/2.3.0 (linux) Sha/88ba346 Date/2022-04-06T19:30:53Z
Accept: application/json
Authorization: Token uz3onhdUGQOR00tDGTbAZ6Cq26AOlBs6MQFkP8edoA2SiZ4OM6CA5NRNZZUTKEM0eDwSUG7LDrvOq7jmfqxQuQ==
Accept-Encoding: gzip
2022/07/25 12:58:05
HTTP/1.1 200 OK
Content-Length: 791
Content-Type: application/json; charset=utf-8
Date: Mon, 25 Jul 2022 19:58:05 GMT
X-Influxdb-Build: OSS
X-Influxdb-Version: 2.1.1
{
"links": {
"self": "/api/v2/orgs"
},
"orgs": [
{
"links": {
"buckets": "/api/v2/buckets?org=Boundary Layer Technologies",
"dashboards": "/api/v2/dashboards?org=Boundary Layer Technologies",
"labels": "/api/v2/orgs/80d9a4e52b000207/labels",
"logs": "/api/v2/orgs/80d9a4e52b000207/logs",
"members": "/api/v2/orgs/80d9a4e52b000207/members",
"owners": "/api/v2/orgs/80d9a4e52b000207/owners",
"secrets": "/api/v2/orgs/80d9a4e52b000207/secrets",
"self": "/api/v2/orgs/80d9a4e52b000207",
"tasks": "/api/v2/tasks?org=Boundary Layer Technologies"
},
"id": "80d9a4e52b000207",
"name": "Boundary Layer Technologies",
"description": "",
"createdAt": "2021-06-26T00:49:10.38300491Z",
"updatedAt": "2021-06-26T00:49:10.383004977Z"
}
]
}
2022/07/25 12:58:05
POST /api/v2/remotes HTTP/1.1
Host: localhost:8086
User-Agent: influx/2.3.0 (linux) Sha/88ba346 Date/2022-04-06T19:30:53Z
Transfer-Encoding: chunked
Accept: application/json
Authorization: Token uz3onhdUGQOR00tDGTbAZ6Cq26AOlBs6MQFkP8edoA2SiZ4OM6CA5NRNZZUTKEM0eDwSUG7LDrvOq7jmfqxQuQ==
Content-Type: application/json
Accept-Encoding: gzip
fa
{"allowInsecureTLS":false,"name":"LocalDB","orgID":"80d9a4e52b000207","remoteAPIToken":"BjhTP8hm2CEy8GhJXrQVRdxKHgH9zlzqh1idgN6hRUQyyGCHpkM4onJyafrKk3zNVeHmNVtQQmoCw4P7wtc-iA==","remoteOrgID":"dc6b110c29a23118","remoteURL":"http://10.1.10.123:8086"}
0
2022/07/25 12:58:05
HTTP/1.1 404 Not Found
Content-Length: 54
Content-Type: application/json; charset=utf-8
Date: Mon, 25 Jul 2022 19:58:05 GMT
X-Influxdb-Build: OSS
X-Influxdb-Version: 2.1.1
X-Platform-Error-Code: not found
{
"code": "not found",
"message": "path not found"
}
Error: failed to create remote connection "LocalDB" in local InfluxDB: 404 Not Found: path not found
@Anaisdg @Neil_Balch
X-Influxdb-Version: 2.1.1
There’s your problem
@Neil_Balch your InfluxDB version needs to be 2.2+ (ideally 2.3 because of a couple fixes).
1 Like
Hrm, interesting! And this is the version of the InfluxDB instance, not the CLI?
It’s a little confusing to me because influxd
reports 2.3.0 in the terminal:
❯ influxd version
InfluxDB v2.3.0+SNAPSHOT.090f681737 (git: 090f681737) build_date: 2022-06-16T19:33:50Z
That’s not the instance you’re hitting with the CLI. You must be running influxd version
on a different node than you’re hitting with the CLI. What does your CLI say it’s using?
influx config ls
1 Like
Hrm, I see… our system actually has two influxdb
instances installed, one of which is running on startup:
❯ /usr/local/bin/influxd version
InfluxDB v2.3.0+SNAPSHOT.090f681737 (git: 090f681737) build_date: 2022-06-16T19:33:50Z
❯ /usr/bin/influxd version
InfluxDB 2.1.1 (git: 657e1839de) build_date: 2021-11-09T03:03:48Z
I think this happened when I tried to upgrade the local instance for this project… the installer apparently didn’t install atop the existing one. Do you know how I could fix this? It’s apparently not as simple as stopping the old instance and starting the new one, because it can’t read in the old one’s configuration file and has no concept of the old one’s current database.
EDIT: I’ve figured this sub-problem by following the instructions to install from apt
. I think one of my predecessors originally installed influxd
from apt
and I was just unaware.
Thanks for the heads up… that was exactly the problem! However, I’m stuck on the next part of the tutorial steps:
❯ influx remote list
ID Name Org ID Remote URL Remote Org ID Allow Insecure TLS
09bc2ff40fc10000 LocalDB 80d9a4e52b000207 http://10.1.10.123:8086 dc6b110c29a23118 false
❯ influx replication create \
--name FT22 \
--remote-id 09bc2ff40fc10000 \
--local-bucket-id 20220714-pamplemousse-flight-test-22 \
--remote-bucket-id 20220714-pamplemousse-flight-test-22-backup
Error: failed to create replication stream "FT22": 400 Bad Request: failed to unmarshal json: id must have a length of 16 bytes
❯
Am I using the wrong remote ID?
@samdillard Might you have some time to look over my latest post?