pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Starting postgres server on mac os x 10.6.8
10+ messages / 2 participants
[nested] [flat]

* Starting postgres server on mac os x 10.6.8
@ 2012-02-05 04:50  Andrew Barinov <abarinov@gmail.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Andrew Barinov @ 2012-02-05 04:50 UTC (permalink / raw)
  To: pgsql-admin

Hello,

I'm having trouble restarting the postgres server on my mac. The error I am
getting when I try to run PG is:

could not connect to server: No such file or directory Is the server
running locally and accepting connections on Unix domain socket
"/tmp/.s.PGSQL.5432"?

Here's the command that I tried:

sudo su postgres

bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data restart
pg_ctl: PID file "/Library/PostgreSQL/9.1/data/postmaster.pid" does not
exist
Is server running?
starting server anyway
server starting

then I checked the server status:

bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data status
pg_ctl: no server running

I verified that the pg_ctl and pg_conf files were in place.

I then went ahead and tried this:

bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data start
server starting

then I checked the server status:

bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data status
pg_ctl: no server running

Why is the postgres not starting? I am doing all this under the postgres
superuser, so I should not have any issue with user privileges.

Thanks,

Andrew

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Starting postgres server on mac os x 10.6.8
@ 2012-02-05 05:21  Scott Ribe <scott_ribe@elevated-dev.com>
  parent: Andrew Barinov <abarinov@gmail.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Scott Ribe @ 2012-02-05 05:21 UTC (permalink / raw)
  To: Andrew Barinov <abarinov@gmail.com>; +Cc: pgsql-admin

Find the log file and see what it says.

On Feb 4, 2012, at 9:50 PM, Andrew Barinov wrote:

> Why is the postgres not starting?


-- 
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice







^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Starting postgres server on mac os x 10.6.8
@ 2012-02-05 06:16  Andrew Barinov <abarinov@gmail.com>
  parent: Scott Ribe <scott_ribe@elevated-dev.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Andrew Barinov @ 2012-02-05 06:16 UTC (permalink / raw)
  To: pgsql-admin

I tried the following command:

bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl -D
/Library/PostgreSQL/9.1/data start -l logfile
server starting
sh: logfile: Permission denied

Shouldn't the postgres superuser be allowed to see the logfile?

On Sat, Feb 4, 2012 at 9:21 PM, Scott Ribe <scott_ribe@elevated-dev.com>wrote:

> Find the log file and see what it says.
>
> On Feb 4, 2012, at 9:50 PM, Andrew Barinov wrote:
>
> > Why is the postgres not starting?
>
>
> --
> Scott Ribe
> scott_ribe@elevated-dev.com
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>
>


-- 
Andrew J. Lauer Barinov

AndrewJL@facebook.com
@ajlb8

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Starting postgres server on mac os x 10.6.8
@ 2012-02-05 15:18  Scott Ribe <scott_ribe@elevated-dev.com>
  parent: Andrew Barinov <abarinov@gmail.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Scott Ribe @ 2012-02-05 15:18 UTC (permalink / raw)
  To: Andrew Barinov <abarinov@gmail.com>; +Cc: pgsql-admin

On Feb 4, 2012, at 11:16 PM, Andrew Barinov wrote:

> Shouldn't the postgres superuser be allowed to see the logfile?

What do you mean "see the logfile"??? You're telling it to write into a file named logfile, in the current directory. Obviously, the user that postgres is being run under does not have permission to do that.

-- 
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice







^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Starting postgres server on mac os x 10.6.8
@ 2012-02-05 22:14  Andrew Barinov <abarinov@gmail.com>
  parent: Scott Ribe <scott_ribe@elevated-dev.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Andrew Barinov @ 2012-02-05 22:14 UTC (permalink / raw)
  To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: pgsql-admin

Hi Scott,

This is my first time trying to solve a postgres issue, I just now realized
that the command I tried before wasn't to open the logfile but to do
something else. I couldn't find the command in the postgres docs to open
and see the contents of the logfile, can you tell me what it is?

