Cannot start VPOP3 Service

Apr 05, 2017
Darren Lawrence wrote
After a system crash I cannot get VPOP3 to start

The db service is started fine but every attempt to start VPOP Basic Email Server service fails with

The VPOP3 Basic Email Server service terminated with the following error:
Cannot create a file when that file already exists.

I had an issue in the past where the DB service would fail to start and I had to remove the "postmaster.pid" from the vpop3\pgsql\data folder

However I have attempted to remove files that are in the vpop3 root folder that might be the issue but nothing has worked.

Please can you explain what file I need to remove as I am unable to find anything in the KB articles
12 Answers
Apr 05, 2017
Paul Smith agent wrote
Have you tried:

- starting VPOP3 as a normal program instead of as a service (just double-click on VPOP3.EXE)?
- looking in the Windows Event Log?
- looking in the VPOP3 'Errors.log' file (usually in the VPOP3\_logs folder)?

Some or all of these may give more information

Apr 05, 2017
Darren Lawrence wrote
When attempting to run VPOP3.EXE

VPOP3.EXE - Application Error

The application was unable to start correctlu (0xc0000005). Click OK to close the application

Windows event log is as I posted:-

The VPOP3 Basic Email Server service terminated with the following error:
Cannot create a file when that file already exists.

no errors log

however in the svc.log

2017-04-05 17:14:51 - VPOP3DB service running
2017-04-05 17:14:51 - starting process
2017-04-05 17:14:51 - waiting for 'started' flag from process
2017-04-05 17:16:51 - timeout waiting for event handle to be created - (120 secs)

Clues?
Apr 05, 2017
Paul Smith agent wrote
Which version of VPOP3 are you using?

Try deleting/renaming the VPOP3\_database\bayes.ldb folder

Have you tried reinstalling VPOP3 (don't uninstall first, just reinstall over the top) in case a DLL or something has been deleted or got damaged?

Apr 05, 2017
Darren Lawrence wrote
VPOP3 v6.16 build 2805 (Enterprise/Basic) (8 December 2015)

Full set of logs from new try after delete of bayes.ldb

2017-04-05 18:06:47 - start servicemain
2017-04-05 18:06:47 - start pending
2017-04-05 18:06:47 - createkeyname = System\CurrentControlSet\Services\VPOP3\Parameters
2017-04-05 18:06:47 - createkey = 0
2017-04-05 18:06:47 - start pending a
2017-04-05 18:06:47 - query value1 = 0
2017-04-05 18:06:47 - start pending b
2017-04-05 18:06:47 - start pending c
2017-04-05 18:06:47 - start pending d
2017-04-05 18:06:47 - start pending e
2017-04-05 18:06:47 - start pending 2
2017-04-05 18:06:47 - VPOP3DB service running
2017-04-05 18:06:47 - starting process
2017-04-05 18:06:47 - waiting for 'started' flag from process
2017-04-05 18:08:48 - timeout waiting for event handle to be created - (120 secs)


Same entries and same issue after re-install over the top

Something is left behind from the crash I really dont want to do a fresh install

Everything was working fine upto my machine freezing and forced restart
Apr 05, 2017
Darren Lawrence wrote
After removing stuff as mentioned and re-install I decided to reboot again and like magic its working again!!

thanks for the feedback
Apr 09, 2018
Darren Lawrence wrote
This has happened again.

I had to remove the dbcheck.txt, vpop3.pid and started.dat files and reboot the server before it would work. not sure which of the 3 files fixed it.

The server was restarted using a normal restart (shutdown -r)
Apr 10, 2018
Paul Smith agent wrote
> This has happened again.
>
> I had to remove the dbcheck.txt, vpop3.pid and started.dat files and reboot the server before it
> would work. not sure which of the 3 files fixed it.

I can't see that removing any of those files would make a difference to it starting or not. 'started.dat' is just used so that other programs/scripts can see if VPOP3 has started. 'vpop3.pid' is used to prevent it being run twice at the same time (if you can delete the file, then it's not running twice), and 'dbcheck.txt' just prevents some database checks being done if it's present (and those checks are only needed when upgrading from v1 or v2 to v3 or later).

The usual reasons for VPOP3 not starting are - problems with the VPOP3DB service, problems with the VPOP3\_database\bayes.ldb database. Current versions of VPOP3 should handle those problems much more effectively than old versions.

Apr 10, 2018
Darren Lawrence wrote
Hi Paul,

As I started in my original post, the database was running fine . The server was restarted numerous times with no effect , only on another reboot after removing those 3 files appeared to resolve the issue.

The exact same things in the log (timeout waiting..) and the same on screen message "Cannot create a file when that file already exists."
Apr 10, 2018
Darren Lawrence wrote
Could one of those files have been locked? permission problem?
Apr 13, 2018
Paul Smith agent wrote
> Could one of those files have been locked? permission problem?

Possibly. The only one which would have caused VPOP3 not to restart if it couldn't be written to would be the 'VPOP3.PID' file. It'll just ignore the other files if they can't be accessed as they're not that important.

But, if they were locked, then you wouldn't have been able to delete them, and a server restart would unlock any files anyway.

And it shouldn't be a permissions problem because VPOP3 created them in the first place - unless someone had been messing around with file permissions or service login details.

It may have just been coincidence that deleting those files happened at the same time as it restarting OK.

You're using quite an old version of VPOP3; there have been changes made since to make starting more reliable in exceptional circumstances, and to make it easier to diagnose problems if they do happen.

Jul 20, 2018
Darren Lawrence wrote
Hi, This has happened again!

This time, server restarted due to network issues and VPOP wouldn't start with same issue.

I tried just removing VPOP3.pid and started.dat then reboot but it still failed to start so I deleted dbcheck.txt and _database/bayes.ldb folder and rebooted.

Working again!

Same error log entries in svc.log and launching VPOP3.EXE manually fails too. Event viewer has no helpful information other than it recons NTDLL.DLL is involved error code c0000005 or similar.

The client is not impressed, is there any guarantee that if we pay for the upgrade it will fix it? They are on V6.16

Thanks

Jul 21, 2018
Paul Smith agent wrote
> Hi, This has happened again!
>
> This time, server restarted due to network issues and VPOP wouldn't start with same issue.
>
> I tried just removing VPOP3.pid and started.dat then reboot but it still failed to start so I deleted dbcheck.txt and _database/bayes.ldb folder and
> rebooted.
>
> Working again!

If the bayes.ldb database is corrupted, that will cause VPOP3 to crash. Current versions should automatically recover from that (by automatically deleting the folder and then recreating it). It's Google's LevelDB database which is very fast, but, unfortunately renowned for getting corrupted if the PC is powered off/restarted without being shutdown (https://en.wikipedia.org/wiki/LevelDB#Bugs_and_reliability). Recent versions should recover from that automatically. Older versions couldn't recover automatically (we'd naively assumed that since it was written by Google, and is used in the Chrome browser, it'd be reliable).

> The client is not impressed, is there any guarantee that if we pay for the upgrade it will fix it? They are on V6.16

We can't guarantee they won't have problems. v6.16 is about 3 years old now and we haven't had any of this type of problem reported with more recent versions. We run many instances of VPOP3 for our Hosted Service and have never had this problem ourselves. But that doesn't mean that it's impossible for a new way to cause VPOP3 a problem to appear.

The upgrade cost is not expensive. If they want, we can cancel & refund the upgrade if the same problem occurs, but they'll have to restore from backup if they want to go back to the older version because downgrading to older versions is not a supported scenario.