Thread: BUG #3947: Unable to Initialize Data Cluster

BUG #3947: Unable to Initialize Data Cluster

From
"Lee Ottaway"
Date:
The following bug has been logged online:

Bug reference:      3947
Logged by:          Lee Ottaway
Email address:      lee@fusionsoftwareuk.co.uk
PostgreSQL version: 8.3.0
Operating system:   Vista Home Premium
Description:        Unable to Initialize Data Cluster
Details:

There appears to a problem installing the new 8.3 installer package.  We've
only tested it on Vista so far but it definitely doesn't. At the point that
it has to initialize the data cluster it reports an error when doint initdb
= 1 with "The application has failed to start because its side-by-side
configuration is incorrect. Please see the application event log for more
detail."

If we set the application log to detailed it writes the following at the end
"Action 16:40:01: RunInitdb. Initializing database cluster (this may take a
minute or two)...
MSI (s) (F8:EC) [16:40:01:936]: Executing op:
CustomActionSchedule(Action=RunInitdb,ActionType=3073,Source=BinaryData,Targ
et=_RunInitdb@4,CustomActionData=1033;C:\pgSQL\;C:\pgSQL\data\;C:\pgSQL\shar
e\;5432;1;English_United
Kingdom;WIN1252;admin;fsadmin;LeePC;bridgeit_sa;fsadmin;;)
MSI (s) (F8:BC) [16:40:01:951]: Invoking remote custom action. DLL:
C:\Windows\Installer\MSI8C97.tmp, Entrypoint: _RunInitdb@4
MSI (c) (A8:88) [16:40:02:123]: Note: 1: 2205 2:  3: Error
MSI (c) (A8:88) [16:40:02:123]: Note: 1: 2228 2:  3: Error 4: SELECT
`Message` FROM `Error` WHERE `Error` = 2835
DEBUG: Error 2835:  The control ErrorIcon was not found on dialog ErrorDlg
The installer has encountered an unexpected error installing this package.
This may indicate a problem with this package. The error code is 2835. The
arguments are: ErrorIcon, ErrorDlg,"

This error occurs whether we use the command line "msiexec /i
postgresql-8.3-int.msi /qr INTERNALLAUNCH=1 ADDLOCAL=server,psql,pgadmin
DOSERVICE=1 PERMITREMOTE=1 DOINITDB=1 ENCODING=WIN1252 CREATESERVICEUSER=1
SERVICEDOMAIN="%COMPUTERNAME%" SERVICEACCOUNT="bridgeit_sa"
SERVICEPASSWORD="fsadmin" SERVICENAME="BridgeIT pgSQL Service"
LISTENPORT=5432 SUPERUSER="admin" SUPERPASSWORD="fsadmin" NOSHORTCUTS=1
BASEDIR="%SYSTEMDRIVE%\pgSQL"
or if we use your own installer.

I can also confirm that 8.2.5 installs with exactly the same settings with
no problem.

Any ideas?

Regards

Lee Ottaway
Fusion Software (UK) Ltd

Re: BUG #3947: Unable to Initialize Data Cluster

From
"Dave Page"
Date:
On Feb 9, 2008 5:52 PM, Lee Ottaway <lee@fusionsoftwareuk.co.uk> wrote:
>
> The following bug has been logged online:
>
> Bug reference:      3947
> Logged by:          Lee Ottaway
> Email address:      lee@fusionsoftwareuk.co.uk
> PostgreSQL version: 8.3.0
> Operating system:   Vista Home Premium
> Description:        Unable to Initialize Data Cluster
> Details:
>
> There appears to a problem installing the new 8.3 installer package.  We've
> only tested it on Vista so far but it definitely doesn't. At the point that
> it has to initialize the data cluster it reports an error when doint initdb
> = 1 with "The application has failed to start because its side-by-side
> configuration is incorrect. Please see the application event log for more
> detail."

We've had an earlier report of this which we've so far failed to pin
down the cause for. The runtimes it's complaining about are included
in the installer as a merge module produced by Microsoft and included
as part of the 'base' feature so it really should work (though you
might need to list base in your list of features when runing the
silent install).