On Sun, Feb 5, 2012 at 7:18 AM, Scott Ribe <scott_ribe@elevated-dev.com>wrote:

> On Feb 4, 2012, at 11:16 PM, Andrew Barinov wrote:
>
> > Shouldn't the postgres superuser be allowed to see the logfile?
>
> What do you mean "see the logfile"??? You're telling it to write into a
> file named logfile, in the current directory. Obviously, the user that
> postgres is being run under does not have permission to do that.
>
> --
> Scott Ribe
> scott_ribe@elevated-dev.com
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>
>


-- 
Andrew J. Lauer Barinov

AndrewJL@facebook.com
@ajlb8

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Starting postgres server on mac os x 10.6.8
@ 2012-02-05 22:28  Scott Ribe <scott_ribe@elevated-dev.com>
  parent: Andrew Barinov <abarinov@gmail.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Scott Ribe @ 2012-02-05 22:28 UTC (permalink / raw)
  To: Andrew Barinov <abarinov@gmail.com>; +Cc: pgsql-admin

On Feb 5, 2012, at 3:14 PM, Andrew Barinov wrote:

> This is my first time trying to solve a postgres issue, I just now realized that the command I tried before wasn't to open the logfile but to do something else. I couldn't find the command in the postgres docs to open and see the contents of the logfile, can you tell me what it is?

Ah, there is no such command. The log file is just a plain text file and you open it and look at it however you want: Console.app, cat or more at the command line, pico, vim, emacs, BBEdit, TextWrangler, TextMate, TextEdit or any of a thousand other different ways.

You do need to know where it is of course, and you've used some package manager that puts pg pieces in non-standard locations, so I can't help you with that other than refer you to the docs, if there are any, for that install.

-- 
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice







^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Starting postgres server on mac os x 10.6.8
@ 2012-02-05 22:31  Andrew Barinov <abarinov@gmail.com>
  parent: Scott Ribe <scott_ribe@elevated-dev.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Andrew Barinov @ 2012-02-05 22:31 UTC (permalink / raw)
  To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: pgsql-admin

Actually no, I installed it using a tarball of the postgres website.
Everything related to postgres is located inside /Libary/PostgreSQL/
directory, so I'll start there first. Do you know the exact location the
logfile is put in from the tarball installation?

On Sun, Feb 5, 2012 at 2:28 PM, Scott Ribe <scott_ribe@elevated-dev.com>wrote:

> On Feb 5, 2012, at 3:14 PM, Andrew Barinov wrote:
>
> > This is my first time trying to solve a postgres issue, I just now
> realized that the command I tried before wasn't to open the logfile but to
> do something else. I couldn't find the command in the postgres docs to open
> and see the contents of the logfile, can you tell me what it is?
>
> Ah, there is no such command. The log file is just a plain text file and
> you open it and look at it however you want: Console.app, cat or more at
> the command line, pico, vim, emacs, BBEdit, TextWrangler, TextMate,
> TextEdit or any of a thousand other different ways.
>
> You do need to know where it is of course, and you've used some package
> manager that puts pg pieces in non-standard locations, so I can't help you
> with that other than refer you to the docs, if there are any, for that
> install.
>
> --
> Scott Ribe
> scott_ribe@elevated-dev.com
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>
>


-- 
Andrew J. Lauer Barinov

AndrewJL@facebook.com
@ajlb8

^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Starting postgres server on mac os x 10.6.8
@ 2012-02-05 22:35  Scott Ribe <scott_ribe@elevated-dev.com>
  parent: Andrew Barinov <abarinov@gmail.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Scott Ribe @ 2012-02-05 22:35 UTC (permalink / raw)
  To: Andrew Barinov <abarinov@gmail.com>; +Cc: pgsql-admin

On Feb 5, 2012, at 3:31 PM, Andrew Barinov wrote:

