Email to FAX 504 Gateway Time-out

Status
Not open for further replies.

i3ioi-iazard

Member
Mar 14, 2018
52
0
6
36
I have searched the forum and have found some useful info in regards to sending email to fax by setting up the advanced section under the FAX server however I am showing a gateway timeout when i visit https://[myserver]/app/fax/fax_emails.php in my browser. My understanding is if i visit this page in a browser, there should be a check done for mail and if there's a subject with my tag of [FAX] followed by number, it will send that fax. I also checked logs under var/mail/admin and i get the below. Anyone have an idea as to why this may be happening and a way to resolve the issue?

From admin@ip-172-31-17-138.ec2.internal Tue Jan 14 15:55:08 2020
Return-path: <admin@ip-172-31-17-138.ec2.internal>
Envelope-to: admin@ip-172-31-17-138.ec2.internal
Delivery-date: Tue, 14 Jan 2020 15:55:08 +0000
Received: from admin by ip-172-31-17-138.ec2.internal with local (Exim 4.89)
(envelope-from <admin@ip-172-31-17-138.ec2.internal>)
id 1irOX6-000578-0M
for admin@ip-172-31-17-138.ec2.internal; Tue, 14 Jan 2020 15:55:08 +0000
From: root@ip-172-31-17-138.ec2.internal (Cron Daemon)
To: admin@ip-172-31-17-138.ec2.internal
Subject: Cron <admin@ip-172-31-17-138> wget --no-check-certificate --delete-after https://[MYSERVER]/app/fax/fax_emails.php
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/admin>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=admin>
Message-Id: <E1irOX6-000578-0M@ip-172-31-17-138.ec2.internal>
Date: Tue, 14 Jan 2020 15:55:08 +0000

--2020-01-14 15:52:01-- https://[MYSERVER]/app/fax/fax_emails.php
Resolving [MYSERVER] ([MYSERVER])... [MYSERVERIP]
Connecting to [MYSERVER] ([MYSERVER])|[MYSERVERIP]|:443... connected.
WARNING: The certificate of ‘[MYSERVERIP]’ is not trusted.
WARNING: The certificate of ‘[MYSERVERIP]’ hasn't got a known issuer.
The certificate's owner does not match hostname ‘[MYSERVER]’
HTTP request sent, awaiting response... 504 Gateway Time-out
Retrying.

--2020-01-14 15:53:02-- (try: 2) https://[MYSERVER]/app/fax/fax_emails.php
Reusing existing connection to [MYSERVER]:443.
HTTP request sent, awaiting response... 200 No headers, assuming HTTP/0.9
Length: unspecified
Saving to: ‘fax_emails.php.tmp’

0K 8.80 =60s

2020-01-14 15:55:07 (8.80 B/s) - ‘fax_emails.php.tmp’ saved [528]

Removing fax_emails.php.tmp.
 
Last edited:

JamesBorne

Active Member
Jan 24, 2019
294
56
28
Australia
An Nginx 504 error would be logged in /var/log/nginx/error.log.
Can't help without some kind of error to go off.

Look at the access.log and error.log when making your requests.
 

i3ioi-iazard

Member
Mar 14, 2018
52
0
6
36
An Nginx 504 error would be logged in /var/log/nginx/error.log.
Can't help without some kind of error to go off.

Look at the access.log and error.log when making your requests.

I see the below:

error.log
2020/01/28 06:26:02 [error] 783#783: *502029 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 1.1.1.1, server: fusionpbx, request: "GET /app/fax/fax_emails.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.1-fpm.sock", ost: "mypbxdomain.com"

access.log
1.1.1.1 - - [28/Jan/2020:06:26:02 +0000] "GET /app/fax/fax_emails.php HTTP/1.1" 504 183 "-" "Wget/1.18 (linux-gnu)"
 
Status
Not open for further replies.