SMTP check not working with TCP #15

Closed
opened 2026-02-28 01:31:45 -05:00 by deekerman · 11 comments
Owner

Originally created by @0mni on GitHub (Jul 12, 2021).

Getting the following response on a SMTP port check (587 as well as 465)

connect EHOSTUNREACH xx.xx.xx.xx:587

The IP listed in the error above is my IP for my server.

(node:19) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 142.251.2.109:587
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16)
(node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 62)

I checked that IP in the log, and it looks like it belongs to google? It is not the IP of any of my servers.

https://www.whois.com/whois/142.251.2.109

Originally created by @0mni on GitHub (Jul 12, 2021). Getting the following response on a SMTP port check (587 as well as 465) `connect EHOSTUNREACH xx.xx.xx.xx:587` The IP listed in the error above is my IP for my server. ``` (node:19) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 142.251.2.109:587 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16) (node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 62) ``` I checked that IP in the log, and it looks like it belongs to google? It is not the IP of any of my servers. https://www.whois.com/whois/142.251.2.109
deekerman 2026-02-28 01:31:45 -05:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@louislam commented on GitHub (Jul 12, 2021):

Cannot reproduce the error. I tested

smtp.gmail.com 587
smtp.gmail.com 465

It is working.

@louislam commented on GitHub (Jul 12, 2021): Cannot reproduce the error. I tested smtp.gmail.com 587 smtp.gmail.com 465 It is working.
Author
Owner

@0mni commented on GitHub (Jul 12, 2021):

I don't use Google for e-mail, you can check my server, mail.danlee.ca

@0mni commented on GitHub (Jul 12, 2021): I don't use Google for e-mail, you can check my server, mail.danlee.ca
Author
Owner

@louislam commented on GitHub (Jul 12, 2021):

I don't use Google for e-mail, you can check my server, mail.danlee.ca

Working properly in my side, did you config it like this?

image

@louislam commented on GitHub (Jul 12, 2021): > I don't use Google for e-mail, you can check my server, mail.danlee.ca Working properly in my side, did you config it like this? ![image](https://user-images.githubusercontent.com/1336778/125265200-2f3a7a00-e337-11eb-8b91-fddc77be3535.png)
Author
Owner

@0mni commented on GitHub (Jul 12, 2021):

Confirmed, that is how it is setup, still no go, going to try repull docker container.

@0mni commented on GitHub (Jul 12, 2021): Confirmed, that is how it is setup, still no go, going to try repull docker container.
Author
Owner

@0mni commented on GitHub (Jul 12, 2021):

Tested with Google servers, I get the same error. Docker shows no new version to pull. Is it possible you have a patch change in yours?

@0mni commented on GitHub (Jul 12, 2021): Tested with Google servers, I get the same error. Docker shows no new version to pull. Is it possible you have a patch change in yours?
Author
Owner

@louislam commented on GitHub (Jul 12, 2021):

I also tested it with the latest docker image.

Really strange problem :/
I honestly do not have any ideas. Especially the dns resolved the unknown ip (142.251.2.109) in your side.

@louislam commented on GitHub (Jul 12, 2021): I also tested it with the latest docker image. Really strange problem :/ I honestly do not have any ideas. Especially the dns resolved the unknown ip (142.251.2.109) in your side.
Author
Owner

@TheGuyDanish commented on GitHub (Jul 12, 2021):

Is it possible that your ISP is blocking something? Testing on my end from two different servers, it works as expected as well.

If it's a server in a lab on your own network and you're trying to access it through your own external IP, you router could be blocking hairpinning requests. https://en.wikipedia.org/wiki/Hairpinning

@TheGuyDanish commented on GitHub (Jul 12, 2021): Is it possible that your ISP is blocking something? Testing on my end from two different servers, it works as expected as well. If it's a server in a lab on your own network and you're trying to access it through your own external IP, you router could be blocking hairpinning requests. https://en.wikipedia.org/wiki/Hairpinning
Author
Owner

@0mni commented on GitHub (Jul 12, 2021):

I changed it to the IP, and it still gives the google IP in the error message. Just pulled the GIT of the repo and building it, will let you know if any different.

@0mni commented on GitHub (Jul 12, 2021): I changed it to the IP, and it still gives the google IP in the error message. Just pulled the GIT of the repo and building it, will let you know if any different.
Author
Owner

@0mni commented on GitHub (Jul 12, 2021):

Is it possible that your ISP is blocking something? Testing on my end from two different servers, it works as expected as well.

If it's a server in a lab on your own network and you're trying to access it through your own external IP, you router could be blocking hairpinning requests. https://en.wikipedia.org/wiki/Hairpinning

It's running on a VPS, have it working with other services going to the same host with no issues.

@0mni commented on GitHub (Jul 12, 2021): > Is it possible that your ISP is blocking something? Testing on my end from two different servers, it works as expected as well. > > If it's a server in a lab on your own network and you're trying to access it through your own external IP, you router could be blocking hairpinning requests. https://en.wikipedia.org/wiki/Hairpinning It's running on a VPS, have it working with other services going to the same host with no issues.
Author
Owner

@Panja0 commented on GitHub (Jul 12, 2021):

@0mni

Just checked it and it's working for me as well.
Running a test instance on Docker.

