Skip site navigation (1) Skip section navigation (2)

Re: Can't connect after restart

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Audrey Bergeron-Morin" <audreybmorin2(at)yahoo(dot)com>,<pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: Can't connect after restart
Date: 2005-07-28 18:35:47
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers-win32
> Hi,
> One question before we start, I want to make sure we're set 
> up correctly.
> The service is running on an account intra_rpm_bd that was 
> created especially for it (with no Admin rights, of course). 
> The "postgres" account we talk about is for pgSQL itself, 
> right? The postmaster and postgres services are started from 
> the intra_rpm_bd account, is that right? This is the way it 
> was set up by our developer, and fiddling with the various 
> accounts has always confused me immensely. Just want to make 
> sure our setup is okay.

I was referring to the service account. My bad, shoulve' been clearer.
The account inside the db does not come into play until the system
actually starts.

> I'm starting to wonder if our developer wasn't right about it 
> being a problem with permissions... Still doesn't make sense 
> to me that it would work fine until reboot if that's the 
> problem though...

Yeah, it sounds a bit weird. 
Did you install with the MSI installer?

> > Could be something aobut the firewall that doesn't trigger until a 
> > reboot. But yeah, it seems a bit far-fetched.
> If you think there's even a small chance it might be a 
> firewall issue, I'll ask around if we don't find the 
> answer... but if it's a firewall issue, we'll have a really 
> hard time fixing things, since we can't play with the 
> firewall... we'll have to find a way of going around it.
I don't think it's that. But I won't exclude it, I've seen host based
firewalls do some really weird things.

> > You're saying the service control manager complains about a bad 
> > password? That's interesting. It's not a postgresql thing, 
> but it can 
> > certainly cause problems. I havne't heard of this happening. I've 
> > heard of problems with the account losing the right to log in as a 
> > service because of a group policy.
> > But tha certainly wouldn't be fixed by you putting the 
> password back 
> > in.
> > That said, if you're in a domain environment, I'd check if 
> there are 
> > any group policy settings tha tmight affect it anyway.
> Actually, I think it "loses" the password when I try to start 
> through the Windows Start menu shortcut. It's happened a few 
> times, and I haven't been able to reproduce the problem so 
> far when starting/stopping the service directly through 
> Windows Service manager. 

Hmm. That one just does a "net start" through the SCM, so there should
be no difference :-)

> We asked, the account isn't part of any group (except the 
> "User" group, obviously, or so they say), so there shouldn't 
> be any group policy in effect (I can ask for any restriction 
> on the "User" group but it wouldn't make sense).

Group policy has nothing to do with groups :-) Blame the redmond boys.
It's a policy assigned at OU level in the Active Directory.

> It might be 
> that it loses the right to log in as a service, because when 
> I put login/password back in it gives the message "has been 
> granted right... service..." etc., but then why would it give 
> me the "bad user/pwd" error? 

It sohuldn't.

> We are in a domain environment. Is there a way I can check if 
> a domain setting is causing problems without trying to get 
> hold of the technician ?(It can take a few 
> days...)(everything's centralized and I can't play with things myself)

There is a MMC snapin called "Resulting set of policy". Run it in
logging mode, and check things under "User Rights".

> >> The answer to that is, apparently, no, because I can't telnet 
> >> 5432...
> > Right.
> > Does the output of "netstat -an" show anything for 5432?
> No, it's not showing up at all.

Ok. That shows we didn't get that far. Assuming you haven't changed the
port it should listen to? What's the value of "listen_addresses" in your

> > Which of the following processes, and how many, do you get running 
> > when you start up the service:
> > pg_ctl.exe, postmaster.exe, postgres.exe?
> pg_ctl.exe once; postmaster.exe once; postgres.exe four times 

Hmm. That's the way it should be.

> > If you get a postmaster.exe, can you attach to it with process 
> > explorer from, and see what you have on the TCP/IP 
> > tab?
> I downloaded it and looked at postmaster.exe but...
> TCP/IP tab? Where can I find that? Handle or DLL view, and where?

Right click -> Properties. That should give you a tab called TCP/IP.

> > Finally, try using runas to get a commandprompt running as 
> the service 
> > account (runas /user:postgres cmd.exe), and start the database 
> > manually from there (pg_ctl -D <data
> > directory> start), and see if that shows up
> > any other messags.
> Weird, the cmd window shuts down immediately after I input 
> the pwd. I tried running runas from a command prompt and the 
> msg I got is bad user/pwd.

Ok. Then you need to solve that first - seems to be similar to the
issues you had before with the service..



pgsql-hackers-win32 by date

Next:From: Audrey Bergeron-MorinDate: 2005-07-28 19:23:57
Subject: Re: Can't connect after restart
Previous:From: Audrey Bergeron-MorinDate: 2005-07-28 15:46:14
Subject: Re: Can't connect after restart

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group