> Actually no, I installed it using a tarball of the postgres website. Everything related to postgres is located inside /Libary/PostgreSQL/ directory, so I'll start there first. Do you know the exact location the logfile is put in from the tarball installation?

What tarball? I'm not aware of any such thing, and in a quick look did not see it.

-- 
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice







^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Starting postgres server on mac os x 10.6.8
@ 2012-02-05 22:58  Andrew Barinov <abarinov@gmail.com>
  parent: Scott Ribe <scott_ribe@elevated-dev.com>
  0 siblings, 1 reply; 10+ messages in thread

From: Andrew Barinov @ 2012-02-05 22:58 UTC (permalink / raw)
  To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: pgsql-admin

I got it from here: http://www.postgresql.org/download/macosx/

I found the log file (the location is set inside of pgAdmin), it turns
out my pg_hba.conf file had improper permissions set (postgres was
being denied access). Thanks for pointing me to the right direction!


On Sun, Feb 5, 2012 at 2:35 PM, Scott Ribe <scott_ribe@elevated-dev.com> wrote:
>
> On Feb 5, 2012, at 3:31 PM, Andrew Barinov wrote:
>
> > Actually no, I installed it using a tarball of the postgres website. Everything related to postgres is located inside /Libary/PostgreSQL/ directory, so I'll start there first. Do you know the exact location the logfile is put in from the tarball installation?
>
> What tarball? I'm not aware of any such thing, and in a quick look did not see it.
>
> --
> Scott Ribe
> scott_ribe@elevated-dev.com
> http://www.elevated-dev.com/
> (303) 722-0567 voice
>
>
>
>



-- 
Andrew J. Lauer Barinov

AndrewJL@facebook.com
@ajlb8



^ permalink  raw  reply  [nested|flat] 10+ messages in thread

* Re: Starting postgres server on mac os x 10.6.8
@ 2012-02-05 23:10  Scott Ribe <scott_ribe@elevated-dev.com>
  parent: Andrew Barinov <abarinov@gmail.com>
  0 siblings, 0 replies; 10+ messages in thread

From: Scott Ribe @ 2012-02-05 23:10 UTC (permalink / raw)
  To: Andrew Barinov <abarinov@gmail.com>; +Cc: pgsql-admin

On Feb 5, 2012, at 3:58 PM, Andrew Barinov wrote:

> I got it from here: http://www.postgresql.org/download/macosx/

Ah, those are all external to the postgres web site.

> I found the log file (the location is set inside of pgAdmin), it turns
> out my pg_hba.conf file had improper permissions set (postgres was
> being denied access). Thanks for pointing me to the right direction!

Glad you found it. I would *never* have thought of looking for pgAdmin, since that also is an external project and I've never used and would have had no idea that your install had it.

These "easy" installer to "help" Mac users are kind of a mixed bag; it may be nice to not have to understand as much UNIX & pg to start, but then if anything goes wrong, you're kind of lost.

-- 
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice







^ permalink  raw  reply  [nested|flat] 10+ messages in thread


end of thread, other threads:[~2012-02-05 23:10 UTC | newest]

Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-02-05 04:50 Starting postgres server on mac os x 10.6.8 Andrew Barinov <abarinov@gmail.com>
2012-02-05 05:21 ` Scott Ribe <scott_ribe@elevated-dev.com>
2012-02-05 06:16   ` Andrew Barinov <abarinov@gmail.com>
2012-02-05 15:18     ` Scott Ribe <scott_ribe@elevated-dev.com>
2012-02-05 22:14       ` Andrew Barinov <abarinov@gmail.com>
2012-02-05 22:28         ` Scott Ribe <scott_ribe@elevated-dev.com>
2012-02-05 22:31           ` Andrew Barinov <abarinov@gmail.com>
2012-02-05 22:35             ` Scott Ribe <scott_ribe@elevated-dev.com>
2012-02-05 22:58               ` Andrew Barinov <abarinov@gmail.com>
2012-02-05 23:10                 ` Scott Ribe <scott_ribe@elevated-dev.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox