Does Alert -> Alert History -> Export to PDF work ?
Try a different web browser, or one with no extensions.
then try directly in the URL
https://URL/csv.php/report=ports/state=down
and
https://URL/csv.php?report=ports&state=down
Output here ?
ls -l /opt/librenms/includes/html/reports/
You could try turn on APP_DEBUG too in .env