Re: Can't connect after restart
"Magnus Hagander" <[email protected]> Thu, 28 Jul 2005 20:35:47 +0200
| Newsgroups | gmane.comp.db.postgresql.devel.win32 |
|---|---|
| Message-ID | <[email protected]> |
> Hi, >=20 > One question before we start, I want to make sure we're set=20 > up correctly. >=20 > The service is running on an account intra_rpm_bd that was=20 > created especially for it (with no Admin rights, of course).=20 > The "postgres" account we talk about is for pgSQL itself,=20 > right? The postmaster and postgres services are started from=20 > the intra_rpm_bd account, is that right? This is the way it=20 > was set up by our developer, and fiddling with the various=20 > accounts has always confused me immensely. Just want to make=20 > 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=20 > being a problem with permissions... Still doesn't make sense=20 > to me that it would work fine until reboot if that's the=20 > problem though... Yeah, it sounds a bit weird.=20 Did you install with the MSI installer? > > Could be something aobut the firewall that doesn't trigger until a=20 > > reboot. But yeah, it seems a bit far-fetched. >=20 > If you think there's even a small chance it might be a=20 > firewall issue, I'll ask around if we don't find the=20 > answer... but if it's a firewall issue, we'll have a really=20 > hard time fixing things, since we can't play with the=20 > firewall... we'll have to find a way of going around it. >=20 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=20 > > password? That's interesting. It's not a postgresql thing,=20 > but it can=20 > > certainly cause problems. I havne't heard of this happening. I've=20 > > heard of problems with the account losing the right to log in as a=20 > > service because of a group policy. > > But tha certainly wouldn't be fixed by you putting the=20 > password back=20 > > in. > > That said, if you're in a domain environment, I'd check if=20 > there are=20 > > any group policy settings tha tmight affect it anyway. >=20 > Actually, I think it "loses" the password when I try to start=20 > through the Windows Start menu shortcut. It's happened a few=20 > times, and I haven't been able to reproduce the problem so=20 > far when starting/stopping the service directly through=20 > Windows Service manager.=20 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=20 > "User" group, obviously, or so they say), so there shouldn't=20 > be any group policy in effect (I can ask for any restriction=20 > 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=20 > that it loses the right to log in as a service, because when=20 > I put login/password back in it gives the message "has been=20 > granted right... service..." etc., but then why would it give=20 > me the "bad user/pwd" error?=20 It sohuldn't. > We are in a domain environment. Is there a way I can check if=20 > a domain setting is causing problems without trying to get=20 > hold of the technician ?(It can take a few=20 > 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=20 > >> 127.0.0.1 5432... >=20 > > Right. > > Does the output of "netstat -an" show anything for 5432? >=20 > 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 postgresql.conf? > > Which of the following processes, and how many, do you get running=20 > > when you start up the service: > > pg_ctl.exe, postmaster.exe, postgres.exe? >=20 > pg_ctl.exe once; postmaster.exe once; postgres.exe four times=20 Hmm. That's the way it should be. > > If you get a postmaster.exe, can you attach to it with process=20 > > explorer from sysinternals.com, and see what you have on the TCP/IP=20 > > tab? >=20 > 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=20 > the service=20 > > account (runas /user:postgres cmd.exe), and start the database=20 > > manually from there (pg_ctl -D <data > > directory> start), and see if that shows up > > any other messags. >=20 > Weird, the cmd window shuts down immediately after I input=20 > the pwd. I tried running runas from a command prompt and the=20 > 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.. //Magnus ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend