hMail Errors and Data Directory Changing

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
tsmh
New user
New user
Posts: 2
Joined: 2021-09-07 13:57

hMail Errors and Data Directory Changing

Post by tsmh » 2021-09-08 18:13

Hello,

I hope that this community can assist with an odd problem we have experienced with hMailServer.

We have been running hMailserver for a number of years and have been pleased with its performance. Recently it has suffered a very strange problem.

Version: 5.6.4-B2283
Database: MySQL running locally
OS: Windows Server 2016 version 1607 x64
Ram: 10Gb
System is a VPC

Looking back over the event and system logs and also speaking with the hosting supplier we know that the guest system was moved to alternate hardware due to a compute related failure rather than storage issues. The guest system at the time had a couple of un-clean shutdowns.

Since the move, there has been an increase in users having problems synchronising mail and hMailServer has started to crash frequently, whereas it was very stable in the past and would run for weeks with no issue.

hMailServer quietly crashes and restarts but in a state where the admin panel refuses the admin credentials; however access is granted when no credentials are supplied.

The data storage location also changes for each domain from the default:

C:\Program Files(x86)\hMailServer\Data\domain.tld
to
C:\domain.tld

This results in mail being saved in a location not accessible by the application. Following a service restart the admin panel is accesible with credential and the mail is saved in the default location, however further logged errors are created as the mail is in the wrong location and needs to be moved.

There are also entries in the system's Event Viewer where hMailServer crashes with messages similar to the following:

Faulting application name: hMailServer.exe, version: 1.0.0.1, time stamp: 0x559ea8d1
Faulting module name: ntdll.dll, version: 10.0.14393.4530, time stamp: 0x60e34197
Exception code: 0xc0000005
Fault offset: 0x0005ff7c
Faulting process id: 0x19e8
Faulting application start time: 0x01d7a3e3fa00f997
Faulting application path: C:\Program Files (x86)\hMailServer\Bin\hMailServer.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: a739b325-6037-4d9e-9292-ca3fdceb76cf
Faulting package full name:
Faulting package-relative application ID:

Today hMailServer also crashed with the following message:

No more threads can be created in the system. (Exception from HRESULT: 0x800700A4)

ExceptionType: COMException
HelpLine:
Message: No more threads can be created in the system. (Exception from HRESULT: 0x800700A4)
Source: Interop.hMailServer
StackTrace: at hMailServer.IInterfaceApplication.get_Status()
at hMailServer.Administrator.ucStatus.ShowStatistics()
at hMailServer.Administrator.ucStatus.timerServerStats_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
TargetSite: hMailServer.Status get_Status()

I have ensured that Anti-virus and Microsoft's Windows Defender are not scanning the \Data and \Temp directories. There was one VBScript in place for managing Out Of Office controls, and that has been disabled.

At present the server appears to be limping along with a couple of Outlook users experiencing IMAP related synchronisation issues. However I too, with Thunderbird, have seen sync issues.

I haven't seen anyone report a similar issue on the Forums where the Data directory change, so think that there is a deeper underlying issue with the system.

Has anyone seen similar or can help shed some light on the best route forward and whether we need to reinstall ntdll.dll or reinstall hMailServer and then run the DDS to sync up the files and database?

Thanks in advance.

User avatar
jim.bus
Senior user
Senior user
Posts: 787
Joined: 2011-05-28 11:49
Location: US

Re: hMail Errors and Data Directory Changing

Post by jim.bus » 2021-09-08 18:51

Can't say this will fix your problem but you should upgrade to at least the latest production version of hMailServer which is 5.6.7-B2425. You could try the latest Beta which seems to be fairly stable and you would get updated TLS security encryption as well.

Then see if you still have your problems. You should upgrade anyway whether it fixes your specific problem or not.

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

Re: hMail Errors and Data Directory Changing

Post by mattg » 2021-09-09 01:03

tsmh wrote:
2021-09-08 18:13
hMailServer quietly crashes and restarts but in a state where the admin panel refuses the admin credentials; however access is granted when no credentials are supplied.

The data storage location also changes for each domain from the default:

C:\Program Files(x86)\hMailServer\Data\domain.tld
to
C:\domain.tld

This results in mail being saved in a location not accessible by the application. Following a service restart the admin panel is accesible with credential and the mail is saved in the default location, however further logged errors are created as the mail is in the wrong location and needs to be moved.
Looks to me like you have multiple hmailserver installs, in particular multiple hmailserver.ini files
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

tsmh
New user
New user
Posts: 2
Joined: 2021-09-07 13:57

Re: hMail Errors and Data Directory Changing

Post by tsmh » 2021-09-17 10:22

Hi all,

Thanks for the responses so far.

I don't believe there is a problem with multiple installs. I'd installed and configured the server and migrated in mail from a previous server last year, and a check on hmailserver.ini files shows that there is only the one in the Program Files, and one other in a separate backup location, however both detail the data directory as being in Program Files.

Currently hMailServer has stopped crashing like it was doing. I will schedule an update to the application at an appropriate time.

It seems really odd that it was unstable for a period of about 2 days, and now has so far an uptime of 9 days and has proccessed over 60k messages.

If this problem recurs I will follow up on this thread, but for the time being I am happy with how things are running.

Many thanks

Post Reply