Smokeping fail Nginx Librenms Socket issue (502 Bad Gateway)

Hello,

after installing smokeping it does not start the web page giving the error 502 Bad Gateway (nginx/1.18.0 (Ubuntu)), but when I see the status of the service it is active and works normally, the log shows the error below;

smokeping.service - Latency Logging and Graphing System
     Loaded: loaded (/lib/systemd/system/smokeping.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-10-25 11:50:40 WAT; 2s ago
       Docs: man:smokeping(1)
             file:/usr/share/doc/smokeping/examples/systemd/slave_mode.conf
    Process: 1299547 ExecStart=/usr/sbin/smokeping --pid-dir=/run/smokeping (code=exited, status=0/SUCCESS)
   Main PID: 1299584 (smokeping)
      Tasks: 4 (limit: 77089)
     Memory: 35.3M
        CPU: 559ms
     CGroup: /system.slice/smokeping.service
             ├─1299584 /usr/bin/perl /usr/sbin/smokeping --pid-dir=/run/smokeping
             ├─1299585 "/usr/sbin/smokeping [lnmsFPing-1]"
             ├─1299586 "/usr/sbin/smokeping [FPing]"
             └─1299587 "/usr/sbin/smokeping [lnmsFPing-0]"

Oct 25 11:50:40 ubuntu smokeping[1299584]: No targets defined for probe lnmsFPing6-0, skipping.
Oct 25 11:50:40 ubuntu smokeping[1299585]: lnmsFPing-1: probing 25 targets with step 300 s and offset 4 s.
Oct 25 11:50:40 ubuntu smokeping[1299584]: Child process 1299586 started for probe FPing.
Oct 25 11:50:40 ubuntu smokeping[1299586]: FPing: probing 1 targets with step 300 s and offset 184 s.
Oct 25 11:50:40 ubuntu smokeping[1299584]: Child process 1299587 started for probe lnmsFPing-0.
Oct 25 11:50:40 ubuntu smokeping[1299584]: No targets defined for probe FPing6, skipping.
Oct 25 11:50:40 ubuntu smokeping[1299584]: No targets defined for probe lnmsFPing6-1, skipping.
Oct 25 11:50:40 ubuntu smokeping[1299584]: All probe processes started successfully.
Oct 25 11:50:40 ubuntu smokeping[1299587]: lnmsFPing-0: probing 25 targets with step 300 s and offset 233 s.
Oct 25 11:50:40 ubuntu systemd[1]: Started Latency Logging and Graphing System.

When validating libre I get the error below;

[FAIL]  We have found some files that are owned by a different user than 'librenms', this will stop you updating automatically and / or rrd files being updated causing graphs to fail.
        [FIX]:
        sudo chown -R librenms:librenms /opt/librenms
        sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
        sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
        Files:
         /opt/librenms/rrd/smokeping/__sortercache/data.FPing.storable
         /opt/librenms/rrd/smokeping/__sortercache/data.lnmsFPing-0.storable
         /opt/librenms/rrd/smokeping/__sortercache/data.lnmsFPing-1.storable

2022/10/25 11:46:33 [error] 1291689#1291689: *3 connect() to unix:/var/run/fcgiwrap.socket failed (111: Unknown error) while connecting to upstream, client: 10.6.6.22, server: librenms.mydomain.com, request: "GET /smokeping/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "librenms.mydomain.com", referrer: "http://librenms.mydomain.com/overview?dashboard=1"

after running the commands the errors disappear, but the Smokeping continues with the same error, if you restart the service the libre error appears again.

can anyone help?
Thanks
Best Regards

===========================================

Component Version
LibreNMS 22.10.0-28-gbfc9c5f84 (2022-10-25T03:48:13+01:00)
DB Schema 2022_09_03_091314_update_ports_adsl_table_with_defaults (246)
PHP 8.1.10
Python 3.10.6
Database MariaDB 10.6.7-MariaDB-2ubuntu1.1
RRDTool 1.7.2
SNMP 5.9.1

===========================================

After running the recommended commands, re-run them again but:

-Add “/” to the end of first one:
sudo chown -R librenms:librenms /opt/librenms/

-And Add “/” to the ones that didn’t had it and Remove this “/” at the end of the ones that didn’t had it:
sudo setfacl -d -m g::rwx /opt/librenms/rrd/ /opt/librenms/logs/ /opt/librenms/bootstrap/cache /opt/librenms/storage

sudo chmod -R ug=rwX /opt/librenms/rrd/ /opt/librenms/logs/ /opt/librenms/bootstrap/cache /opt/librenms/storage

Make sure you run them as root or sudoeer.

Edit: the error came back for me, no idea how to permanently fix it, and no one seems to care lol