User Tools

Site Tools


how_to:vpop3db_postgresql_service_not_starting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
how_to:vpop3db_postgresql_service_not_starting [2014/11/17 09:54] – [VPOP3DB Service not starting] paulhow_to:vpop3db_postgresql_service_not_starting [2018/01/02 10:42] – [Other things to try] paul
Line 3: Line 3:
  
   * [[1069 - Login Failure - error when starting VPOP3DB service]]   * [[1069 - Login Failure - error when starting VPOP3DB service]]
 +  * [[Timeout while VPOP3DB is starting]]
  
 If the PostgreSQL service doesn't start, or starts and immediately stops, there are a couple of things you can do: If the PostgreSQL service doesn't start, or starts and immediately stops, there are a couple of things you can do:
  
   * Look in the Windows //Application//event log for entries relating to PostgreSQL. See below for possible errors in the event log   * Look in the Windows //Application//event log for entries relating to PostgreSQL. See below for possible errors in the event log
-  * Look in the VPOP3\pgsql\data\pg_log folder for a log file created at the time when you started VPOP3. If that is there, you can read that (using Notepad) and see if it reports any problems with files or 'relations'. If so, it might be a problem with a damaged database. See below for other possible error messages in the PostgreSQL log files+  * Look in the VPOP3\pgsql\data\pg_log folder for a log file created at the time when you started VPOP3. If that is there, you can read that (using Notepad) and see if it reports any problems with files or 'relations'. If so, it might be a problem with a damaged database. See below for other possible error messages in the PostgreSQL log files
 +  * Check the Processes list (for all users) in Windows' Task Manager and end any 'postgres.exe' processes which are owned by 'vpop3postgres' and try again.
  
-===Start service manually=== 
-You can also try starting the PostgreSQL service manually: 
- 
-  * For VPOP3 v3 and v4, from a command prompt, run "runas /user:postgres cmd" (password is "vla8Pi4cluwrouDiERiU") 
-  * For VPOP3 v5 and later, from a command prompt, run "runas /user:vpop3postgres cmd" (password is "Nc6ACboDt2jVL6") 
- 
-Then  
-  c: 
-  cd \vpop3\pgsql\bin 
-  pg_ctl -D "C:\vpop3\pgsql\data" start  
-   
-(If your VPOP3 is installed in a different directory, change the above paths as appropriate) 
- 
-See what response you get to the pg_ctl command 
- 
-===Change Service user to 'LocalSystem'=== 
-Occasionally it won't start anyway. In this case, changing the VPOP3DB service Logon user to //Local System Account// will solve the problem (make sure that //Allow service to interact with desktop// is not checked). 
- 
-{{:how_to:vpop3dbservicelocalsystem.png|}} 
- 
-It is not installed this way by default because the 'LocalSystem' user has full permissions to the PC's files, whereas the //vpop3postgres// user only has access to the database files, but it should not be a big security risk as long as other basic security steps are taken. The default installation of the VPOP3DB service does not allow access to the database over the network, so it is low risk. 
 =====Event Viewer Entries===== =====Event Viewer Entries=====
 In the Windows Event Viewer, view the //Application// event log, then look for **Error** entries for the **PostgreSQL** source. In the Windows Event Viewer, view the //Application// event log, then look for **Error** entries for the **PostgreSQL** source.
Line 69: Line 50:
  
 ====no pg_hba.conf entry for host "::1", user "postgres", database "postgres"==== ====no pg_hba.conf entry for host "::1", user "postgres", database "postgres"====
 +====no pg_hba.conf entry for host "::1", user "vpop3", database "vpop3"====
 This usually happens if the PC where VPOP3 is installed used to only have IPv4 installed, and has now had IPv6 added. The PostgreSQL configuration needs altering to support IPv6. This usually happens if the PC where VPOP3 is installed used to only have IPv4 installed, and has now had IPv6 added. The PostgreSQL configuration needs altering to support IPv6.
  
Line 97: Line 79:
 In some cases the last two lines may not exist, in which case you can simply copy those lines from the example above and paste them into your pg_hba.conf file In some cases the last two lines may not exist, in which case you can simply copy those lines from the example above and paste them into your pg_hba.conf file
  
-You will then need to restart the PostgreSQL service in Windows. Note that sometimes PostgreSQL cannot close down properly, and there will be unwanted 'postgres.exe' processes visible in Windows TaskManager on the Processes tab. If so, then end those processes manually, before restarting the service.+You will then need to restart the VPOP3DB/PostgreSQL service in Windows. Note that sometimes PostgreSQL cannot close down properly, and there will be unwanted 'postgres.exe' processes visible in Windows TaskManager on the Processes tab. If so, then end those processes manually, before restarting the service.
  
 ====Shared memory problems==== ====Shared memory problems====
Line 115: Line 97:
  
 Increasing this so much that other programs start paging to disk will be counter-productive, so there always needs to be sufficient free memory for Windows to be happy, and preferably to have memory available for Windows' disk caching. Increasing this so much that other programs start paging to disk will be counter-productive, so there always needs to be sufficient free memory for Windows to be happy, and preferably to have memory available for Windows' disk caching.
 +
 +=====Other things to try=====
 +
 +===Start service manually===
 +You can also try starting the PostgreSQL service manually:
 +
 +  * For VPOP3 v3 and v4, from a command prompt, run "runas /user:postgres cmd" (password is "vla8Pi4cluwrouDiERiU")
 +  * For VPOP3 v5 and later, from a command prompt, run "runas /user:vpop3postgres cmd" (password is "Nc6ACboDt2jVL6")
 +
 +Then 
 +  c:
 +  cd \vpop3\pgsql\bin
 +  pg_ctl -D "C:\vpop3\pgsql\data" start 
 +  
 +(If your VPOP3 is installed in a different directory, change the above paths as appropriate)
 +
 +See what response you get to the pg_ctl command
 +
 +===Change Service user to 'LocalSystem'===
 +Occasionally it won't start anyway. In this case, changing the VPOP3DB service Logon user to //Local System Account// will solve the problem (make sure that //Allow service to interact with desktop// is not checked).
 +
 +{{:how_to:vpop3dbservicelocalsystem.png|}}
 +
 +It is not installed this way by default because the 'LocalSystem' user has full permissions to the PC's files, whereas the //vpop3postgres// user only has access to the database files, but it should not be a big security risk as long as other basic security steps are taken. The default installation of the VPOP3DB service does not allow access to the database over the network, so it is low risk.
 +
 +===Reinstall PostgreSQL program files===
 +It isn't unknown for a virus scanner or Internet security program (or a 'system restore', etc) to randomly delete the PostgreSQL program files/DLLs, which will cause the service to fail to start.
 +
 +In this case, in v6 or later you can manually replace all the PostgreSQL program files without having to reinstall or lose data. To do this, go to a command prompt in the VPOP3 installation directory and run:
 +
 +==VPOP3 v6.x==
 +  bsdtar -xvf pgsql.tbz
 +  
 +==VPOP3 v7.x==
 +  7z x -aoa -r pgsql95.7z
 +
 +That should overwrite all the PostgreSQL program files/DLLs/etc without affecting the database.
how_to/vpop3db_postgresql_service_not_starting.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1