Error after unexpected shutdown

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.
Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Error after unexpected shutdown

Postby Kaan1983 » 2008-06-11 17:46

Hi,

after unexpected shutdowns of the server it restarts automatically but for some reason I don't know, I don't know what kind of restart is that neither, hMailServer doesn't start proparly and gives the following errors out :

Code: Select all

"ERROR"   1332   "2008-06-11 03:10:45.297"   "Severity: 1 (Critical), Code: HM5028, Source: ADOConnection::Connect, Description: Error when connecting to database. Microsoft OLE DB Provider for SQL Server Timeout expired Check your database settings in hMailServer.ini."
"ERROR"   1332   "2008-06-11 03:10:41.105"   "Severity: 1 (Critical), Code: HM5028, Source: ADOConnection::Connect, Description: Error when connecting to database. Microsoft OLE DB Provider for SQL Server Cannot open database "Mail" requested by the login. The login failed. Check your database settings in hMailServer.ini."
"ERROR"   1332   "2008-06-11 03:10:46.133"   "Severity: 1 (Critical), Code: HM5028, Source: ADOConnection::Connect, Description: Error when connecting to database. Microsoft OLE DB Provider for SQL Server Cannot open database "Mail" requested by the login. The login failed. Check your database settings in hMailServer.ini."
"ERROR"   1332   "2008-06-11 03:11:01.693"   "Severity: 1 (Critical), Code: HM5028, Source: ADOConnection::Connect, Description: Error when connecting to database. Microsoft OLE DB Provider for SQL Server Cannot open database "Mail" requested by the login. The login failed. Check your database settings in hMailServer.ini."
"ERROR"   1332   "2008-06-11 03:11:06.720"   "Severity: 1 (Critical), Code: HM5028, Source: ADOConnection::Connect, Description: Error when connecting to database. Microsoft OLE DB Provider for SQL Server Cannot open database "Mail" requested by the login. The login failed. Check your database settings in hMailServer.ini."
"ERROR"   1332   "2008-06-11 03:11:11.788"   "Severity: 1 (Critical), Code: HM5028, Source: ADOConnection::Connect, Description: Error when connecting to database. Microsoft OLE DB Provider for SQL Server Cannot open database "Mail" requested by the login. The login failed. Check your database settings in hMailServer.ini."
"ERROR"   1332   "2008-06-11 03:11:16.795"   "Severity: 1 (Critical), Code: HM4354, Source: Application::InitInstance, Description: hMailServer failed to connect to the database server. Error message: ADO: Cannot open database "Mail" requested by the login. The login failed."

solution though, is as easy as just restarting the hMailServer service.

I personally have no idea about the errors; however, I think if we can somehow deal with that we will have more maintenance-free hMail.

^DooM^
Site Admin
Posts: 13853
Joined: 2005-07-29 16:18
Location: UK

Re: Error after unexpected shutdown

Postby ^DooM^ » 2008-06-11 19:44

have you setup hMail dependency to your database?
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-06-12 10:49

then the question would be: how actually do you set that up?

this is the first time I hear "dependency" :)

^DooM^
Site Admin
Posts: 13853
Joined: 2005-07-29 16:18
Location: UK

Re: Error after unexpected shutdown

Postby ^DooM^ » 2008-06-12 12:26

http://www.hmailserver.com/documentatio ... to_install

Service dependencies (hMailServer 4.x and later)

If you are using the built-in MySQL, you do not need to do anything about service dependency. If you are using MSSQL or an external version of MySQL already running on the same machine, you should run the appropriate script from the hMailServer/Addons/Service dependencies folder.

The hMailServer installation automatically tries to set service dependency, but in some cases it's not possible for hMailServer to properly detect which service it should be dependent on. Because of this, you should manually set service dependency by running one of the scripts in the folder above. If you don't set the service dependency, there's a risk that hMailServer won't be able to connect to the database server after reboot. (This happens if hMailServer is started before the database server after reboot)
If at first you don't succeed, bomb disposal probably isn't for you! ヅ

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-06-12 13:18

Thank you Doom and sorry :oops: that I search the forum but not the documents :!:

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-07-18 00:53

I've ran the related script for the dependencies after the problem occured. Now the server automatically restarted again and hMailServer failed to start.
It doesn't start automatically even if I restart windows manually. It gives the below error when I try to start the hMailServer service manually:

Code: Select all

Error 1075: The dependecy service doesn't exist or has been marked for deletion.


Windows Server 2003
Version: 5.0 B294 Alpha

It means no one can currently check/send his/her e-mails :)
Thanks in avdance.

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-07-18 16:35

Damn Me I found it here:

viewtopic.php?f=6&t=12485&p=68446&hilit=dependencies#p68446

But now hMailServer will again probably won't start automatically after a restart...

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-07-18 16:47

Hımm didn't work for me :(

When I try to run the hMailServer administrator it give the following error:

Code: Select all

Retreiving the COM class factory for remote component with CLSID {D6567EF8-0A6C-48E7-9288-A2463123C2F3} from machine localhost failed due to the following error: 80070433.


Does it tell anything?

Thanks in advance

User avatar
martin
Developer
Developer
Posts: 6647
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Error after unexpected shutdown

