Sensu handler is not sending mails after Sensu updated to version 6

My sensu is updated from 5.20 to 6.0. Now there are 3 issues started.

1- Handler is not sending mails
2- Sensu does not run using sensu use so force to run it using root.

Please guide to fix these issue.

Hey,

I’d have to see more information concerning the errors you are getting to be sure, but there are a couple of things you should look at that could be causing a problem.

Now that you have run the backend as root manually instead of sensu user, you likely have a file permissions issue in either the configured cache directory ( default on linux is /var/cache/sensu/sensu-backend) or in the configured state directory (default on linux: /var/lib/sensu/sensu-backend) https://docs.sensu.io/sensu-go/latest/operations/maintain-sensu/troubleshoot/#permission-issues

if running as root works, but running as sensu user does not, first thing I do is check file permissions. Once file permissions are fixed, I run sensu-backend manually as sensu user and start trying to diagnose the errors I’m seeing and address them. When running manually I always do this

sudo -u sensu sensu-backend start <additional args here>

This will run sensu-backend as user sensu instead of root, just like the service init scripts do.

The troubleshooting guide is a useful reference for understanding errors: https://docs.sensu.io/sensu-go/latest/operations/maintain-sensu/troubleshoot

I hope this helps.