Error: authorization not found

Hello I have a problem with my InfluxDB, well not exactly sure if it is a problem. The thing is when I run influxd command I can then connect to InfluxDB no problem. I am able to use Telegraf and everything else I need in my case but the thing is, that in cli I always get message authorization not found. I dont know what is the deal with this and as I said everything is working so I would like to know if I should try to repair it or if I can let it be like that.
I am running InfluxDB 2.0 rc on Ubuntu 20.04.1 LTS

Here is the message I am getting
2020-10-20T12:35:09.905014Z info Welcome to InfluxDB {“log_id”: “0PyVwspG000”, “version”: “2.0.0-rc.0”, “commit”: “df47ec7bb2”, “build_date”: “2020-09-29T22:08:57Z”}
2020-10-20T12:35:09.909259Z info Resources opened {“log_id”: “0PyVwspG000”, “service”: “bolt”, “path”: “/root/.influxdbv2/influxd.bolt”}
2020-10-20T12:35:09.914423Z info Checking InfluxDB metadata for prior version. {“log_id”: “0PyVwspG000”, “bolt_path”: “/root/.influxdbv2/influxd.bolt”}
2020-10-20T12:35:09.914698Z info Using data dir {“log_id”: “0PyVwspG000”, “service”: “storage-engine”, “path”: “/root/.influxdbv2/engine/data”}
2020-10-20T12:35:09.914952Z info Compaction settings {“log_id”: “0PyVwspG000”, “service”: “storage-engine”, “max_concurrent_compactions”: 1, “throughput_bytes_per_second”: 50331648, “throughput_bytes_per_second_burst”: 50331648}
2020-10-20T12:35:09.915309Z info Open store (start) {“log_id”: “0PyVwspG000”, “service”: “storage-engine”, “op_name”: “tsdb_open”, “op_event”: “start”}
2020-10-20T12:35:09.927568Z info Opened shard {“log_id”: “0PyVwspG000”, “service”: “storage-engine”, “op_name”: “tsdb_open”, “index_version”: “tsi1”, “path”: “/root/.influxdbv2/engine/data/8715c4feb96a9b9c/autogen/99”, “duration”: “8.884ms”}

2020-10-20T12:35:18.287465Z info Opened shard {“log_id”: “0PyVwspG000”, “service”: “storage-engine”, “op_name”: “tsdb_open”, “index_version”: “tsi1”, “path”: “/root/.influxdbv2/engine/data/8715c4feb96a9b9c/autogen/794”, “duration”: “7.743ms”}
2020-10-20T12:35:18.299180Z info Open store (end) {“log_id”: “0PyVwspG000”, “service”: “storage-engine”, “op_name”: “tsdb_open”, “op_event”: “end”, “op_elapsed”: “8383.872ms”}
2020-10-20T12:35:18.299424Z info Starting retention policy enforcement service {“log_id”: “0PyVwspG000”, “service”: “retention”, “check_interval”: “30m”}
2020-10-20T12:35:18.299499Z info Starting precreation service {“log_id”: “0PyVwspG000”, “service”: “shard-precreation”, “check_interval”: “10m”, “advance_period”: “30m”}
2020-10-20T12:35:18.299665Z info Starting query controller {“log_id”: “0PyVwspG000”, “service”: “storage-reads”, “concurrency_quota”: 10, “initial_memory_bytes_quota_per_query”: 9223372036854775807, “memory_bytes_quota_per_query”: 9223372036854775807, “max_memory_bytes”: 0, “queue_size”: 10}
2020-10-20T12:35:18.300232Z info Configuring InfluxQL statement executor (zeros indicate unlimited). {“log_id”: “0PyVwspG000”, “max_select_point”: 0, “max_select_series”: 0, “max_select_buckets”: 0}
2020-10-20T12:35:18.595787Z info Starting {“log_id”: “0PyVwspG000”, “service”: “telemetry”, “interval”: “8h”}
2020-10-20T12:35:18.595971Z info Listening {“log_id”: “0PyVwspG000”, “transport”: “http”, “addr”: “:8086”, “port”: 8086}
2020-10-20T12:35:20.285569Z info Unauthorized {“log_id”: “0PyVwspG000”, “error”: “authorization not found”}
2020-10-20T12:35:30.284557Z info Unauthorized {“log_id”: “0PyVwspG000”, “error”: “authorization not found”}
2020-10-20T12:35:40.287914Z info Unauthorized {“log_id”: “0PyVwspG000”, “error”: “authorization not found”}

Any progress on this? I’ve got RC1 and have similar errors. Also got “info Unauthorized {“log_id”: “0PzQXjQ0000”, “error”: “session not found”}” even though tokens in the python code are correct…

Hello @WhiteStorm,
What are you trying to do with the CLI specifically?
Have you tried setting up a config?

Hello @ahannula,
Can you please share your python code?

Hi, here is the relevant code…

Gives errors like (appear upon starting)
2020-10-24T15:03:03.058736Z info Unauthorized {“log_id”: “0Q2mzZXl000”, “error”: “session not found”}

local_bucket=“sensordata”
org=“langstrand”
influx_local_url=“<MY_LOCAL_URL>"
influx_local_token=“"
#influx_local_client = InfluxDBClient(url=influx_local_url, token=influx_local_token, org=org)
influx_local_client = influxdb_client.InfluxDBClient(url=influx_local_url, token=influx_local_token, org=org)
write_api_local = influx_local_client.write_api(write_options=SYNCHRONOUS)

def write_data_influx(timestamp,building,device,category,value):

try:

  point = influxdb_client.Point(category).tag('building', building).tag('device', device).tag('category',category).field('value', value)

except Exception as e:
  print("Point error", e)


# write to the local influx
try:
  print(f'Writing to InfluxDB local: {point.to_line_protocol()} ...')
  write_api_local.write(bucket=local_bucket, org=org, record=point)
except Exception as e:
  print("influx error ",device,e)
  return

Hello @ahannula,
Can you please try this instead for your point:

p = Point(category).tag('building', building).tag('device', device).tag('category',category).field('value', value)

write_api_local.write(bucket=local_bucket, record=p)

Hi there,

I have been getting the same error for long now. The influxdb is set on Azure VM and python client is trying to insert data into it remotely. Tried a bunch of thins including proxy, disabling ssl in the client python code, but in vain. Any help.feedback please?

Here is the code:

from influxdb_client.client.write_api import SYNCHRONOUS
import urllib
import urllib.request

token="pcxxxxxxxxxxxxxxDbPcRjKKpmtPqZ8l47_mlUMsrgG69XeSmxxx_apOWwmgh8CpN1QQ2oQTuQ=="
org = "waxxxx"
bucket = "timeDB"

client = InfluxDBClient(url="http://20.83.176.132:8086", username='watadmin', password='Watlow691993', ssl=False, verify_ssl=False, token=token)

write_api = client.write_api(write_options=SYNCHRONOUS)
data = "mem,host=host1 used_percent=23.43234543"
write_api.write(bucket, org, data)