Postby martin » 2008-07-18 20:01

80070433 means missing service if I'm not wrong.

I'm guessing hMailServer is dependent on a nonexistant service. You can confirm that by opening up the control panel, administrative tools, services, right click on the hMailServer service and select properties. In the property dialog, select Dependencies.

Which database engine are you using? Are you sure you run the correct script? :)

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-07-18 20:33

:D
Sure man, I may be lame but not that bad :P

Thank you for your reply.
I checked that and it seems to be depended on "Remote Procedure Call (RMC)" service. It works already but hMailServer doesn't.

How can I remove that service from hMailServer's dependency?

User avatar
SorenR
Senior user
Senior user
Posts: 984
Joined: 2006-08-21 15:38
Location: Denmark

Re: Error after unexpected shutdown

Postby SorenR » 2008-07-18 20:39

My RPC description says: "Serves as the endpoint mapper and COM Service Control Manager. If this service is stopped or disabled, programs using COM or Remote Procedure Call (RPC) services will not function properly." (W2K3 RC2)

Is there anything RPC/COM/DCOM related in your Event log?
Søren R.

any key
n. A special key on systems programmers' keyboards. When the system says: "Press any key", don't bother looking for it. Unless you're an expert you wont have one.

User avatar
martin
Developer
Developer
Posts: 6647
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Error after unexpected shutdown

Postby martin » 2008-07-18 20:43

You could try to remove the dependency directly in the registry.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hMailServer

I'm guessing that there is something fishy with the DependOnService value in that location...

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-07-18 21:20

@Martin: I tried that but on the registry it seems to be depended on MSSQL. Nothing related to RPC.

@SorenR: Yes SorenR you are right about RPC but because hMailServer doesn't work there's no log.

Should I maybe uninstall and reinstall hMailServer?

User avatar
martin
Developer
Developer
Posts: 6647
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Error after unexpected shutdown

Postby martin » 2008-07-18 21:22

Yes, try uninstalling hMailServer and then install it again in the same folder...

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-07-18 22:22

It was my first hMailServer uninstall... Sentimental moments :)

The service is working fine and still depended on RPC. However now there's a problem with authentication. I have to work on that.

The error is:

Code: Select all

System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {D6567EF8-0A6C-48E7-9288-A2463123C2F3} failed due to the following error: 80070005.


and nothing in log.

Thank you for your support.

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-07-18 22:25

This is the line causing the error:
Public obApp As New hMailServer.Application()

I installed the latest alpha, were there any changes in the API?

What should I do? :)

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-07-18 22:29

I replaced the Interop.HmailServer.dll but still getting the same error. I'm scared :)

User avatar
martin
Developer
Developer
Posts: 6647
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Error after unexpected shutdown

Postby martin » 2008-07-18 22:33

No, no changes in the API. 80070005 means access denied. :-\

Does hMailServer Administrator work or does that give the same problem?

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-07-18 22:46

It works fine. :?

User avatar
martin
Developer
Developer
Posts: 6647
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Error after unexpected shutdown

Postby martin » 2008-07-18 22:53

So that page which does not work, does it run under IIS or something like that?
Could it be that you need to set the DCOM permissions?

User avatar
SorenR
Senior user
Senior user
Posts: 984
Joined: 2006-08-21 15:38
Location: Denmark

Re: Error after unexpected shutdown

Postby SorenR » 2008-07-18 23:01

Kaan1983 wrote:@SorenR: Yes SorenR you are right about RPC but because hMailServer doesn't work there's no log.

I was referring to the Windows Event log..

Could this be a related problem?
http://www.hmailserver.com/forum/viewtopic.php?f=10&t=6012&p=43793&hilit=System.UnauthorizedAccessException%3A#p43793
Søren R.

any key
n. A special key on systems programmers' keyboards. When the system says: "Press any key", don't bother looking for it. Unless you're an expert you wont have one.

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-07-18 23:38

@SorenR: Sorry man I thought you mean hMS logs. That link seems pretty much the same error but couldn't find any solution idea. But I found my old messages :) How stupid I was and am :)

@Martin: Yes it's my webmail running under IIS. I didn't do any changes in the application. I checked the dll file and user got read and execute rights. My other dll's are working also fine.

I'm kind of lost... No idea...

User avatar
martin
Developer
Developer
Posts: 6647
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Error after unexpected shutdown

Postby martin » 2008-07-18 23:48

I'm not talking about permissions on the file but about permissions to access the hMailServer COM API:
http://www.hmailserver.com/documentatio ... ermissions
Maybe it's related to that?

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Error after unexpected shutdown

Postby Kaan1983 » 2008-07-19 09:37

Thanks maann. That was exactly the solution.
Permission works but now I get below error:

Code: Select all

19.07.2008 10:34:12 , kaan , kaan@endmuh.org , /Posta/Postalarim.aspx , IE7 , 7.0
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: Invalid column name 'messagerecipients'.
Invalid column name 'messagerecipientsparsed'.

I need to up my codes to date ;)

Thanks a lot everybody again and again...


Return to “General discussions”



Who is online

Users browsing this forum: No registered users and 1 guest