The Sensu Backend service

systemctl status sensu-backend is failing with error vendor preset: disabled. Following is full error output:
[root@dcapmpocappptr1 sensu]#systemctl list-unit-files | grep sensu-backend.service
sensu-backend.service enabled
[root@dcapmpocappptr1 sensu]#systemctl status sensu-backend
? sensu-backend.service - The Sensu Backend service.
Loaded: loaded (/usr/lib/systemd/system/sensu-backend.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Tue 2021-05-11 17:03:57 IST; 5min ago
Process: 33296 ExecStart=/usr/sbin/sensu-backend start -c /etc/sensu/backend.yml (code=exited, status=1/FAILURE)
Main PID: 33296 (code=exited, status=1/FAILURE)

May 11 17:03:57 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:03:57 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:03:57 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 11 17:03:57 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
May 11 17:03:57 dcapmpocappptr1 systemd[1]: start request repeated too quickly for sensu-backend.service
May 11 17:03:57 dcapmpocappptr1 systemd[1]: Failed to start The Sensu Backend service…
May 11 17:03:57 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:03:57 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.

Have you used journalctl -u sensu-backend to see if that gives any additional information? Systemctl’s output is notorious for truncating useful output.

[root@dcapmpocappptr1 ~]#journalctl -u sensu-backend
– Logs begin at Tue 2021-05-11 17:17:44 IST, end at Wed 2021-05-12 06:55:23 IST. –
May 11 17:17:59 dcapmpocappptr1 systemd[1]: Started The Sensu Backend service…
May 11 17:18:00 dcapmpocappptr1 systemd[1]: sensu-backend.service: main process exited, code=exited, status=1/FAILURE
May 11 17:18:00 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:18:00 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:18:00 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 11 17:18:00 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
May 11 17:18:00 dcapmpocappptr1 systemd[1]: Started The Sensu Backend service…
May 11 17:18:00 dcapmpocappptr1 systemd[1]: sensu-backend.service: main process exited, code=exited, status=1/FAILURE
May 11 17:18:00 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:18:00 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:18:00 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 11 17:18:00 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
May 11 17:18:00 dcapmpocappptr1 systemd[1]: Started The Sensu Backend service…
May 11 17:18:00 dcapmpocappptr1 systemd[1]: sensu-backend.service: main process exited, code=exited, status=1/FAILURE
May 11 17:18:00 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:18:00 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:18:01 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 11 17:18:01 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
May 11 17:18:01 dcapmpocappptr1 systemd[1]: Started The Sensu Backend service…
May 11 17:18:01 dcapmpocappptr1 systemd[1]: sensu-backend.service: main process exited, code=exited, status=1/FAILURE
May 11 17:18:01 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:18:01 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:18:01 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 11 17:18:01 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
May 11 17:18:01 dcapmpocappptr1 systemd[1]: Started The Sensu Backend service…
May 11 17:18:01 dcapmpocappptr1 systemd[1]: sensu-backend.service: main process exited, code=exited, status=1/FAILURE
May 11 17:18:01 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:18:01 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:18:01 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 11 17:18:01 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
May 11 17:18:01 dcapmpocappptr1 systemd[1]: start request repeated too quickly for sensu-backend.service
May 11 17:18:01 dcapmpocappptr1 systemd[1]: Failed to start The Sensu Backend service…
May 11 17:18:01 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:18:01 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:20:51 dcapmpocappptr1 systemd[1]: Started The Sensu Backend service…
May 11 17:20:51 dcapmpocappptr1 systemd[1]: sensu-backend.service: main process exited, code=exited, status=1/FAILURE
May 11 17:20:51 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:20:51 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:20:51 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 11 17:20:51 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
May 11 17:20:51 dcapmpocappptr1 systemd[1]: Started The Sensu Backend service…
May 11 17:20:51 dcapmpocappptr1 systemd[1]: sensu-backend.service: main process exited, code=exited, status=1/FAILURE
May 11 17:20:51 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:20:51 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:20:52 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 11 17:20:52 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
May 11 17:20:52 dcapmpocappptr1 systemd[1]: Started The Sensu Backend service…
May 11 17:20:52 dcapmpocappptr1 systemd[1]: sensu-backend.service: main process exited, code=exited, status=1/FAILURE
May 11 17:20:52 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:20:52 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:20:52 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 11 17:20:52 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
May 11 17:20:52 dcapmpocappptr1 systemd[1]: Started The Sensu Backend service…
May 11 17:20:52 dcapmpocappptr1 systemd[1]: sensu-backend.service: main process exited, code=exited, status=1/FAILURE
May 11 17:20:52 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:20:52 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:20:52 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 11 17:20:52 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
May 11 17:20:52 dcapmpocappptr1 systemd[1]: Started The Sensu Backend service…
May 11 17:20:52 dcapmpocappptr1 systemd[1]: sensu-backend.service: main process exited, code=exited, status=1/FAILURE
May 11 17:20:52 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:20:52 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:20:52 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 11 17:20:52 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
May 11 17:20:52 dcapmpocappptr1 systemd[1]: start request repeated too quickly for sensu-backend.service
May 11 17:20:52 dcapmpocappptr1 systemd[1]: Failed to start The Sensu Backend service…

[root@dcapmpocappptr1 ~]#journalctl -xfeu sensu-backend
– Logs begin at Tue 2021-05-11 17:17:44 IST. –
May 11 17:17:59 dcapmpocappptr1 systemd[1]: Started The Sensu Backend service…
– Subject: Unit sensu-backend.service has finished start-up
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit sensu-backend.service has finished starting up.

– The start-up result is done.
May 11 17:18:00 dcapmpocappptr1 systemd[1]: sensu-backend.service: main process exited, code=exited, status=1/FAILURE
May 11 17:18:00 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 11 17:18:00 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 11 17:18:00 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 11 17:18:00 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
– Subject: Unit sensu-backend.service has finished shutting down
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Hello,

Systemd logging

First let’s talk about that systemd log output. It’s possible that the systemd configuration on your system is setup to send service command output to syslog or a log file instead of the journal. This would explain the lack of stdout/stderr msgs in your journal. We can’t anticipate all possible systemd loggiing configurations in the wild.

Let’s check to see how your systemd installation is configured to direct service standard output and standard error.

systemctl show sensu-backend -all |grep Standard

On my system, sensu-backend service stdout is set to output to journal and stderr is set to inherit the stdout setting:

StandardOutput=journal
StandardError=inherit

If you have any other settings, then the systemd journal is probably the wrong place to look for error messages.

Sensu-backend startup troubleshooting

So let’s now talk about troubleshooting sensu-backend itself, outside of systemd. If you can’t figure out where systemd is sending the service output, you can run sensu-backend outside of systemd for troubleshooting running it as the sensu user using sudo.

Assuming you are not making use of the optional environment file support in the sensu-backend.service configuration provided in the official packages… you can run the sensu-backend outside of systemd and get the stdout/stderr by taking the systemd ExecStart directive and running it under sudo like this:

sudo -u sensu /usr/sbin/sensu-backend start -c /etc/sensu/backend.yml

This should be close enough to how its being run under systemd to help you get the error output.

Hope this helps

initially I was getting file permission error for backend.yml so I used chmod and then run the command again.
[root@dcapmpocappptr1 ~]#cd /etc/sensu
[root@dcapmpocappptr1 sensu]#ls -lth
total 4.0K
-rw-r----- 1 root root 1.8K May 12 07:11 backend.yml
[root@dcapmpocappptr1 sensu]#chmod a+r+w backend.yml
[root@dcapmpocappptr1 sensu]#ls -lth
total 4.0K
-rw-rw-rw- 1 root root 1.8K May 12 07:11 backend.yml
rt -c /etc/sensu/backend.yml sudo -u sensu /usr/sbin/sensu-backend sta
{“component”:“etcd”,“level”:“info”,“msg”:“listening for peers on “,“pkg”:“embed” ,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“http: //127.0.0.1:2380”,“pkg”:“embed”,” time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“listening for client requests on “,“pk g”:“embed”,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“127.0.0.1:2379”,“pkg”:“embed”,“time”:” 2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“name = default”,“pkg”:“etcdserver”,“ti me”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“data dir = /var/lib/sensu/sensu-backen d/etcd/data”,“pkg”:“etcdserver”,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“member dir = /var/lib/sensu/sensu-back end/etcd/data/member”,“pkg”:“etcdserver”,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“dedicated WAL dir = /var/lib/sensu/sen su-backend/etcd/wal”,“pkg”:“etcdserver”,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“heartbeat = 100ms”,“pkg”:“etcdserver”, “time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“election = 1000ms”,“pkg”:“etcdserver”, “time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“snapshot count = 100000”,“pkg”:“etcdse rver”,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“advertise client URLs = http: //localho st:2379”,“pkg”:“etcdserver”,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“initial advertise peer URLs = http ://1 27.0.0.1:2380”,“pkg”:“etcdserver”,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“initial cluster = default=http://127.0 .0.1:2380”,“pkg”:“etcdserver”,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“starting member 8927110dc66458af in cl uster 3b0efc7b379f89be”,“pkg”:“etcdserver”,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“8927110dc66458af became follower at te rm 0”,“pkg”:“raft”,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“newRaft 8927110dc66458af [peers: , t erm: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]”,“pkg”:“raft”,“time”:" 2021-05-13T10:41:22+05:30"}
{“component”:“etcd”,“level”:“info”,“msg”:“8927110dc66458af became follower at te rm 1”,“pkg”:“raft”,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“warning”,“msg”:“simple token is not cryptographical ly signed”,“pkg”:“auth”,“time”:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“starting server… [version: 3.3.22, c luster version: to_be_decided]”,“pkg”:“etcdserver”,“time”:“2021-05-13T10:41:22+0 5:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“8927110dc66458af as single-node; fast- forwarding 9 ticks (election ticks 10)”,“pkg”:“etcdserver”,“time”:“2021-05-13T10 :41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“added member 8927110dc66458af [http:// 127.0.0.1:2380] to cluster 3b0efc7b379f89be”,“pkg”:“etcdserver/membership”,“time “:“2021-05-13T10:41:22+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“8927110dc66458af is starting a new ele ction at term 1”,“pkg”:“raft”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“8927110dc66458af became candidate at t erm 2”,“pkg”:“raft”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“8927110dc66458af received MsgVoteResp from 8927110dc66458af at term 2”,“pkg”:“raft”,“time”:“2021-05-13T10:41:23+05:30” }
{“component”:“etcd”,“level”:“info”,“msg”:“8927110dc66458af became leader at term 2”,“pkg”:“raft”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“raft.node: 8927110dc66458af elected le ader 8927110dc66458af at term 2”,“pkg”:“raft”,“time”:“2021-05-13T10:41:23+05:30” }
{“component”:“etcd”,“level”:“info”,“msg”:“published {Name:default ClientURLs:[ht tp://localhost:2379]} to cluster 3b0efc7b379f89be”,“pkg”:“etcdserver”,“time”:“20 21-05-13T10:41:23+05:30”}
{“component”:“sensu-etcd”,“level”:“info”,“msg”:“Etcd ready to serve client conne ctions”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“ready to serve client requests”,“pkg”: “embed”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“setting up the initial cluster version to 3.3”,“pkg”:“etcdserver”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“etcd”,“level”:“warning”,“msg”:“set the initial cluster version to 3.3”,“pkg”:“etcdserver/membership”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“enabled capabilities for version 3.3”, “pkg”:“etcdserver/api”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“etcd”,“level”:“warning”,“msg”:“serving insecure client requests on 127.0.0.1:2379, this is strongly discouraged!”,“pkg”:“embed”,“time”:“2021-05-13 T10:41:23+05:30”}
{“component”:“backend”,“level”:“debug”,“msg”:“Registering backend…”,“time”:“20 21-05-13T10:41:23+05:30”}
{“component”:“backend”,“level”:“debug”,“msg”:“Done registering backend.”,“time”: “2021-05-13T10:41:23+05:30”}
{“component”:“backend”,“entity”:{“entity_class”:“backend”,“system”:{“hostname”:” dcapmpocappptr1”,“os”:“linux”,“platform”:“redhat”,“platform_family”:“rhel”,“plat form_version”:“7.9”,“network”:{“interfaces”:[{“name”:“lo”,“addresses”:[“127.0.0. 1/8”]},{“name”:“eth0”,“mac”:“00:50:56:85:61:41”,“addresses”:[“10.5.129.11/24”]}] },“arch”:“amd64”,“libc_type”:“glibc”,“vm_system”:"",“vm_role”:"",“cloud_provider “:””,“processes”:null},“subscriptions”:null,“last_seen”:0,“deregister”:false,“de registration”:{},“metadata”:{“name”:“dcapmpocappptr1”},“sensu_agent_version”:""} ,“level”:“info”,“msg”:“backend entity information”,“time”:“2021-05-13T10:41:23+0 5:30”}
{“cache”:"/var/cache/sensu/sensu-backend",“component”:“asset-manager”,“level”:“d ebug”,“msg”:“initializing cache directory”,“time”:“2021-05-13T10:41:23+05:30”}
{“cache”:"/var/cache/sensu/sensu-backend",“component”:“asset-manager”,“level”:“d ebug”,“msg”:“done initializing cache directory”,“time”:“2021-05-13T10:41:23+05:3 0”}
{“component”:“store”,“key”:"/sensu.io/entity_configs/",“level”:“debug”,“msg”:“st arting a watcher”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“store”,“key”:"/sensu.io/api/enterprise/federation/v1/etcd-replicat ors/",“level”:“debug”,“msg”:“starting a watcher”,“time”:“2021-05-13T10:41:23+05: 30”}
{“component”:“eventd”,“level”:“info”,“msg”:“no event log file specified, event l ogging is disabled”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“licensing”,“level”:“info”,“msg”:“starting the license watcher”,“ti me”:“2021-05-13T10:41:23+05:30”}
{“component”:“licensing”,“level”:“info”,“msg”:“no enterprise license found”,“tim e”:“2021-05-13T10:41:23+05:30”}
{“component”:“store”,“key”:"/sensu.io/api/enterprise/licensing/v2/license",“leve l”:“debug”,“msg”:“starting a watcher”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“store-providers”,“level”:“info”,“msg”:“starting the event store pr oviders watcher”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“store”,“key”:"/sensu.io/api/enterprise/store/v1/provider/",“level” :“debug”,“msg”:“starting a watcher”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“store-providers”,“level”:“info”,“msg”:“no event store provider fou nd”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“agentd”,“level”:“info”,“msg”:“starting agentd on address: [::]:808 1”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“store”,“key”:"/sensu.io/checks/",“level”:“debug”,“msg”:“starting a watcher”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“backend”,“level”:“info”,“msg”:“shutting down event-store-providers -watcher”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“backend”,“level”:“info”,“msg”:“shutting down backend_id_getter”,“t ime”:“2021-05-13T10:41:23+05:30”}
{“component”:“backend”,“level”:“info”,“msg”:“shutting down message_bus”,“time”:" 2021-05-13T10:41:23+05:30"}
{“component”:“backend”,“level”:“info”,“msg”:“shutting down pipelined”,“time”:“20 21-05-13T10:41:23+05:30”}
{“component”:“store”,“key”:"/sensu.io/api/enterprise/store/v1/provider/",“level” :“debug”,“msg”:“stopping the watcher”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“store-providers”,“level”:“warning”,“msg”:“the postgres store watch er has been stopped”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“backend”,“level”:“info”,“msg”:“shutting down eventd”,“time”:“2021- 05-13T10:41:23+05:30”}
{“component”:“eventd”,“level”:“info”,“msg”:“shutting down eventd”,“time”:“2021-0 5-13T10:41:23+05:30”}
{“component”:“backend”,“level”:“info”,“msg”:“shutting down schedulerd”,“time”:“2 021-05-13T10:41:23+05:30”}
{“component”:“backend”,“level”:“info”,“msg”:“shutting down etcd”,“time”:“2021-05 -13T10:41:23+05:30”}
{“component”:“store”,“key”:"/sensu.io/checks/",“level”:“debug”,“msg”:“stopping t he watcher”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“etcd”,“level”:“info”,“msg”:“skipped leadership transfer for single member cluster”,“pkg”:“etcdserver”,“time”:“2021-05-13T10:41:23+05:30”}
{“component”:“backend”,“level”:“error”,“msg”:“error starting agentd: failed to s tart agentd: listen tcp 0.0.0.0:8081: bind: address already in use”,“time”:“2021 -05-13T10:41:23+05:30”}
{“component”:“sensu-enterprise”,“error”:“error starting agentd: failed to start agentd: listen tcp 0.0.0.0:8081: bind: address already in use”,“level”:“fatal”," msg":“error executing sensu-backend”,“time”:“2021-05-13T10:41:23+05:30”}
[root@dcapmpocappptr1 sensu]#sudo systemctl enable --now sensu-backend
[root@dcapmpocappptr1 sensu]#systemctl status sensu-backend
? sensu-backend.service - The Sensu Backend service.
Loaded: loaded (/usr/lib/systemd/system/sensu-backend.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Thu 2021-05-13 10:43:43 IST; 13s ago
Process: 25323 ExecStart=/usr/sbin/sensu-backend start -c /etc/sensu/backend.yml (code=exited, status=1/FAILURE)
Main PID: 25323 (code=exited, status=1/FAILURE)

May 13 10:43:42 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 13 10:43:42 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.
May 13 10:43:43 dcapmpocappptr1 systemd[1]: sensu-backend.service holdoff time over, scheduling restart.
May 13 10:43:43 dcapmpocappptr1 systemd[1]: Stopped The Sensu Backend service…
May 13 10:43:43 dcapmpocappptr1 systemd[1]: start request repeated too quickly for sensu-backend.service
May 13 10:43:43 dcapmpocappptr1 systemd[1]: Failed to start The Sensu Backend service…
May 13 10:43:43 dcapmpocappptr1 systemd[1]: Unit sensu-backend.service entered failed state.
May 13 10:43:43 dcapmpocappptr1 systemd[1]: sensu-backend.service failed.

From the output you shared… the system where sensu-backend was run is already running something that is listning on tcp port 8081.
Here is the error message:

{“component”:“backend”,“level”:“error”,“msg”:“error starting agentd: failed to s tart agentd: listen tcp 0.0.0.0:8081: bind: address already in use”,“time”:“2021 -05-13T10:41:23+05:30”}

By default sensu-backend uses tcp port 8081 for the websocket service that Sensu agents listen to.
You’ll need either move the service that is already listening on tcp port 8081 or reconfigure sensu-backend to listen on a different port.

This command should help you figure out what is already listening on tcp port 8081

sudo netstat -tlpn

You probably still need to take a moment and figure out how your systemd is configured so you can track down the service logs. Your systemd journal does not contain any of the sensu-backend output, which is suggestive that your systemd is configured to send service output to another logging facility. You’ll need to run the systemctl command I provided previously to discover the correct logging facility for your system.

Good luck.

Thanks, Its works. Now as I changed default port 8081 to else and moved ahead.