Error 121

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
open104
New user
New user
Posts: 3
Joined: 2019-05-03 02:00

Error 121

Post by open104 » 2019-05-03 02:12

I am seeing an error in the log ------

TCP Acceptex failed. Error code 121
Message: The semaphore time out period has expired.

Server is 5.5.2 B2129

I have never seen this before. I search hmail docs for error 121
and got not hits.

Anybody know what the error means?????

glue
New user
New user
Posts: 11
Joined: 2019-05-01 10:17

Re: Error 121

Post by glue » 2019-05-03 05:46

A search did find this
viewtopic.php?p=84126#p84126
might help

User avatar
Dravion
Senior user
Senior user
Posts: 1422
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: Error 121

Post by Dravion » 2019-05-03 08:32

in detail its a bit more complicated the just a Networking interference with Thitdparty Software like fotrexample Antivirus Programs.

Its a Task which cannot be completed by hMailServer in a timely fashion.

open104
New user
New user
Posts: 3
Joined: 2019-05-03 02:00

Re: Error 121

Post by open104 » 2019-05-03 14:22

Dravion wrote:
2019-05-03 08:32
in detail its a bit more complicated the just a Networking interference with Thitdparty Software like fotrexample Antivirus Programs.

Its a Task which cannot be completed by hMailServer in a timely fashion.
I have no idea what you are talking about. There is no anti virus app on the server.

User avatar
Dravion
Senior user
Senior user
Posts: 1422
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: Error 121

Post by Dravion » 2019-05-03 15:52

As i saod, its more complex than a Antivirus Program.

hMailServer is trying to handle a Task which it cannot finish in a specefic time Limit. This can be a total Random task but experience shos its mostly a SMTP task, trying to sent an Email to a diffrent, thirdparty Emailserver.

If you use a Thirdparty SMTP Relayserver, make sure all settings are fine.

If you use a Appliance in front of your hMailServer, try to temporary disabling it.

open104
New user
New user
Posts: 3
Joined: 2019-05-03 02:00

Re: Error 121

Post by open104 » 2019-05-03 17:09

This problem occurred when I tried to go to the server from the client. The problem seems to have gone away this morning but I still don't know with any certainty what caused it, maybe the ISP had problems.

What I still don't understand after 35 years of IT why programmers show error codes that nobody seems to know what they mean?????? What good are they to have them if they are useless. Error code 121 is useless.

User avatar
Dravion
Senior user
Senior user
Posts: 1422
Joined: 2015-09-26 11:50
Location: Germany
Contact:

Re: Error 121

Post by Dravion » 2019-05-03 18:15

open104 wrote:
2019-05-03 17:09
This problem occurred when I tried to go to the server from the client. The problem seems to have gone away this morning but I still don't know with any certainty what caused it, maybe the ISP had problems.

What I still don't understand after 35 years of IT why programmers show error codes that nobody seems to know what they mean?????? What good are they to have them if they are useless. Error code 121 is useless.
In some way you are right.
But keep in mind this is an OpenSource Project.
Nobody get paid for it and there is no guarantee or "Customer has allways right" scenario here.

To the Error itself:
The origin of this Error Message comes from the Windows Operating System (Win32 API).
Microsoft has decided (over 25 Yeatrs ago) to number its Error Messages. Nowsays there are Lookup tables out there what exactly which code stands
for. hMailServer relies on the BOOST C/C++ OpenSource Framework which

Catches your Error in the following way:

TCPServer::HandleAccept(std::shared_ptr<TCPConnection> connection,
const boost::system::error_code& error)
{
if (error.value() == 995)
{
String sMessage;
sMessage.Format(_T("TCP - AcceptEx failed. Error code: %d, Message: %s"), error.value(), String(error.message()).c_str());
LOG_DEBUG(sMessage);



BOOST Framework Error means:
Error: system:995 The I/O operation has been aborted because of either a thread exit or an application request

Which is even deeper root in the Windows Error Code: 0x00000079 ERROR_SEM_TIMEOUT with Errortext decription
"The semaphore time-out period has expired." which is the Error you get in your Error log.
You can look it up here:
https://docs.microsoft.com/en-us/opensp ... ca8e491d2d

However:
Why error.message()).c_str() Code is 121 is not known and not descibed in the BOOST Framework Documentation at all, but its BOOST related. But we dont need to know because our Main Problem here is that the Semaphore Task limit was overriden, the Task in Question was canceled and hMailServer skipped the Problematic Task and moves on to other Tasks.

Because we talking about a Network related issue, i recommend to enable all Debug Log settings and see if you get more details about the
Network Connection which caused the Semaphore Problem. I doubt its not on your hMailServer side rather then the Destination Host hMailServer
is trying to do business with.

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

Re: Error 121

Post by mattg » 2019-05-04 01:45

open104 wrote:
2019-05-03 17:09
What I still don't understand after 35 years of IT why programmers show error codes that nobody seems to know what they mean?????? What good are they to have them if they are useless. Error code 121 is useless.
Please don't be rude, or you'll be shown the door

Many errors in hmailserver are actually Windows generated errors, for unusual or rare circumstances within hmailserver and are simply repeated as received from Windows.
open104 wrote:
2019-05-03 02:12
Message: The semaphore time out period has expired.
This part suggests that something timed out

That 'something' could be DNS, SpamAssassin, AntiVirus (as suggested) or any of the DNSBL or SURBL or RDNS lookups that you have set in antiSPam settings.

You could check the windows event logs to see if they hold any further information.

Normally Antivirus scanning is the culprit for this sort of error, but it could ALSO be that the mail client connection has simply ungraciously dropped, either because the mail client was hacker / spammer or due to poor internet connection.

How OFTEN are you seeing this error??
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply