hanadb_exporter icon indicating copy to clipboard operation
hanadb_exporter copied to clipboard

Proble at startup of service

Open picoroma opened this issue 3 years ago • 11 comments

I have installed the exporter using zypper Installation was fine. After created the config file (config.json) I try to start with the sequence: systemctl daemon-reload systemctl start prometheus-hanadb_exporter@config systemctl enable prometheus-hanadb_exporter@config systemctl status prometheus-hanadb_exporter@config systemctl stop prometheus-hanadb_exporter@config systemctl restart prometheus-hanadb_exporter@config

But the service do not start. Below is the error

Traceback (most recent call last): File "/usr/bin/hanadb_exporter", line 9, in main.run() File "/usr/lib/python3.6/site-packages/hanadb_exporter/main.py", line 110, in run config = parse_config(config_file) File "/usr/lib/python3.6/site-packages/hanadb_exporter/main.py", line 42, in parse_config json_data = json.load(f_ptr) File "/usr/lib64/python3.6/json/init.py", line 299, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/usr/lib64/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python3.6/json/decoder.py", line 355, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 13 column 3 (char 260)

My python version is 3.6.15 My OS version is: SUSE Linux Enterprise Server 15 SP3

picoroma avatar Jun 06 '22 15:06 picoroma

There is something wrong in the config.json example file suggested: image But i cannot recognize the error!

picoroma avatar Jun 09 '22 17:06 picoroma

@picoroma Can you, please, attach the file you are using?

diegoakechi avatar Jun 09 '22 17:06 diegoakechi

@picoroma Remove the last comma after ssl_validate_cert, it breaks the json validation

arbulu89 avatar Jun 10 '22 06:06 arbulu89

https://github.com/SUSE/hanadb_exporter/pull/108

arbulu89 avatar Jun 10 '22 06:06 arbulu89

I have already solved the problem with my json file that now is sintactically correct. Anyway the service still won't START. I have this error, yet: image

This is my config.json file.

config.txt

picoroma avatar Jun 10 '22 07:06 picoroma

@picoroma Most probably you still have your configuration file wrong.

What do you have in?:

"logging": {
    "config_file": "./logging_config.ini",
    "log_file": "hanadb_exporter.log"
  }

This are just examples, and the files must exist. If you want to use the exporter as a daemon, these files must have absolute paths, as the executable is in the binaries folder.

You could try with something like this:

"logging": {
    "config_file": "/usr/etc/hanadb_exporter/logging_config.ini",
    "log_file": "/var/log/hanadb_exporter_00.log"
  }

**But be sure that the logging config file (/usr/etc/hanadb_exporter/logging_config.ini) exists and in the referenced location. You can take an example logging file from here: https://github.com/SUSE/hanadb_exporter/blob/master/logging_config.ini

arbulu89 avatar Jun 10 '22 07:06 arbulu89

After I created the logging_config.ini file - the error seems to be changed: image

but still do not start...

picoroma avatar Jun 10 '22 07:06 picoroma

Seems a problem of user\pswd\ port. In case of a multitenant system Which user \ port have to use ?

picoroma avatar Jun 10 '22 07:06 picoroma

If I put the pswd of one of the tenant I have this: image

That says that cannot connect to SYSTEM DB... But If I put the pswd of SYSTEM DB - I have the previous error!

picoroma avatar Jun 10 '22 08:06 picoroma

Can be a problem because I use a " ! " as last char of my SYSTEM DB PSWD ?

picoroma avatar Jun 10 '22 08:06 picoroma

Hi @picoroma , I'm sorry, but I cannot give you such a urgent support in this matter. If the issue is urgent, I recommend you to go through the official SUSE support channels.

Otherwise, we might be able to assist you when we have some more time.

arbulu89 avatar Jun 10 '22 08:06 arbulu89