Install Cloudwatch Publisher on RaspberryPi

0

Hi all, i am following this guide https://github.com/awslabs/amazon-cloudwatch-publisher to install cloudwatch publisher on my RaspberryPi, i followed all the steps but i am getting this error

pi@pi-hole:~/temp/amazon-cloudwatch-publisher $ systemctl status amazon-cloudwatch-publisher
● amazon-cloudwatch-publisher.service - amazon-cloudwatch-publisher
    Loaded: loaded (/etc/systemd/system/amazon-cloudwatch-publisher.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Thu 2023-07-27 10:49:07 CEST; 6s Aug
   Process: 17757 ExecStart=/opt/aws/amazon-cloudwatch-publisher/bin/amazon-cloudwatch-publisher (code=exited, status=216/GROUP)
  Main PID: 17757 (code=exited, status=216/GROUP)

Jul 27 10:49:07 pi-hole systemd[1]: Started amazon-cloudwatch-publisher.
Jul 27 10:49:07 pi-hole systemd[17757]: amazon-cloudwatch-publisher.service: Failed to determine group credentials: No such process
Jul 27 10:49:07 pi-hole systemd[17757]: amazon-cloudwatch-publisher.service: Failed at step GROUP spawning /opt/aws/amazon-cloudwatch-publisher/bin/amazon-cloudwatch-publisher: No such process
Jul 27 10:49:07 pi-hole systemd[1]: amazon-cloudwatch-publisher.service: Main process exited, code=exited, status=216/GROUP
Jul 27 10:49:07 pi-hole systemd[1]: amazon-cloudwatch-publisher.service: Failed with result 'exit-code'.

I configured the aws credentials to use access key and security key and not Cognito or IoT X.509. Any idea what the problem might be?

John
posta 10 mesi fa353 visualizzazioni
1 Risposta
1

Hi, code 216 is related to an issue in settings of the Linux group under which your service run.

See https://freedesktop.org/software/systemd/man/systemd.exec.html#Process%20Exit%20Codes

216	EXIT_GROUP	Failed to determine or change group credentials. See Group=/SupplementaryGroups= above. 

In the config of your amazon-cloudwatch-publisher.service with systemd, you have to define Linux user and group under which your service will run. You may not have defined group properly to reach this error and it leads you to this error.

Best

Didier

profile pictureAWS
ESPERTO
con risposta 10 mesi fa
  • Hi Didier, thanks for your comment. The 'install-rpi.bash' script creates the user 'cwpublisher' and connects it to the 'sudo' group, in fact by executing the 'id cwpublisher' command I get this result uid=1001(cwpublisher) gid=27(sudo) gruppi=27(sudo). In file 'amazon-cloudwatch-publisher' instead there is no reference to the user/group to use.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande