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
질문됨 10달 전353회 조회
1개 답변
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
전문가
답변함 10달 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