ulranh / hana_sql_exporter

hana_sql_exporter - SAP Hana SQL Exporter for Prometheus
Apache License 2.0
28 stars 11 forks source link

Can't connect to tenant #3

Closed ChernykhAN closed 4 years ago

ChernykhAN commented 4 years ago

I having error after set password. Command:

 ./hana_sql_exporter pw --tenant c01 --config ./hana_sql_exporter.toml

after password entered

Password: time="02-11-2020 21:54:44" level=error msg="Can't connect to tenant" error="dial tcp: missing address" tenant=c01

I have tried with ip and host-name in ConnString in config

[[tenants]]
  ConnString = "10.10.10.30:32015"
  Name = "c01"
  Tags = ["sapabap", "abap"]
  User = "myuser"

The secret has been writen in toml config despite getted error. And [[tenants]] section has been moved after [[metrics]] section.

ulranh commented 4 years ago

Is 31010 the SQL Port of the Tenant? You can determine the SQL Port with:

select host,service_name,port,sql_port from sys.m_services

ChernykhAN commented 4 years ago

Yes, it's correct port, I'v successfully connected to this host:port in Hana Studio. Instance 20.

PS, Sorry, my mistake, I used port 32015. The same port in table sys.m_services only in one raw: chq-db indexserver 32003 32015 all other rows have 0 SQL port.

The connection error has been occured with port 32015.

ulranh commented 4 years ago

I just saw that you have ConnString in your toml file. It must be ConnStr. This has changed some time ago but I unfortunately inserted the old notation again in the README.

ChernykhAN commented 4 years ago

Now it's connecting successfully. Thanks a lot.