Score:0

Failed to execute /usr/local/bin/alertmanager: Permission denied

uz flag

I'm trying to configure prometheus alertmanager on Debian 11 with the following unit file:

[Unit]
Description= Prometheus Alertmanager
Wants=network-online.target
After=network-online.target

[Service]
User=alertmanager
Group=alertmanager
Type=simple
ExecStart=/usr/local/bin/alertmanager
--config.file /etc/alertmanager/alertmanager.yml
--storage.path /var/lib/alertmanager/

[Install]
WantedBy=multi-user.target

added alertmanager as user, and used chmod for permissions but I still got the following error:

 alertmanager.service - Prometheus Alertmanager
     Loaded: loaded (/etc/systemd/system/alertmanager.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2023-02-08 02:00:37 +03; 6min ago
    Process: 4289 ExecStart=/usr/local/bin/alertmanager (code=exited, status=203/EXEC)
   Main PID: 4289 (code=exited, status=203/EXEC)
        CPU: 7ms

Feb 08 02:00:37 raspberrypi systemd[1]: Started Prometheus Alertmanager.
Feb 08 02:00:37 raspberrypi systemd[4289]: alertmanager.service: Failed to execute /usr/local/bin/alertmanager: Permission denied
Feb 08 02:00:37 raspberrypi systemd[4289]: alertmanager.service: Failed at step EXEC spawning /usr/local/bin/alertmanager: Permission denied
Feb 08 02:00:37 raspberrypi systemd[1]: alertmanager.service: Main process exited, code=exited, status=203/EXEC
Feb 08 02:00:37 raspberrypi systemd[1]: alertmanager.service: Failed with result 'exit-code'.

what am I missing here?

stdunbar avatar
ro flag
If you do a `file /usr/local/bin/alertmanager` what do you get? If it's a script of some sort, what is the interpreter (i.e. the first line of the file or `shebang`)? Can that be run? Or, if it's an executable, are you on the correct platform?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.