Does this happen on more than one machine?

Does manually installing the runtimes help?
http://www.microsoft.com/downloads/details.aspx?FamilyID=200b2fd9-ae1a-4a14-984d-389c36f85647&DisplayLang=en

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Oracle-compatible database company

Re: BUG #3947: Unable to Initialize Data Cluster

From
"Dave Page"
Date:
On Feb 9, 2008 8:09 PM, Fusion Software (UK) Ltd
<lee@fusionsoftwareuk.co.uk> wrote:
>
>
> Hi
>
> I can confirm that installing the Visual C++ 2005 before installing 8.3.0
> fixes the problem.  We already have to install this to make Crystal Reports
> install correctly in our package therefore we shall simply install this
> before the pgSQL installation and all should be fine.

Hmm, so that raises the question of why Microsoft's own merge module
didn't do the same job. We know it's the right one because at beta1
(or maybe beta2) we found that the main build machine for the server
and installer wasn't on SP1, whilst the machine building StackBuilder
was.

Anyway, thanks for the feedback - I'll continue to try to figure it out.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Oracle-compatible database company

Re: BUG #3947: Unable to Initialize Data Cluster

From
"Dave Page"
Date:
On Feb 10, 2008 4:45 PM, Fusion Software (UK) Ltd
<lee@fusionsoftwareuk.co.uk> wrote:
>
> Can also confirm that under exactly the same circumstances 8.2 installs
> without a hitch.  There's definitiely a glitch somewhere in the 8.3
> installation package.

8.3 is the first release build with VC++ 2005 - previous versions were
built with GCC and used the MSVC++ 6.0 runtimes which have been
installed by default since Windows 9something

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Oracle-compatible database company

Re: BUG #3947: Unable to Initialize Data Cluster

