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

Unable to start sensu-backend on fresh install using stable release #2495

Closed
treydock opened this issue Dec 6, 2018 · 5 comments
Closed
Assignees
Labels
bug component:packaging Sensu packaging improvements
Milestone

Comments

@treydock
Copy link
Contributor

treydock commented Dec 6, 2018

Expected Behavior

I'd expect systemctl start sensu-backend to actually start the daemon.

Current Behavior

Dec 06 22:03:55 sensu-backend.example.com sensu-backend[30949]: {"component":"ee-backend","level":"error","msg":"error starting etcd: mkdir /var/lib/sensu/etcd: permission denied","
Dec 06 22:03:55 sensu-backend.example.com sensu-backend[30949]: panic: runtime error: invalid memory address or nil pointer dereference
Dec 06 22:03:55 sensu-backend.example.com sensu-backend[30949]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x11bd68e]

If I create /var/lib/sensu/etcd owned by sensu the daemon starts just fine.

Possible Solution

Add /var/lib/sensu/etcd/ back into packages.

Steps to Reproduce (for bugs)

  1. Start with fresh install of any supported OS - examples on CentOS 7
  2. yum install sensu-go-agent sensu-go-backend sensu-go-cli
  3. systemctl start sensu-backend
  4. systemctl status sensu-backend - daemon failed
  5. journalctl -xe - see errors

Context

I am trying to get Puppet module updated to support stable and part of our tests is on fresh installs for supported platforms and now those tests are all failing.

Your Environment

  • Sensu version used (sensuctl, sensu-backend, and/or sensu-agent): 5.0.0
  • Installation method (packages, binaries, docker etc.): RPM and DEB
  • Operating System and version (e.g. Ubuntu 14.04): CentOS 7, Ubuntu 16.04 so far
@treydock
Copy link
Contributor Author

treydock commented Dec 6, 2018

Another possible solution would be to install /var/lib/sensu as being owned by sensu user.

@treydock
Copy link
Contributor Author

treydock commented Dec 6, 2018

CC @ghoneycutt

@treydock
Copy link
Contributor Author

treydock commented Dec 6, 2018

Looks like beta set /var/lib/sensu to have ownership sensu:sensu and now stable sets it root:root and this breaks fresh install ability to create /var/lib/sensu/etcd.

@treydock
Copy link
Contributor Author

treydock commented Dec 6, 2018

It looks like new default state-dir changed and must now be defined in backend.yml as seems default doesn't match example config.

@amdprophet
Copy link
Member

@treydock the default state-dir should be /var/lib/sensu/sensu-backend. We missed updating the default in the binary (see #2546) but packages were updated correctly. Please see /usr/share/doc/sensu-go-backend-5.0.1/backend.yml.example and /usr/share/doc/sensu-go-agent-5.0.1/agent.yml.example inside of either the deb or rpm packages for the updated example configs which should represent the defaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component:packaging Sensu packaging improvements
Projects
None yet
Development

No branches or pull requests

5 participants