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

Proble at startup of service #107

Open
picoroma opened this issue Jun 6, 2022 · 11 comments
Open

Proble at startup of service #107

picoroma opened this issue Jun 6, 2022 · 11 comments

Comments

@picoroma
Copy link

picoroma commented Jun 6, 2022

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
Copy link
Author

picoroma commented Jun 9, 2022

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

@diegoakechi
Copy link
Member

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

@arbulu89
Copy link
Collaborator

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

@arbulu89
Copy link
Collaborator

#108

@picoroma
Copy link
Author

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

@arbulu89
Copy link
Collaborator

@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

@picoroma
Copy link
Author

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

but still do not start...

@picoroma
Copy link
Author

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

@picoroma
Copy link
Author

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
Copy link
Author

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

@arbulu89
Copy link
Collaborator

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.

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

3 participants