From
"Dave Page"
Date:
[Please keep messages CC'd to the list]

On Feb 10, 2008 4:25 PM, Fusion Software (UK) Ltd
<lee@fusionsoftwareuk.co.uk> wrote:
>
> Just to update you on the latest.  It appears that although we can get 8.3.0
> to install by installing the Visual C++ 2005 msi first, although it appears
> to work fine when its first installed with the service starting and
> everything, once you turn the PC off and then on again the service refuses
> to start.  It doesn't matter what we do with pg_hba.conf it will not start
> and eventually dies with an Error 1053 "The service did not respond to the
> start or control request in a timely fashion".  It's odd because when you
> first install the service runs just fine, but once you stop it and try to
> restart it won't have it.

Well that's really bizarre - basically what you're saying is that the
Microsoft installer for the VC++ runtimes leaves the system in such a
state that the installation is effectively lost following a reboot. Is
this machine on a domain with any group policies or similar? I assume
you're running the installations as Administrator?

> So it looks like for the time being we're going to be stuck with using 8.2.
> We can't afford to go to sites and install knowing this might happen.

Quite understood - obviously we're pretty keen to fix it as well. Did
you try any of the beta or RC releases?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Oracle-compatible database company

Re: BUG #3947: Unable to Initialize Data Cluster

From
"Dave Page"
Date:
On Feb 10, 2008 5:10 PM, Fusion Software (UK) Ltd
<lee@fusionsoftwareuk.co.uk> wrote:
>
> Hi Dave
>
> Is this machine on a domain with any group policies or similar? I assume
> you're running the installations as Administrator?
> Its a basic default Vista installation with no domain or group policies.
> Most of our users just buy a PC and use it straight out of the box which is
> what we're trying to imitate.  Yes, we're installing everything as a
> administrator.

OK. How did you install? I've seen some odd issues recently with
unattended installations of Vista.

> The most concerning thing is that it works on one PC and not another, even
> though they're both clean Vista installations, nothing else on them, albeit
> the working one is Vista Business and the other is Vista Home Premium.  I
> have to say though that the pgSQL service really screws things up on that
> PC, it takes an absolute age to open the services screen once it's
> malfunctioned and the whole system freezes for several minutes until it
> finally opens the services showing that it hasn't started.

Hmm...

> Did you try any of the beta or RC releases?
> No, we deliberately waited until the final release so that we wouldn't run
> into exactly the issues we've just run into....:-(

D'oh! This is open source - we need people like you to be testing the
pre-release versions to help us nail any issues that crop up before we
release the GA version.

> Quite understood - obviously we're pretty keen to fix it as well.
> I know you are and don't get me wrong.  Since our discovery of PostGresql
> about a year ago we have been nothing but impressed, and would certainly not
> look anywhere else for a superb database backend.  I just hope in a way that
> this anomaly occurs all over the place and becomes reproducable.  There's
> nothing worse than trying to fix a bug you can't replicate!

No, absolutely not :-(

A couple of quick thoughts - does the problem go away if you copy the
runtimes into the PostgreSQL bin directory? The merge module should
install them into
C:\windows\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700

Also, do you even see the runtimes in that directory following the
installation? What about corresponding manifests in
C:\windows\WinSxS\Manifests?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Oracle-compatible database company

Re: BUG #3947: Unable to Initialize Data Cluster

From
"Dave Page"
Date:
On Feb 10, 2008 7:45 PM, Fusion Software (UK) Ltd
<lee@fusionsoftwareuk.co.uk> wrote:
>
>
> If it would help I can always invite you to onto the desktop so you can see
> for yourself what is happening?  Not sure how to do that but I've seen the
> facility for remote assistance on Vista.  Alternatively you can go to our
> support page on www.fusionsoftwareuk.co.uk and download RealVNC which will
> allow the same thing.
>

I've actually managed to reproduce the problem here (at last) on a
fresh Vista Ultimate installation. I'm seeing 2 issues:

1) The installation of the runtimes doesn't get committed during
install until the InstallFinalize action. This has always been the
case of course, but on Vista, things seem to have changed such that
the files are not even accessible until then. Of course, initdb
happens before InstallFinalize so it can rollback if there's a
problem.

2) Having manually installed the runtimes, initdb will work fine but
the server fails to start. The SCM reports that the dependency service
netlogon failed to start (which it does unless you're on a domain).
The problem is, we don't explicitly include netlogon as a dependency
anywhere I can see :-(

This second one is an odd one, because none of the other Vista
machines I've ever tested on have been on a domain, so this should
have happened before. Not missing the runtimes I can imagine as other
packages may have installed them though.

I'll keep investigating...

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Oracle-compatible database company

Re: BUG #3947: Unable to Initialize Data Cluster

From
"Dave Page"
Date:
On Feb 11, 2008 3:11 PM, Fusion Software (UK) Ltd
<lee@fusionsoftwareuk.co.uk> wrote:
>
>
> Glad you're on the case.  Please keep me posted as we have a number of
> installations coming up in the next couple of months and we'd much rather
> use 8.3 if at all possible.

Can you check one thing for me please - on the machine that hangs then
fails to start the service, do you see netlogon starting and more or
less immediately stopping in the eventlog? You may also see notices
about PostgreSQL failing to start because of netlogon.

If so (and this might be worth trying in any case), in the Services
control panel applet, please edit the PostgreSQL service and set the
service user account to .\postgres instead of <machinename>\postgres
as it probably is at the moment. Does the service start then?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Oracle-compatible database company

Re: BUG #3947: Unable to Initialize Data Cluster

From
"Dave Page"
Date:
On Feb 11, 2008 4:16 PM, Fusion Software (UK) Ltd
<lee@fusionsoftwareuk.co.uk> wrote:
>
>
> OK this might be something.  If I look at the Application event history it
> has "Waiting for server startup", then "FATAL: unrecognized configuration
> parameter "redirect_stderr" and finally "Timed out waiting for server
> startup".

Oh - I'll bet your installer is laying down an 8.2 config file after
the installation completes. You'll need to update that for 8.3.


--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Oracle-compatible database company