Wkhtmltopdf "No Host Found" Error

Hi,

I encountered another problem relating to payroll processing. The payslip process times out while trying to submit. The error relates to wkhtmltopdf being unable to process the payslip for mailing:

File “/home/frappe/frappe-bench/env/src/pdfkit/pdfkit/pdfkit.py”, line 140, in to_pdf
raise IOError(‘wkhtmltopdf reported an error:\n’ + stderr.decode(‘utf-8’))
IOError: wkhtmltopdf reported an error:
Exit with code 1 due to network error: HostNotFoundError

I have searched through several posts on this issue and the suggestion is to add “host_name”: “localhost:8000” to the site_config.json file. But once i do this, my erpnext instance throws developer error and so i have to reverse the edit. My instance is currently hosted on amazon web services. Is it possible to educate me on what to do so i can solve this once and for all?

Thanks!!!

Same issue as of: