Unable to generate reports (Save as PDF) due to PhantomJS error?

We're trialling SQL Monitor 8 on a brand new sever (Windows Server 2016 1607) using IIS, and most things seem to be working fine. However, whenever we attempt to generate a PDF report (Reports > cog icon > Save as PDF), we get a HTTP 500 error (useless on its own I know), but Event Viewer seems to indicate that it's because PhantomJS crashed. The errors are repeatable:
  • ERROR RedGate.SqlMonitor.UI.Website.Areas.Reports.Controllers.ReportController [(null)] - Phantom did not create a file C:\Windows\TEMP\SQLMonitorReport-55661723-716d-4670-849c-180366e1eeb9.pdf
  • ERROR RedGate.SqlMonitor.UI.Website.Areas.Reports.Controllers.ReportController [(null)] - Phantom JS error: <http://phantomjs.org/bug-reporting.html&gt; and file a bug report.
  • ERROR RedGate.SqlMonitor.UI.Website.Areas.Reports.Controllers.ReportController [(null)] - Report rendered exited with unexpected exit code -1073741819
  • ERROR RedGate.SqlMonitor.UI.Website.Areas.Reports.Controllers.ReportController [(null)] - Report rendered exited with unexpected exit code 1
  • ERROR RedGate.SqlMonitor.UI.Website.Areas.Reports.Controllers.ReportController [(null)] - Phantom did not create a file C:\Windows\TEMP\SQLMonitorReport-55661723-716d-4670-849c-180366e1eeb9.pdf
Initially I thought my IIS configuration was incorrect, but I went over the installation guide and video several times, cross-checking against our setup, and it seems sound unless there are steps missing in the documentation.

We're planning to buy the product mid-Feb, but would like to make sure we can get it working properly first, so any advice/help/hints/suggestions would be most appreciated.

Thanks!

Tagged:

Answers

  • Russell DRussell D Posts: 1,324 Diamond 5
    edited January 31, 2019 1:25PM
    @mrhcarlin am I right in thinking this turned out to be a self-signed SSL problem? Just wanting to clarify so we can check you're up and running, and also in case anyone else has this issue.
    Have you visited our Help Centre?
  • mrhcarlinmrhcarlin Posts: 5 New member

    Yes, I forgot I posted on the forum also hence not updating!

    In case anyone else comes across this thread with a similar issue, I noticed some stuff related to SSL in the log files retrieved on the SQL Monitor itself (such as "System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.") and it turned out that the self-signed certificate I created in IIS did not match the CNAME I was using because the certificate was issued to the FQDN of the server instead. I had to use PowerShell to create a new self-signed certificate issued to the CNAME instead.

    Instructions can be found easily enough online, but the code I used to create the self-signed certificate is as follows: New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -DnsName "<your IIS hostname>". Then I just binded the new certificate in IIS and all was good!
Sign In or Register to comment.