Screenshot - 2021-07-12 at 15 06 22
@Panja0 commented on GitHub (Jul 12, 2021): @0mni Just checked it and it's working for me as well. Running a test instance on Docker. <img width="731" alt="Screenshot - 2021-07-12 at 15 06 22" src="https://user-images.githubusercontent.com/12939350/125292452-c5b07080-e322-11eb-9a2f-9e8e22628fb8.png">
Author
Owner

@0mni commented on GitHub (Jul 12, 2021):

Seems like the host is doing something "funky" ... Put in a ticket. Thanks all!

|18:38:09|root@status2:[/opt/uptime-kuma]> traceroute mail.danlee.ca
traceroute to mail.danlee.ca (192.210.243.56), 30 hops max, 60 byte packets
 1  ionica.meet-your-dream.live (185.232.15.122)  0.063 ms  0.038 ms  0.035 ms
 2  23.147.224.21 (23.147.224.21)  0.210 ms  0.273 ms  0.239 ms
 3  border1.ae4.dedipath-lacp.lax014.pnap.net (69.88.129.105)  0.374 ms  0.360 ms  0.310 ms
 4  core1.po1-40g-bbnet1.lax012.pnap.net (216.52.255.14)  1.371 ms core1.po2-40g-bbnet2.lax012.pnap.net (216.52.255.73)  1.600 ms  1.605 ms
 5  e0-11.cr1.lax2.us.unitasglobal.net (198.232.115.137)  1.559 ms  2.127 ms  1.756 ms
 6  ip4.gtt.net (209.120.155.53)  0.804 ms  0.847 ms  0.806 ms
 7  ae3.cr1-buf1.ip4.gtt.net (89.149.185.197)  56.253 ms be2930.ccr21.elp01.atlas.cogentco.com (154.54.42.78)  21.336 ms ae3.cr1-buf1.ip4.gtt.net (89.149.185.197)  56.689 ms
 8  78.152.61.29 (78.152.61.29)  63.353 ms 78.152.57.87 (78.152.57.87)  62.554 ms 78.152.61.29 (78.152.61.29)  63.275 ms
 9  * * *
10  * * *
11  * * *
12  mail.danlee.ca (192.210.243.56)  62.724 ms  62.736 ms  62.810 ms
|18:38:33|root@status2:[/opt/uptime-kuma]> telnet mail.danlee.ca 587
Trying 192.210.243.56...
telnet: Unable to connect to remote host: No route to host
|18:38:38|root@status2:[/opt/uptime-kuma]> telnet mail.danlee.ca 80
Trying 192.210.243.56...
Connected to mail.danlee.ca.
Escape character is '^]'.
^]
HTTP/1.1 400 Bad Request
Server: nginx
Date: Mon, 12 Jul 2021 22:38:55 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 150
Connection: close
X-Frame-Options: SAMEORIGIN

<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
Connection closed by foreign host.
@0mni commented on GitHub (Jul 12, 2021): Seems like the host is doing something "funky" ... Put in a ticket. Thanks all! ``` |18:38:09|root@status2:[/opt/uptime-kuma]> traceroute mail.danlee.ca traceroute to mail.danlee.ca (192.210.243.56), 30 hops max, 60 byte packets 1 ionica.meet-your-dream.live (185.232.15.122) 0.063 ms 0.038 ms 0.035 ms 2 23.147.224.21 (23.147.224.21) 0.210 ms 0.273 ms 0.239 ms 3 border1.ae4.dedipath-lacp.lax014.pnap.net (69.88.129.105) 0.374 ms 0.360 ms 0.310 ms 4 core1.po1-40g-bbnet1.lax012.pnap.net (216.52.255.14) 1.371 ms core1.po2-40g-bbnet2.lax012.pnap.net (216.52.255.73) 1.600 ms 1.605 ms 5 e0-11.cr1.lax2.us.unitasglobal.net (198.232.115.137) 1.559 ms 2.127 ms 1.756 ms 6 ip4.gtt.net (209.120.155.53) 0.804 ms 0.847 ms 0.806 ms 7 ae3.cr1-buf1.ip4.gtt.net (89.149.185.197) 56.253 ms be2930.ccr21.elp01.atlas.cogentco.com (154.54.42.78) 21.336 ms ae3.cr1-buf1.ip4.gtt.net (89.149.185.197) 56.689 ms 8 78.152.61.29 (78.152.61.29) 63.353 ms 78.152.57.87 (78.152.57.87) 62.554 ms 78.152.61.29 (78.152.61.29) 63.275 ms 9 * * * 10 * * * 11 * * * 12 mail.danlee.ca (192.210.243.56) 62.724 ms 62.736 ms 62.810 ms |18:38:33|root@status2:[/opt/uptime-kuma]> telnet mail.danlee.ca 587 Trying 192.210.243.56... telnet: Unable to connect to remote host: No route to host |18:38:38|root@status2:[/opt/uptime-kuma]> telnet mail.danlee.ca 80 Trying 192.210.243.56... Connected to mail.danlee.ca. Escape character is '^]'. ^] HTTP/1.1 400 Bad Request Server: nginx Date: Mon, 12 Jul 2021 22:38:55 GMT Content-Type: text/html; charset=utf-8 Content-Length: 150 Connection: close X-Frame-Options: SAMEORIGIN <html> <head><title>400 Bad Request</title></head> <body> <center><h1>400 Bad Request</h1></center> <hr><center>nginx</center> </body> </html> Connection closed by foreign host. ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/uptime-kuma#15
No description provided.