Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

playbook fails to starts the grafana server #163

Closed
IrfanSyed-PSC opened this issue Aug 13, 2019 · 7 comments
Closed

playbook fails to starts the grafana server #163

IrfanSyed-PSC opened this issue Aug 13, 2019 · 7 comments

Comments

@IrfanSyed-PSC
Copy link

Hi,

While I was running the playbook on my vsphere CentOS VM, I got the following error while starting the grafana server in the handler.

RUNNING HANDLER [grafana : restart grafana] *****************************************************************************************************************************************
fatal: [10.128.58.8]: FAILED! => {"changed": false, "msg": "Unable to start service grafana-server: Job for grafana-server.service failed because the control process exited with error code. See "systemctl status grafana-server.service" and "journalctl -xe" for details.\n"}

If I look into /var/log/messages then I see the following error

Aug 13 14:32:45 terraform-test systemd: Failed at step USER spawning /usr/sbin/grafana-server: No such process
Aug 13 14:32:45 terraform-test systemd: grafana-server.service: main process exited, code=exited, status=217/USER
Aug 13 14:32:45 terraform-test systemd: Failed to start Grafana instance.
Aug 13 14:32:45 terraform-test systemd: Unit grafana-server.service entered failed state.
Aug 13 14:32:45 terraform-test systemd: grafana-server.service failed.
Aug 13 14:32:45 terraform-test systemd: grafana-server.service holdoff time over, scheduling restart.
Aug 13 14:32:45 terraform-test systemd: Stopped Grafana instance.
Aug 13 14:32:45 terraform-test systemd: Starting Grafana instance...
Aug 13 14:32:45 terraform-test systemd: Failed at step USER spawning /usr/sbin/grafana-server: No such process
Aug 13 14:32:45 terraform-test systemd: grafana-server.service: main process exited, code=exited, status=217/USER
Aug 13 14:32:45 terraform-test systemd: Failed to start Grafana instance.
Aug 13 14:32:45 terraform-test systemd: Unit grafana-server.service entered failed state.
Aug 13 14:32:45 terraform-test systemd: grafana-server.service failed.

If I run "grafana-server" then I get the following error
"/usr/sbin/grafana-server
Grafana-server Init Failed: Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath

If I provide a homepath then it works. So it looks like something is missing in the playbook.

Can you please help me with this ?

@paulfantom
Copy link
Member

Which CentOS?
Is this a fresh installation?
Can you provide variables specific to this role which were used to deploy grafana?
What happens when you manually start grafana with /usr/sbin/grafana-server --homepath=/usr/share/grafana --config=/etc/grafana/grafana.ini?

@IrfanSyed-PSC
Copy link
Author

Here is the CentOS version

Operating System: CentOS Linux 7 (Core)
Kernel: Linux 3.10.0-957.5.1.el7.x86_64
Architecture: x86-64

Yes, as mentioned in my last comment if I just give homepath it works fine.

@IrfanSyed-PSC
Copy link
Author

But I want to use it as a service and not start as a command.

@paulfantom
Copy link
Member

This role doesn't configure systemd service for grafana as it is included in grafana rpm package. From what I see here the problem is in systemd service file.

If you think that regardless fact stated above this somehow might be related to this role, please provide answers to following questions:

Is this a fresh installation?
Can you provide variables specific to this role which were used to deploy grafana?

@IrfanSyed-PSC
Copy link
Author

This is a fresh VM and just created from vsphere. I only think I have changed in the role "ansible-grafana" is changing the grafana password. Other than that, everthing else is the same.

@IrfanSyed-PSC
Copy link
Author

Hi Paul,
I think the problem is with the environment. I am not sure why, but thats what it looks like. I tried to install it manually get the same problem. Thank you for your quick response. If I find a solution, I will post in this thread.

@lock
Copy link

lock bot commented Sep 12, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants