Service not starting during install

Lists: pgsql-general
From: Frank Featherlight <dirtydude(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Service not starting during install
Date: 2009-02-18 22:00:28
Message-ID: 463114950902181400o35567812jf3bb7cc2bb1f2f69@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hey guys, (I am totally new to this kind of thing and have no idea how this
works, please correct me if I do something wrong or stupid)

I recently installed HoldEm Manager on two PC's, this program uses
PostgreSQL and it worked fine on one computer, but on the other one it fails
to start the service during installation.
This is a problem since the installation won't finalize without starting the
service and so it cancels and uninstalls everything.

When I finally found a way around this, I tried to start the service via
Administrative Tools (Services), it gives the following error: "The
PostgreSQL Database Server 8.3-service on Local Computer has been started
and stopped. Some services stop automatically when they have nothing to do,
like Performance Logs and Alerts-service. (translated from dutch)

I read alot online about why this could be, and so I disabled Windows
Firewall (also shutdown the service), disabled all Norton services and
prevented them from starting up with windows and disabled Kaspersky
Anti-Hacker (yes, I feel pretttty vulnerable right now). Uninstalled the
program and installed it again. Also changed the service running under
.\postgres to local system etc.

After all is said and done it still gives me the same error, the service
won't start.

CAN ANYONE HELP??? [image: :cry:]

I installed this package:
http://rvgsoftware.fileburst.com/postgresql.zip
Using postgresql-8.3.msi.
And this installation guide:
http://www.holdemmanager.net/faq/afmmain.aspx?faqid=176

PS: I use Windows XP Service Pack 3 (formerly SP2, same error, does not
matter). Pentium Dual Core 2.8gHz, 1GB DDR2, nuff GB free.

PSS: I also posted something on the HoldEm Manager board but they could not
help me out:
http://www.holdemmanager.net/forum/showthread.php?t=1496<http://www.holdemmanager.net/forum/showthread.php?t=1496>

PSSS: Also a pending thread here:
*
http://www.dbforums.com/postgresql/1638412-service-not-starting-during-install.html#post6382170
*<http://www.dbforums.com/postgresql/1638412-service-not-starting-during-install.html#post6382170>


From: Richard Huxton <dev(at)archonet(dot)com>
To: Frank Featherlight <dirtydude(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Service not starting during install
Date: 2009-02-19 08:04:51
Message-ID: 499D12A3.30600@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Frank Featherlight wrote:
>
> When I finally found a way around this, I tried to start the service via
> Administrative Tools (Services), it gives the following error: "The
> PostgreSQL Database Server 8.3-service on Local Computer has been started
> and stopped. Some services stop automatically when they have nothing to do,
> like Performance Logs and Alerts-service. (translated from dutch)

What do PostgreSQL's logs say? It should be logging startup and shutdown
information somewhere. Find your postgresql.conf and it will tell you where.

Also, you said:

> This is a problem since the installation won't finalize without
> starting the service and so it cancels and uninstalls everything.

So, does that mean you did manage to install PG? What did you do
differently?

> I installed this package:
> http://rvgsoftware.fileburst.com/postgresql.zip
> Using postgresql-8.3.msi.

What is that package? Not got time to download 20GB, unzip it and
individually identify each file.

--
Richard Huxton
Archonet Ltd


From: Frank Featherlight <dirtydude(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Service not starting during install
Date: 2009-02-19 20:13:44
Message-ID: 463114950902191213p28980354p88af89740b07111f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

I could finish the install without starting the service by closing down
msiexec with ctrl+alt+del.

I looked up the log from postgresql and it says this:
FATAL: could not reattach to shared memory (key=1804, addr=01700000): 487
2009-02-19 15:51:01 CET LOG: database system was shut down at 2009-02-19
05:22:30 CET
2009-02-19 15:51:02 CET LOG: database system is ready to accept connections
2009-02-19 15:51:02 CET LOG: autovacuum launcher started
FATAL: could not reattach to shared memory (key=1804, addr=01700000): 487
FATAL: could not reattach to shared memory (key=1804, addr=01700000): 487
FATAL: could not reattach to shared memory (key=1804, addr=01700000): 487
etcetc.

Also when I remove the program and I don't start initdb it will finish
installation normally (since then it won't try and start the service I'm
guessing). But it still won't start the service.

The installation .zip you mentioned is only 20MB? It's postgresql v 8.3
which was provided by the program the database is used for: Holdem Manager.

Thanks for the reply and I hope hearing from you soon
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Frank Featherlight wrote:
> I could finish the install without starting the service by closing down
> msiexec with ctrl+alt+del.

Hmm - wonder if the installation was complete?

> I looked up the log from postgresql and it says this:
> FATAL: could not reattach to shared memory (key=1804, addr=01700000): 487

Well, a bit of googling suggests 487 means "invalid address"
http://archives.postgresql.org/pgsql-general/2008-06/msg00833.php
Shared memory is how the various bits of PostgreSQL communicate with
each other. On a linux/unix system the only error you're likely to see
is because you've tried to allocate more memory than the system will
allow. Since you've not finished installing yet it can't be that.
However, Windows doesn't always give useful error messages, so it's
worth considering other issues. Have a look for a postmaster.pid (or
perhaps postgresql.pid) file somewhere in the installation - that should
be created once PostgreSQL is running, and removed when it stops, so if
you find one you can delete it.

> Also when I remove the program and I don't start initdb it will finish
> installation normally (since then it won't try and start the service I'm
> guessing). But it still won't start the service.

The error message is related to starting the database, so I think you're
right.

>
> The installation .zip you mentioned is only 20MB? It's postgresql v 8.3
> which was provided by the program the database is used for: Holdem
Manager.

Hmm - don't know why they didn't just point you to the main website
http://www.postgresql.org. Oh, that's the right size too - includes
manuals too. It's all the fancy animated icon stuff that helps make apps
so big.
I don't see anything in the release notes for recent releases mentioning
this error:
http://www.postgresql.org/docs/8.3/static/release-8-3-6.html
You say you've disabled your antivirus, but if it's working on the other
PC, I'd still suspect it's up to something. Particularly as you mention
the word that strikes terror into the heart of everyone who has to
support a Windows machine: "Norton". How do you feel about uninstalling
all your antivirus, reinstalling PostgreSQL and seeing if it works then?
Obviously you'll reinstall your a-v after, but that will let us see if
that's the problem.
Oh - Windows firewall shouldn't cause a problem (unless you try to
access the db from another machine), you can leave that on.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

The installation was complete when I reinstalled it without having to start
a initdb.
I deleted the postmaster.pid file but it still does not start.
I have disabled all norton services and kaspersky anti-hacker etc, PC has
been rebooted couple of times and nothing is running anymore.
On the other PC where it worked fine; Norton was running there aswell.
Any other suggestions? I'll delete norton now but I don't think it will help
:(
Hoping we can fix this because I really need it to work.

Hey there again,

uninstalled postgresql, norton and kaspersky. deleted postgresql folder in
program files. rebooted.
installed postgresql again (first time same error during installation, had
to use ctrl+alt+del) then installed it again (no need for initdb this time)
and the installation finished.
deleted the postmaster.pid file, changed the service running under
./postgress to local machine. rebooted.
service still did not start. (it did create a new postmaster.pid file while
trying to start service, deleted it again now)

Any ideas now?

Kind regards, FF.


From: Frank Featherlight <dirtydude(at)gmail(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Service not starting during install
Date: 2009-02-19 21:44:19
Message-ID: 463114950902191344gda11409u9d529199c74f89ed@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hey Richard,

I tried both things, both same results as before :(
Hope there is a solution for this! Thanks for the replies so far :)

Looking forward to hearing from you, FF.

On Thu, Feb 19, 2009 at 9:45 PM, Richard Huxton <dev(at)archonet(dot)com> wrote:

First thing to do is to reduce the shared_buffers value that you will
find in your postgresql.conf file (Have a look in your start menu -
might be listed there, if not it's in the installation and you can edit
it with notepad - it's a simple text file).

Somewhere not too far down is a shared_buffers setting (might be "32M")
- try a small value ("16M" or even "8M"). If we can get the damn thing
started we can worry about its performance later. Now try to start the
system - see if you get the same problem.

OK - assuming that didn't work, the second thing I'm going to suggest is
that you download the latest windows version from
http://www.postgresql.org - we don't know precisely what's in your
installation and the "official" one should work fine with this card program.

Finally, if that doesn't work then I'll copy this thread onto the
hackers list and see if they have any great insights.

I'm afraid I'm not a Windows expert, but since we've ruled out your
antivirus I suspect either a slight difference in service-packs applied
to the two machines, or something strange with default permissions being
applied to the postgres user account. The Windows permissions system is
much more complex than a Unix-style system and it's not always obvious
what permissions are causing a problem. The situation isn't helped by
the fact that Windows' reported errors and the actual error aren't
always that similar.

--
Richard Huxton
Archonet Ltd


From: Frank Featherlight <dirtydude(at)gmail(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Service not starting during install
Date: 2009-02-20 01:25:19
Message-ID: 463114950902191725y1e525a4dm81cc1e7db05bfb8d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Read about the same error somewhere and he said he resolved it with sfc
/scannow.

Got a new error after I ran sfc /scannow and tried starting the postgresql
service:

Can not start the PostgreSQL Database 8.3-service on Local computer.
Error 1053: The service did not respond correctly to the start- or
sendcommand.
(translated from Dutch)

The postgresql log said the following:

FATAL: could not reattach to shared memory (key=1764, addr=01650000): 487
2009-02-20 02:15:48 CET LOG: database system was interrupted; last known up
at 2009-02-20 00:04:52 CET
2009-02-20 02:15:49 CET LOG: database system was not properly shut down;
automatic recovery in progress
2009-02-20 02:15:49 CET LOG: record with zero length at 0/496398
2009-02-20 02:15:49 CET LOG: redo is not required
2009-02-20 02:15:49 CET LOG: database system is ready to accept connections
2009-02-20 02:15:49 CET LOG: autovacuum launcher started
FATAL: could not reattach to shared memory (key=1764, addr=01650000): 487
FATAL: could not reattach to shared memory (key=1764, addr=01650000): 487
FATAL: could not reattach to shared memory (key=1764, addr=01650000): 487
etcetc.

Any ideas now?


From: imageguy <imageguy1206(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Service not starting during install
Date: 2009-02-20 14:29:47
Message-ID: 18a55117-296d-4904-93a2-950896cc15b5@s9g2000prg.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


> Any ideas now?

Are you *sure* you have checked the permissions of the os user_id that
is assigned to run the postgreSQL service ?
PG is very specific about the permissions it wants and just as
importantly it is very specific about the permissions it DOES NOT
want.

I would suggest you start with this entry which describes installing
on Windows.
http://wiki.postgresql.org/wiki/Running_%26_Installing_PostgreSQL_On_Native_Windows

I have installed PG on a number of Win OS machines and in almost every
time when I have run into issues you described above it has come back
to a permissions. As an example, last time a customer's network
tech changed the user_id of the database service to a 'domain admin'
and on the next reboot of the box, the pg service just wouldn't
start. When we changed it back to a domain user everything worked as
it should ... after spending 3 hrs trying to sort out what the problem
was.