The read operation failed, Code:2

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
map1e
New user
New user
Posts: 1
Joined: 2016-06-12 15:52

The read operation failed, Code:2

Post by map1e » 2016-06-12 16:04

Hello,

We am trying to use phpmailer to send emails from our website. The log (see below) shows connection, but then, it is followed by “The read operation failed”, “Code:2”. What does this mean?

"DEBUG" 3092 "2016-06-11 06:25:29.900" "TCP connection started for session 472"
"DEBUG" 3092 "2016-06-11 06:25:29.901" "Performing SSL/TLS handshake for session 472. Verify certificate: False"
"TCPIP" 3092 "2016-06-11 06:25:30.256" "TCPConnection - TLS/SSL handshake completed. Session Id: 472, Remote IP: x.x.x.IP, Version: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256, Bits: 128"
"SMTPD" 3092 472 "2016-06-11 06:25:30.256" "77.243.27.230" "SENT: 220 domain.com ESMTP"
"DEBUG" 3212 "2016-06-11 06:25:30.943" "The read operation failed. Bytes transferred: 0 Remote IP: x.x.x.IP, Session: 472, Code: 2, Message: End of file"
"DEBUG" 3212 "2016-06-11 06:25:30.943" "Ending session 472"

Thank you in advance!
Map1e

User avatar
mattg
Moderator
Moderator
Posts: 19810
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: The read operation failed, Code:2

Post by mattg » 2016-06-13 00:46

That normally means that the mail client at the other end stopped sending the message part way through.

I get this a lot with spammers failing authentication, then they just drop the connection.
Check your phpmailer settings
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

kegloadam
New user
New user
Posts: 2
Joined: 2016-07-14 11:46

Re: The read operation failed, Code:2

Post by kegloadam » 2016-07-26 19:52

I have the same problem. I got this message:

"SMTPD" 5796 50638 "2016-07-19 18:25:05.209" "193.239.149.113" "SENT: 220 mail.keglo.hu ESMTP"
"SMTPD" 5796 50638 "2016-07-19 18:25:05.256" "193.239.149.113" "RECEIVED: EHLO aramis.iszt.hu"
"SMTPD" 5796 50638 "2016-07-19 18:25:05.256" "193.239.149.113" "SENT: 250-mail.keglo.hu[nl]250-SIZE 30720000[nl]250-AUTH LOGIN PLAIN[nl]250 HELP"
"SMTPD" 5824 50638 "2016-07-19 18:25:05.271" "193.239.149.113" "RECEIVED: MAIL From:<postmaster@domain.hu>"
"SMTPD" 5824 50638 "2016-07-19 18:26:55.800" "193.239.149.113" "SENT: 250 OK"
"DEBUG" 5824 "2016-07-19 18:26:55.800" "The read operation failed. Bytes transferred: 0 Remote IP: 193.239.149.113, Session: 50638, Code: 2, Message: End of file"

This part of my log file referred to my domain provider company. I talked with them, the men sad their server says time out. I don't know the reason... It happens, when the provider tries to check a new domain registration...

This message from the domain checker when I create a new registration. - I have postmaster@keglo.hu of course :)
M-PMAI -I- [keglo.hu] checking postmaster e-mail at mail.keglo.hu, 86.101.227.33 ...
M-VRRT -W- [keglo.hu] retrying verify 1 postmaster@keglo.hu 86.101.227.33
M-VOUT -I- [keglo.hu] address verification: Deferred: Connection closed
M-PMAE -W- [keglo.hu] address check for postmaster failed at mail.keglo.hu
M-PMAS -E- [keglo.hu] addr. check for postmaster failed at ALL MX records (last: 86.101.227.33)

Any idea what settings could be wrong?

Thanks for your answers and opinions.

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: The read operation failed, Code:2

Post by percepts » 2016-07-26 20:09

mxtoolbox times out after 15 seconds when trying to do a diagnostic on 193.239.149.113 aramis.iszt.hu

I think they have problems which are casuing you problems
Connecting to 193.239.149.113
7/26/2016 1:07:06 PM Connection attempt #1 - Unable to connect after 15 seconds. [15.00 sec]

PWS3v2 15002ms
Send them an email to let them know :lol: :lol: :lol:

But also your own performance is very slow too (at least from mxtoolbox) transaction time was over 17 seconds:
Connecting to 86.101.227.33

220 mail.keglo.hu ESMTP [750 ms]
EHLO PWS3.mxtoolbox.com
250-mail.keglo.hu
250-SIZE 30720000
250-AUTH LOGIN PLAIN
250 HELP [766 ms]
MAIL FROM:<supertool@mxtoolbox.com>

SendSMTPCommand: Timeout waiting for response after 15 seconds.

PWS3v2 19532ms
could just be that between the two of you things are just too slow.

do a command line tracert from your hmailserver to aramis.iszt.hu and see the timeouts.

kegloadam
New user
New user
Posts: 2
Joined: 2016-07-14 11:46

Re: The read operation failed, Code:2

Post by kegloadam » 2016-07-29 10:19

Thanks for your answer!

The long time-out is because I use a lot of DNS Blacklist to checking SPAM. If I disable them, the full answer time is under 1 sec. :)

So maybe the problem was this... I'm gonna talk with them and post it here :)

Thanks again!

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: The read operation failed, Code:2

Post by percepts » 2016-07-29 12:39

note that if you are using spamassassin it also does blacklist tests which are most likely duplicating the dnsbl and surbl checks you have set in hmail itself.

Post Reply