pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
could not connect to server
29+ messages / 7 participants
[nested] [flat]

* could not connect to server
@ 2016-10-15 17:11  Antonio Silva <aolinto.lst@gmail.com>
  0 siblings, 2 replies; 29+ messages in thread

From: Antonio Silva @ 2016-10-15 17:11 UTC (permalink / raw)
  To: pgsql-general

Hello

I'm using postgres 9.5 on Ubuntu 16.04. I have worked with pg in my
notebook for almost a month but today postgres did not connected. I tryed
both PGAdmin and psql.

I also tried to login using my own user and postgres but I received the
messages:

Server doesn't listen
The server doesn't accept connections: the connection library reports
could not connect to server: Conexão recusada (connection refused) Is the
server running on host "127.0.0.1" and accepting TCP/IP connections on port
5432?

~$ psql database
WARNING: password file "/home/antonio/.pgpass" has group or world access;
permissions should be u=rw (0600) or less
psql: could not connect to server: Arquivo ou diretório não encontrado
(File or directory not found)
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

$ pg_lsclusters
Ver Cluster Port Status Owner    Data directory               Log file
9.5 main    5432 down   postgres /var/lib/postgresql/9.5/main
/var/log/postgresql/postgresql-9.5-main.log

It was the first time I received the warning "password file
"/home/antonio/.pgpass" has group or world access; permissions should be
u=rw (0600) or less" and I fixed it:
-rw-------  1 antonio antonio      137 Set 30 18:50 .pgpass

I had edited postgresql.conf and pg_hba.conf but this morning they were in
their original configuration. So I edited again to:

/etc/postgresql/9.5/main/postgresql.conf

# - Connection Settings -
listen_addresses = '*'
port = 5432

/etc/postgresql/9.5/main/pg_hba.conf

# Database administrative login by Unix domain socket
local   all             postgres                                md5
# TYPE  DATABASE        USER            ADDRESS                 METHOD
# "local" is for Unix domain socket connections only
local   all             all                                     md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5

I also restarted the server (/etc/init.d/postgresql restart) and the
computer.

I really appreciate any guidance.

All the best,

Antônio Olinto
São Paulo, Brasil

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

* Re: could not connect to server
@ 2016-10-15 17:28  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Antonio Silva <aolinto.lst@gmail.com>
  1 sibling, 1 reply; 29+ messages in thread

From: Adrian Klaver @ 2016-10-15 17:28 UTC (permalink / raw)
  To: Antonio Silva <aolinto.lst@gmail.com>; pgsql-general

On 10/15/2016 10:11 AM, Antonio Silva wrote:
> Hello
>
> I'm using postgres 9.5 on Ubuntu 16.04. I have worked with pg in my
> notebook for almost a month but today postgres did not connected. I
> tryed both PGAdmin and psql.

Did you do an apt-get upgrade in the interim?

>
> I also tried to login using my own user and postgres but I received the
> messages:
>
> Server doesn't listen
> The server doesn't accept connections: the connection library reports
> could not connect to server: Conexão recusada (connection refused) Is
> the server running on host "127.0.0.1" and accepting TCP/IP connections
> on port 5432?

This is indication that Postgres server is not running which is 
confirmed by your pg_lsclusters output below.

>
> ~$ psql database
> WARNING: password file "/home/antonio/.pgpass" has group or world
> access; permissions should be u=rw (0600) or less
> psql: could not connect to server: Arquivo ou diretório não encontrado
> (File or directory not found)
>     Is the server running locally and accepting
>     connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
>
> $ pg_lsclusters
> Ver Cluster Port Status Owner    Data directory               Log file
> 9.5 main    5432 down   postgres /var/lib/postgresql/9.5/main
> /var/log/postgresql/postgresql-9.5-main.log
>
> It was the first time I received the warning "password file
> "/home/antonio/.pgpass" has group or world access; permissions should be
> u=rw (0600) or less" and I fixed it:
> -rw-------  1 antonio antonio      137 Set 30 18:50 .pgpass
>
> I had edited postgresql.conf and pg_hba.conf but this morning they were
> in their original configuration. So I edited again to:
>
> /etc/postgresql/9.5/main/postgresql.conf
>
> # - Connection Settings -
> listen_addresses = '*'
> port = 5432
>
> /etc/postgresql/9.5/main/pg_hba.conf
>
> # Database administrative login by Unix domain socket
> local   all             postgres                                md5
> # TYPE  DATABASE        USER            ADDRESS                 METHOD
> # "local" is for Unix domain socket connections only
> local   all             all                                     md5
> # IPv4 local connections:
> host    all             all             127.0.0.1/32
> <http://127.0.0.1/32;            md5
>
> I also restarted the server (/etc/init.d/postgresql restart) and the
> computer.

What does  pg_lsclusters show?

How did you try to connect?

>
> I really appreciate any guidance.
>
> All the best,
>
> Antônio Olinto
> São Paulo, Brasil


-- 
Adrian Klaver
adrian.klaver@aklaver.com


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* Re: could not connect to server
@ 2016-10-15 17:33  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Antonio Silva <aolinto.lst@gmail.com>
  1 sibling, 0 replies; 29+ messages in thread

From: Tom Lane @ 2016-10-15 17:33 UTC (permalink / raw)
  To: Antonio Silva <aolinto.lst@gmail.com>; +Cc: pgsql-general

Antonio Silva <aolinto.lst@gmail.com> writes:
> $ pg_lsclusters
> Ver Cluster Port Status Owner    Data directory               Log file
> 9.5 main    5432 down   postgres /var/lib/postgresql/9.5/main
> /var/log/postgresql/postgresql-9.5-main.log

Looking into the mentioned log file might offer some insight as to
why the server's not running.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* Re: could not connect to server
@ 2016-10-16 04:09  Antonio Silva <aolinto.lst@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 3 replies; 29+ messages in thread

From: Antonio Silva @ 2016-10-16 04:09 UTC (permalink / raw)
  To: ; +Cc: pgsql-general

Dear Adrian and Tom, thanks for your attention.

I did an upgrade on Friday. I use to do this every week.

Log file informed:

2016-10-15 06:15:20 BRT [995-1] FATAL:  data directory
"/var/lib/postgresql/9.5/main" has group or world access
2016-10-15 06:15:20 BRT [995-2] DETAIL:  Permissions should be u=rwx (0700).

The problem with permissions was already indicated to  .pgpass

So I did a "sudo chmod 0700 main" at /var/lib/postgresql/9.5/ directory and
I could connect postgres again!

A cannot understand what happened. How an upgrade changes the permissions
of files an folders? I work with more two desktops with the same framework
(I7, 8 GB, Ubuntu 16.04, PostgreSQL, ...) and it did not happen.

Well, but I have my database available now. Thanks.

Best regards,

Antônio Olinto

2016-10-15 14:28 GMT-03:00 Adrian Klaver <adrian.klaver@aklaver.com>:

> On 10/15/2016 10:11 AM, Antonio Silva wrote:
>
>> Hello
>>
>> I'm using postgres 9.5 on Ubuntu 16.04. I have worked with pg in my
>> notebook for almost a month but today postgres did not connected. I
>> tryed both PGAdmin and psql.
>>
>
> Did you do an apt-get upgrade in the interim?
>
>
>> I also tried to login using my own user and postgres but I received the
>> messages:
>>
>> Server doesn't listen
>> The server doesn't accept connections: the connection library reports
>> could not connect to server: Conexão recusada (connection refused) Is
>> the server running on host "127.0.0.1" and accepting TCP/IP connections
>> on port 5432?
>>
>
> This is indication that Postgres server is not running which is confirmed
> by your pg_lsclusters output below.
>
>
>> ~$ psql database
>> WARNING: password file "/home/antonio/.pgpass" has group or world
>> access; permissions should be u=rw (0600) or less
>> psql: could not connect to server: Arquivo ou diretório não encontrado
>> (File or directory not found)
>>     Is the server running locally and accepting
>>     connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.
>> 5432"?
>>
>> $ pg_lsclusters
>> Ver Cluster Port Status Owner    Data directory               Log file
>> 9.5 main    5432 down   postgres /var/lib/postgresql/9.5/main
>> /var/log/postgresql/postgresql-9.5-main.log
>>
>> It was the first time I received the warning "password file
>> "/home/antonio/.pgpass" has group or world access; permissions should be
>> u=rw (0600) or less" and I fixed it:
>> -rw-------  1 antonio antonio      137 Set 30 18:50 .pgpass
>>
>> I had edited postgresql.conf and pg_hba.conf but this morning they were
>> in their original configuration. So I edited again to:
>>
>> /etc/postgresql/9.5/main/postgresql.conf
>>
>> # - Connection Settings -
>> listen_addresses = '*'
>> port = 5432
>>
>> /etc/postgresql/9.5/main/pg_hba.conf
>>
>> # Database administrative login by Unix domain socket
>> local   all             postgres                                md5
>> # TYPE  DATABASE        USER            ADDRESS                 METHOD
>> # "local" is for Unix domain socket connections only
>> local   all             all                                     md5
>> # IPv4 local connections:
>> host    all             all             127.0.0.1/32
>> <http://127.0.0.1/32;            md5
>>
>> I also restarted the server (/etc/init.d/postgresql restart) and the
>> computer.
>>
>
> What does  pg_lsclusters show?
>
> How did you try to connect?
>
>
>
>> I really appreciate any guidance.
>>
>> All the best,
>>
>> Antônio Olinto
>> São Paulo, Brasil
>>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>

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

* Re: could not connect to server
@ 2016-10-16 13:49  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Antonio Silva <aolinto.lst@gmail.com>
  2 siblings, 0 replies; 29+ messages in thread

From: Adrian Klaver @ 2016-10-16 13:49 UTC (permalink / raw)
  To: Antonio Silva <aolinto.lst@gmail.com>; +Cc: pgsql-general

On 10/15/2016 09:09 PM, Antonio Silva wrote:
> Dear Adrian and Tom, thanks for your attention.
>
> I did an upgrade on Friday. I use to do this every week.
>
> Log file informed:
>
> 2016-10-15 06:15:20 BRT [995-1] FATAL:  data directory
> "/var/lib/postgresql/9.5/main" has group or world access
> 2016-10-15 06:15:20 BRT [995-2] DETAIL:  Permissions should be u=rwx (0700).
>
> The problem with permissions was already indicated to  .pgpass
>
> So I did a "sudo chmod 0700 main" at /var/lib/postgresql/9.5/ directory
> and I could connect postgres again!
>
> A cannot understand what happened. How an upgrade changes the
> permissions of files an folders? I work with more two desktops with the
> same framework (I7, 8 GB, Ubuntu 16.04, PostgreSQL, ...) and it did not
> happen.

I would look in the the /var/log/apt/history.log.* files that cover 
Friday and see what upgraded. That may offer a clue.

>
> Well, but I have my database available now. Thanks.
>
> Best regards,
>
> Antônio Olinto
>
> 2016-10-15 14:28 GMT-03:00 Adrian Klaver <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>>:
>
>     On 10/15/2016 10:11 AM, Antonio Silva wrote:
>
>         Hello
>
>         I'm using postgres 9.5 on Ubuntu 16.04. I have worked with pg in my
>         notebook for almost a month but today postgres did not connected. I
>         tryed both PGAdmin and psql.
>
>
>     Did you do an apt-get upgrade in the interim?
>
>
>         I also tried to login using my own user and postgres but I
>         received the
>         messages:
>
>         Server doesn't listen
>         The server doesn't accept connections: the connection library
>         reports
>         could not connect to server: Conexão recusada (connection
>         refused) Is
>         the server running on host "127.0.0.1" and accepting TCP/IP
>         connections
>         on port 5432?
>
>



-- 
Adrian Klaver
adrian.klaver@aklaver.com


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* Re: could not connect to server
@ 2016-10-16 15:06  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Antonio Silva <aolinto.lst@gmail.com>
  2 siblings, 0 replies; 29+ messages in thread

From: Adrian Klaver @ 2016-10-16 15:06 UTC (permalink / raw)
  To: Antonio Silva <aolinto.lst@gmail.com>; +Cc: pgsql-general

On 10/15/2016 09:09 PM, Antonio Silva wrote:
> Dear Adrian and Tom, thanks for your attention.
>
> I did an upgrade on Friday. I use to do this every week.
>
> Log file informed:
>
> 2016-10-15 06:15:20 BRT [995-1] FATAL:  data directory
> "/var/lib/postgresql/9.5/main" has group or world access
> 2016-10-15 06:15:20 BRT [995-2] DETAIL:  Permissions should be u=rwx (0700).
>
> The problem with permissions was already indicated to  .pgpass
>
> So I did a "sudo chmod 0700 main" at /var/lib/postgresql/9.5/ directory
> and I could connect postgres again!
>
> A cannot understand what happened. How an upgrade changes the
> permissions of files an folders? I work with more two desktops with the
> same framework (I7, 8 GB, Ubuntu 16.04, PostgreSQL, ...) and it did not
> happen.

In my previous post I should have also mentioned checking syslog for the 
period in question.

>
> Well, but I have my database available now. Thanks.
>
> Best regards,
>
> Antônio Olinto


-- 
Adrian Klaver
adrian.klaver@aklaver.com


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* Re: could not connect to server
@ 2016-10-16 15:42  Christoph Berg <myon@debian.org>
  parent: Antonio Silva <aolinto.lst@gmail.com>
  2 siblings, 0 replies; 29+ messages in thread

From: Christoph Berg @ 2016-10-16 15:42 UTC (permalink / raw)
  To: Antonio Silva <aolinto.lst@gmail.com>; +Cc: pgsql-general

Re: Antonio Silva 2016-10-16 <CAE8g1gO_0Ym8Y0yEQ41Hi-T_GGUoEDNAFYF81SPgqrusODNFaQ@mail.gmail.com>
> 2016-10-15 06:15:20 BRT [995-1] FATAL:  data directory
> "/var/lib/postgresql/9.5/main" has group or world access
> 2016-10-15 06:15:20 BRT [995-2] DETAIL:  Permissions should be u=rwx (0700).
> 
> The problem with permissions was already indicated to  .pgpass

Hi,

upgrades do not modify data directory permissions. Something or
someone must have modified that manually. And given it also happened
to your home directory, that might have affected the whole system...

Christoph


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



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

* Could Not Connect To Server
@ 2020-04-23 18:18  Dummy Account <dummyaccount4u@mail.com>
  0 siblings, 1 reply; 29+ messages in thread

From: Dummy Account @ 2020-04-23 18:18 UTC (permalink / raw)
  To: pgsql-general

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hello,</div>

<div>&nbsp;</div>

<div>I am running the following:</div>

<div>MacOS High Sierra 10.13.6</div>

<div>PostgreSQL 12.2</div>

<div>pgAdmin 4</div>

<div>&nbsp;</div>

<div>To see my qustion on Stack Overflow with picture:</div>

<div><a href="https://deref-mail.com/mail/client/0tUk0YweAhY/dereferrer/?redirectUrl=https%3A%2F%2Fstackoverflow.c...; target="_blank">https://stackoverflow.com/questions/61353989/pgadmin-could-not-connect-to-server-connection-refused&...;

<div>&nbsp;</div>

<div>
<p>I am trying to view databases with pgAdmin. After starting pgAdmin and successfully entering my &quot;master password&quot;. I get the following error while trying to open up the only instance, in this case: &quot;PostgeSQL 12&quot;.</p>

<p>I am getting this pgAdmin error:</p>

<p>&quot;could not connect to server: Connection refused Is the server running on host &quot;localhost&quot; (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused Is the server running on host &quot;localhost&quot; (127.0.0.1) and accepting TCP/IP connections on port 5432?&quot;</p>

<p>&nbsp;</p>

<p>Trying to start the server, I navigate too: /Library/PostgreSQL/12/bin</p>

<p>from bin, I ran:&nbsp;sudo -u postgres ./pg_ctl start -D /Library/PostgreSQL/12/data</p>

<pre>pg_ctl: could not start server</pre>

<div>&nbsp;</div>

<div>When I ran the status command instead of start, it of course eluded to not running.</div>

<div>I mention all of this with the caveat that I did recently restore from a backup because I replaced my HDD with a SSD.</div>

<div>&nbsp;</div>

<div>Please advise,</div>

<div>&nbsp;</div>

<div>Thanks</div>
</div>
</div></div></body></html>





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

* Re: Could Not Connect To Server
@ 2020-04-23 18:26  David G. Johnston <david.g.johnston@gmail.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  0 siblings, 1 reply; 29+ messages in thread

From: David G. Johnston @ 2020-04-23 18:26 UTC (permalink / raw)
  To: Dummy Account <dummyaccount4u@mail.com>; +Cc: pgsql-general

On Thu, Apr 23, 2020 at 11:18 AM Dummy Account <dummyaccount4u@mail.com>
wrote:

>
> Trying to start the server, I navigate too: /Library/PostgreSQL/12/bin
>
> from bin, I ran: sudo -u postgres ./pg_ctl start -D
> /Library/PostgreSQL/12/data
>
> pg_ctl: could not start server
>
>
>

What do the logs say...


When I ran the status command instead of start, it of course eluded to not
> running.
> I mention all of this with the caveat that I did recently restore from a
> backup because I replaced my HDD with a SSD.
>
>
You should be very specific as to how you restored your database from
backup because there is a good chance this wasn't done properly and you
presently have a corrupted database on your hard drive.

David J.

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

* Re: Could Not Connect To Server
@ 2020-04-23 18:48  Dummy Account <dummyaccount4u@mail.com>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 29+ messages in thread

From: Dummy Account @ 2020-04-23 18:48 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-general

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>&nbsp;</div>

<div>
<div>The logs are listed on the stack overlow link.</div>

<div>But here they are:</div>

<div>&nbsp;</div>

<div>waiting for server to start....2020-04-22 15:57:51.766 CDT [5255] LOG: &nbsp;starting PostgreSQL 12.2 on x86_64-apple-darwin, compiled by Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), 64-bit<br/>
2020-04-22 15:57:51.766 CDT [5255] LOG: &nbsp;listening on IPv6 address &quot;::&quot;, port 5432<br/>
2020-04-22 15:57:51.766 CDT [5255] LOG: &nbsp;listening on IPv4 address &quot;0.0.0.0&quot;, port 5432<br/>
2020-04-22 15:57:51.768 CDT [5255] LOG: &nbsp;listening on Unix socket &quot;/tmp/.s.PGSQL.5432&quot;<br/>
2020-04-22 15:57:51.782 CDT [5255] LOG: &nbsp;redirecting log output to logging collector process<br/>
2020-04-22 15:57:51.782 CDT [5255] HINT: &nbsp;Future log output will appear in directory &quot;log&quot;.<br/>
&nbsp;stopped waiting<br/>
pg_ctl: could not start server</div>

<div>&nbsp;</div>

<div>You might be misunderstanding where I said restore, I did&nbsp;not backup the database, I restored an Operating System because I changed out my hard drive for a solid state drive; therefore, I had to restore my Operating System from Time Machine/(backup).</div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Thursday, April 23, 2020 at 1:26 PM<br/>
<b>From:</b>&nbsp;&quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
<b>To:</b>&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
<b>Cc:</b>&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;<br/>
<b>Subject:</b>&nbsp;Re: Could Not Connect To Server</div>

<div name="quoted-content">
<div>
<div>
<div class="gmail_default" style="font-family: arial , helvetica , sans-serif;"><span style="font-family: Arial , Helvetica , sans-serif;">On Thu, Apr 23, 2020 at 11:18 AM Dummy Account &lt;<a href="mailto:dummyaccount4u@mail.com" onclick="parent.window.location.href=&#39;mailto:dummyaccount4u@mail.com&#39;; return false;" target="_blank">dummyaccount4u@mail.com</a>&gt; wrote:</span></div>
</div>

<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>&nbsp;</div>

<div>
<p>Trying to start the server, I navigate too: /Library/PostgreSQL/12/bin</p>

<p>from bin, I ran:&nbsp;sudo -u postgres ./pg_ctl start -D /Library/PostgreSQL/12/data</p>

<pre>pg_ctl: could not start server</pre>

<div>&nbsp;</div>
</div>
</div>
</div>
</blockquote>

<div>&nbsp;</div>

<div>
<div class="gmail_default" style="font-family: arial , helvetica , sans-serif;">What do the logs say...</div>
</div>

<div>&nbsp;</div>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>
<div>When I ran the status command instead of start, it of course eluded to not running.</div>

<div>I mention all of this with the caveat that I did recently restore from a backup because I replaced my HDD with a SSD.</div>

<div>&nbsp;</div>
</div>
</div>
</div>
</blockquote>

<div>&nbsp;</div>

<div class="gmail_default" style="font-family: arial , helvetica , sans-serif;">You should be very specific as to how you restored your database from backup because there is a good chance&nbsp;this wasn&#39;t done properly and you presently have a corrupted database on your hard drive.</div>

<div class="gmail_default" style="font-family: arial , helvetica , sans-serif;">&nbsp;</div>

<div class="gmail_default" style="font-family: arial , helvetica , sans-serif;">David J.</div>

<div class="gmail_default" style="font-family: arial , helvetica , sans-serif;">&nbsp;</div>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>





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

* Re: Could Not Connect To Server
@ 2020-04-23 18:55  David G. Johnston <david.g.johnston@gmail.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  0 siblings, 1 reply; 29+ messages in thread

From: David G. Johnston @ 2020-04-23 18:55 UTC (permalink / raw)
  To: Dummy Account <dummyaccount4u@mail.com>; +Cc: pgsql-general

On Thu, Apr 23, 2020 at 11:48 AM Dummy Account <dummyaccount4u@mail.com>
wrote:

> But here they are:
>

> waiting for server to start....2020-04-22 15:57:51.766 CDT [5255] LOG:
>  starting PostgreSQL 12.2 on x86_64-apple-darwin, compiled by Apple LLVM
> version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), 64-bit
> 2020-04-22 15:57:51.766 CDT [5255] LOG:  listening on IPv6 address "::",
> port 5432
> 2020-04-22 15:57:51.766 CDT [5255] LOG:  listening on IPv4 address
> "0.0.0.0", port 5432
> 2020-04-22 15:57:51.768 CDT [5255] LOG:  listening on Unix socket
> "/tmp/.s.PGSQL.5432"
> 2020-04-22 15:57:51.782 CDT [5255] LOG:  redirecting log output to logging
> collector process
> 2020-04-22 15:57:51.782 CDT [5255] HINT:  Future log output will appear in
> directory "log".
>

And the relevant content from the log directory log file?

 stopped waiting
> pg_ctl: could not start server
>
> You might be misunderstanding where I said restore, I did not backup the
> database, I restored an Operating System because I changed out my hard
> drive for a solid state drive; therefore, I had to restore my Operating
> System from Time Machine/(backup).
>
>
And was that Time Machine backup made while the server was offline?  If
not, and you didn't take any explicit steps to backup and restore the
database itself, then your database may be corrupted and thus unable to
boot.  The log file should indicate whether that is the case.

David J.

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

* Re: Could Not Connect To Server
@ 2020-04-23 19:12  Dummy Account <dummyaccount4u@mail.com>
  parent: David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 2 replies; 29+ messages in thread

From: Dummy Account @ 2020-04-23 19:12 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-general

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>&nbsp;</div>

<div>
<div>Hi David,</div>

<div>&nbsp;</div>

<div>When I backed-up, I don&#39;t know if the server was offline? &nbsp;I can say that I was not&nbsp;running pgAdmin. &nbsp;For instance, I backed up the Operating System and all of its applications. &nbsp;If I go run other application, including other servers, they work. &nbsp;As a matter of fact, if I boot into the old hard drive while&nbsp;it is outside of the laptop, it still works just as it did before I took it out of the laptop.</div>

<div>&nbsp;</div>

<div>As far as your question of &quot;And the relevant content from the log directory log file?&quot;: what are you asking for?&nbsp; That <strong>is</strong> the entire and complete log after that command.</div>

<div>&nbsp;</div>

<div>Thanks, I appreciate the help.</div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Thursday, April 23, 2020 at 1:55 PM<br/>
<b>From:</b>&nbsp;&quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
<b>To:</b>&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
<b>Cc:</b>&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;<br/>
<b>Subject:</b>&nbsp;Re: Could Not Connect To Server</div>

<div name="quoted-content">
<div>
<div>
<div class="gmail_default" style="font-family: arial , helvetica , sans-serif;"><span style="font-family: Arial , Helvetica , sans-serif;">On Thu, Apr 23, 2020 at 11:48 AM Dummy Account &lt;<a href="mailto:dummyaccount4u@mail.com" onclick="parent.window.location.href=&#39;mailto:dummyaccount4u@mail.com&#39;; return false;" target="_blank">dummyaccount4u@mail.com</a>&gt; wrote:</span></div>
</div>

<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>But here they are:</div>
</div>
</div>
</blockquote>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>&nbsp;</div>

<div>waiting for server to start....2020-04-22 15:57:51.766 CDT [5255] LOG: &nbsp;starting PostgreSQL 12.2 on x86_64-apple-darwin, compiled by Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), 64-bit<br/>
2020-04-22 15:57:51.766 CDT [5255] LOG: &nbsp;listening on IPv6 address &quot;::&quot;, port 5432<br/>
2020-04-22 15:57:51.766 CDT [5255] LOG: &nbsp;listening on IPv4 address &quot;0.0.0.0&quot;, port 5432<br/>
2020-04-22 15:57:51.768 CDT [5255] LOG: &nbsp;listening on Unix socket &quot;/tmp/.s.PGSQL.5432&quot;<br/>
2020-04-22 15:57:51.782 CDT [5255] LOG: &nbsp;redirecting log output to logging collector process<br/>
2020-04-22 15:57:51.782 CDT [5255] HINT: &nbsp;Future log output will appear in directory &quot;log&quot;.</div>
</div>
</div>
</blockquote>

<div>&nbsp;</div>

<div>
<div class="gmail_default" style="font-family: arial , helvetica , sans-serif;">And the relevant content from the log directory log file?</div>
</div>

<div>&nbsp;</div>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>&nbsp;stopped waiting<br/>
pg_ctl: could not start server</div>

<div>&nbsp;</div>

<div>You might be misunderstanding where I said restore, I did&nbsp;not backup the database, I restored an Operating System because I changed out my hard drive for a solid state drive; therefore, I had to restore my Operating System from Time Machine/(backup).</div>

<div>&nbsp;</div>
</div>
</div>
</blockquote>

<div>&nbsp;</div>

<div class="gmail_default" style="font-family: arial , helvetica , sans-serif;">And was that Time Machine backup made while the server was offline?&nbsp; If not, and you didn&#39;t take any explicit steps to backup and restore the database itself, then your database may be corrupted and thus unable to boot.&nbsp; The log file should indicate whether that is the case.</div>

<div class="gmail_default" style="font-family: arial , helvetica , sans-serif;">&nbsp;</div>

<div class="gmail_default" style="font-family: arial , helvetica , sans-serif;">David J.</div>

<div class="gmail_default" style="font-family: arial , helvetica , sans-serif;">&nbsp;</div>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>





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

* Re: Could Not Connect To Server
@ 2020-04-23 19:23  Rob Sargent <robjsargent@gmail.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  1 sibling, 0 replies; 29+ messages in thread

From: Rob Sargent @ 2020-04-23 19:23 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org



On 4/23/20 1:12 PM, Dummy Account wrote:
> Hi David,
> When I backed-up, I don't know if the server was offline?  I can say 
> that I was not running pgAdmin.  For instance, I backed up the 
> Operating System and all of its applications.  If I go run other 
> application, including other servers, they work.  As a matter of fact, 
> if I boot into the old hard drive while it is outside of the laptop, 
> it still works just as it did before I took it out of the laptop.
> As far as your question of "And the relevant content from the log 
> directory log file?": what are you asking for?  That *is* the entire 
> and complete log after that command.
> Thanks, I appreciate the help.
> *Sent:* Thursday, April 23, 2020 at 1:55 PM
> *From:* "David G. Johnston" <david.g.johnston@gmail.com>
> *To:* "Dummy Account" <dummyaccount4u@mail.com>
> *Cc:* "pgsql-general" <pgsql-general@postgresql.org>
> *Subject:* Re: Could Not Connect To Server
> On Thu, Apr 23, 2020 at 11:48 AM Dummy Account 
> <dummyaccount4u@mail.com <mailto:dummyaccount4u@mail.com>> wrote:
>
>     But here they are:
>
>     waiting for server to start....2020-04-22 15:57:51.766 CDT [5255]
>     LOG:  starting PostgreSQL 12.2 on x86_64-apple-darwin, compiled by
>     Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), 64-bit
>     2020-04-22 15:57:51.766 CDT [5255] LOG:  listening on IPv6 address
>     "::", port 5432
>     2020-04-22 15:57:51.766 CDT [5255] LOG:  listening on IPv4 address
>     "0.0.0.0", port 5432
>     2020-04-22 15:57:51.768 CDT [5255] LOG:  listening on Unix socket
>     "/tmp/.s.PGSQL.5432"
>     2020-04-22 15:57:51.782 CDT [5255] LOG:  redirecting log output to
>     logging collector process
>     2020-04-22 15:57:51.782 CDT [5255] HINT:  Future log output will
>     appear in directory "log".
>
> And the relevant content from the log directory log file?
>
>      stopped waiting
>     pg_ctl: could not start server
>     You might be misunderstanding where I said restore, I did not
>     backup the database, I restored an Operating System because I
>     changed out my hard drive for a solid state drive; therefore, I
>     had to restore my Operating System from Time Machine/(backup).
>
> And was that Time Machine backup made while the server was offline? If 
> not, and you didn't take any explicit steps to backup and restore the 
> database itself, then your database may be corrupted and thus unable 
> to boot.  The log file should indicate whether that is the case.
> David J.
I take it you're seeing that output in the Terminal shell window. What 
value does -D get when you try to start postgres?  Can we see the entire 
command? The "log" directory will be within the value of -D I believe.

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

* Re: Could Not Connect To Server
@ 2020-04-23 19:25  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  1 sibling, 1 reply; 29+ messages in thread

From: Adrian Klaver @ 2020-04-23 19:25 UTC (permalink / raw)
  To: Dummy Account <dummyaccount4u@mail.com>; David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-general

On 4/23/20 12:12 PM, Dummy Account wrote:
> Hi David,
> When I backed-up, I don't know if the server was offline?  I can say 
> that I was not running pgAdmin.  For instance, I backed up the Operating 
> System and all of its applications.  If I go run other application, 
> including other servers, they work.  As a matter of fact, if I boot into 
> the old hard drive while it is outside of the laptop, it still works 
> just as it did before I took it out of the laptop.
> As far as your question of "And the relevant content from the log 
> directory log file?": what are you asking for?  That *is* the entire and 
> complete log after that command.

Those are the messages sent to the screen. There are also messages sent 
to the Postgres server log. Not sure where the OS X install puts that, 
but I would start under /Library/PostgreSQL/12/data.

> Thanks, I appreciate the help.
> *Sent:* Thursday, April 23, 2020 at 1:55 PM
> *From:* "David G. Johnston" <david.g.johnston@gmail.com>
> *To:* "Dummy Account" <dummyaccount4u@mail.com>
> *Cc:* "pgsql-general" <pgsql-general@postgresql.org>
> *Subject:* Re: Could Not Connect To Server
> On Thu, Apr 23, 2020 at 11:48 AM Dummy Account <dummyaccount4u@mail.com 
> <mailto:dummyaccount4u@mail.com>> wrote:
> 
>     But here they are:
> 
>     waiting for server to start....2020-04-22 15:57:51.766 CDT [5255]
>     LOG:  starting PostgreSQL 12.2 on x86_64-apple-darwin, compiled by
>     Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), 64-bit
>     2020-04-22 15:57:51.766 CDT [5255] LOG:  listening on IPv6 address
>     "::", port 5432
>     2020-04-22 15:57:51.766 CDT [5255] LOG:  listening on IPv4 address
>     "0.0.0.0", port 5432
>     2020-04-22 15:57:51.768 CDT [5255] LOG:  listening on Unix socket
>     "/tmp/.s.PGSQL.5432"
>     2020-04-22 15:57:51.782 CDT [5255] LOG:  redirecting log output to
>     logging collector process
>     2020-04-22 15:57:51.782 CDT [5255] HINT:  Future log output will
>     appear in directory "log".
> 
> And the relevant content from the log directory log file?
> 
>       stopped waiting
>     pg_ctl: could not start server
>     You might be misunderstanding where I said restore, I did not backup
>     the database, I restored an Operating System because I changed out
>     my hard drive for a solid state drive; therefore, I had to restore
>     my Operating System from Time Machine/(backup).
> 
> And was that Time Machine backup made while the server was offline?  If 
> not, and you didn't take any explicit steps to backup and restore the 
> database itself, then your database may be corrupted and thus unable to 
> boot.  The log file should indicate whether that is the case.
> David J.


-- 
Adrian Klaver
adrian.klaver@aklaver.com





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

* Re: Could Not Connect To Server
@ 2020-04-23 19:32  Dummy Account <dummyaccount4u@mail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 2 replies; 29+ messages in thread

From: Dummy Account @ 2020-04-23 19:32 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-general

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>&nbsp;</div>

<div>
<div>Hey David,</div>

<div>&nbsp;</div>

<div>Can you tell me the exact name of the log file? &nbsp;Then I can search for it.</div>

<div>&nbsp;</div>

<div>Thanks</div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Thursday, April 23, 2020 at 2:25 PM<br/>
<b>From:</b>&nbsp;&quot;Adrian Klaver&quot; &lt;adrian.klaver@aklaver.com&gt;<br/>
<b>To:</b>&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;, &quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
<b>Cc:</b>&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;<br/>
<b>Subject:</b>&nbsp;Re: Could Not Connect To Server</div>

<div name="quoted-content">On 4/23/20 12:12 PM, Dummy Account wrote:<br/>
&gt; Hi David,<br/>
&gt; When I backed-up, I don&#39;t know if the server was offline? &nbsp;I can say<br/>
&gt; that I was not&nbsp;running pgAdmin. &nbsp;For instance, I backed up the Operating<br/>
&gt; System and all of its applications. &nbsp;If I go run other application,<br/>
&gt; including other servers, they work. &nbsp;As a matter of fact, if I boot into<br/>
&gt; the old hard drive while&nbsp;it is outside of the laptop, it still works<br/>
&gt; just as it did before I took it out of the laptop.<br/>
&gt; As far as your question of &quot;And the relevant content from the log<br/>
&gt; directory log file?&quot;: what are you asking for?&nbsp; That *is* the entire and<br/>
&gt; complete log after that command.<br/>
<br/>
Those are the messages sent to the screen. There are also messages sent<br/>
to the Postgres server log. Not sure where the OS X install puts that,<br/>
but I would start under /Library/PostgreSQL/12/data.<br/>
<br/>
&gt; Thanks, I appreciate the help.<br/>
&gt; *Sent:*&nbsp;Thursday, April 23, 2020 at 1:55 PM<br/>
&gt; *From:*&nbsp;&quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
&gt; *To:*&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
&gt; *Cc:*&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;<br/>
&gt; *Subject:*&nbsp;Re: Could Not Connect To Server<br/>
&gt; On Thu, Apr 23, 2020 at 11:48 AM Dummy Account &lt;dummyaccount4u@mail.com<br/>
&gt; &lt;mailto:dummyaccount4u@mail.com&gt;&gt; wrote:<br/>
&gt;<br/>
&gt; But here they are:<br/>
&gt;<br/>
&gt; waiting for server to start....2020-04-22 15:57:51.766 CDT [5255]<br/>
&gt; LOG: &nbsp;starting PostgreSQL 12.2 on x86_64-apple-darwin, compiled by<br/>
&gt; Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), 64-bit<br/>
&gt; 2020-04-22 15:57:51.766 CDT [5255] LOG: &nbsp;listening on IPv6 address<br/>
&gt; &quot;::&quot;, port 5432<br/>
&gt; 2020-04-22 15:57:51.766 CDT [5255] LOG: &nbsp;listening on IPv4 address<br/>
&gt; &quot;0.0.0.0&quot;, port 5432<br/>
&gt; 2020-04-22 15:57:51.768 CDT [5255] LOG: &nbsp;listening on Unix socket<br/>
&gt; &quot;/tmp/.s.PGSQL.5432&quot;<br/>
&gt; 2020-04-22 15:57:51.782 CDT [5255] LOG: &nbsp;redirecting log output to<br/>
&gt; logging collector process<br/>
&gt; 2020-04-22 15:57:51.782 CDT [5255] HINT: &nbsp;Future log output will<br/>
&gt; appear in directory &quot;log&quot;.<br/>
&gt;<br/>
&gt; And the relevant content from the log directory log file?<br/>
&gt;<br/>
&gt; &nbsp;stopped waiting<br/>
&gt; pg_ctl: could not start server<br/>
&gt; You might be misunderstanding where I said restore, I did&nbsp;not backup<br/>
&gt; the database, I restored an Operating System because I changed out<br/>
&gt; my hard drive for a solid state drive; therefore, I had to restore<br/>
&gt; my Operating System from Time Machine/(backup).<br/>
&gt;<br/>
&gt; And was that Time Machine backup made while the server was offline?&nbsp; If<br/>
&gt; not, and you didn&#39;t take any explicit steps to backup and restore the<br/>
&gt; database itself, then your database may be corrupted and thus unable to<br/>
&gt; boot.&nbsp; The log file should indicate whether that is the case.<br/>
&gt; David J.<br/>
<br/>
<br/>
--<br/>
Adrian Klaver<br/>
adrian.klaver@aklaver.com</div>
</div>
</div>
</div></div></body></html>





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

* Re: Could Not Connect To Server
@ 2020-04-23 19:36  Rob Sargent <robjsargent@gmail.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  1 sibling, 1 reply; 29+ messages in thread

From: Rob Sargent @ 2020-04-23 19:36 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org



On 4/23/20 1:32 PM, Dummy Account wrote:
> Hey David,
> Can you tell me the exact name of the log file?  Then I can search for it.
> Thanks
>
Apparently in your case it is called "log".  I don't have version 12, 
but  version 9's start up name "pg_log" and that is the name of the file 
in the data directory.  Starting at /Library/PostgreSQL/12 as suggested 
is a good bet

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

* Re: Could Not Connect To Server
@ 2020-04-23 19:40  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Rob Sargent <robjsargent@gmail.com>
  0 siblings, 0 replies; 29+ messages in thread

From: Adrian Klaver @ 2020-04-23 19:40 UTC (permalink / raw)
  To: Rob Sargent <robjsargent@gmail.com>; pgsql-general@lists.postgresql.org

On 4/23/20 12:36 PM, Rob Sargent wrote:
> 
> 
> On 4/23/20 1:32 PM, Dummy Account wrote:
>> Hey David,
>> Can you tell me the exact name of the log file?  Then I can search for it.
>> Thanks
>>
> Apparently in your case it is called "log".  I don't have version 12, 

To be clear 'log' is the name of the directory that holds the logs. The 
log files themselves are named according to some pattern generally. The 
default is:

https://www.postgresql.org/docs/12/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHERE

log_filename
The default is postgresql-%Y-%m-%d_%H%M%S.log

> but  version 9's start up name "pg_log" and that is the name of the file 
> in the data directory.  Starting at /Library/PostgreSQL/12 as suggested 
> is a good bet
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





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

* Fw: Re: Could Not Connect To Server
@ 2020-04-23 20:24  Dummy Account <dummyaccount4u@mail.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  1 sibling, 1 reply; 29+ messages in thread

From: Dummy Account @ 2020-04-23 20:24 UTC (permalink / raw)
  To: pgsql-general; David G. Johnston <david.g.johnston@gmail.com>; adrian.klaver@aklaver.com

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>&nbsp;</div>

<div>
<div>Hey Everyone,</div>

<div>&nbsp;</div>

<div>I did find loggin.h and insallation_summary.log. &nbsp;Neither of which look to include the info you may want.</div>

<div>&nbsp;</div>

<div>Please advise as to what log file you want to see.</div>

<div>&nbsp;</div>

<div>Thanks</div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Thursday, April 23, 2020 at 2:32 PM<br/>
<b>From:</b>&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
<b>To:</b>&nbsp;&quot;Adrian Klaver&quot; &lt;adrian.klaver@aklaver.com&gt;<br/>
<b>Cc:</b>&nbsp;&quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;, &quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;<br/>
<b>Subject:</b>&nbsp;Re: Could Not Connect To Server</div>

<div name="quoted-content">
<div style="font-family: Verdana;font-size: 12.0px;">
<div>&nbsp;</div>

<div>
<div>Hey David,</div>

<div>&nbsp;</div>

<div>Can you tell me the exact name of the log file? &nbsp;Then I can search for it.</div>

<div>&nbsp;</div>

<div>Thanks</div>

<div>&nbsp;
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Sent:</b>&nbsp;Thursday, April 23, 2020 at 2:25 PM<br/>
<b>From:</b>&nbsp;&quot;Adrian Klaver&quot; &lt;adrian.klaver@aklaver.com&gt;<br/>
<b>To:</b>&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;, &quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
<b>Cc:</b>&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;<br/>
<b>Subject:</b>&nbsp;Re: Could Not Connect To Server</div>

<div>On 4/23/20 12:12 PM, Dummy Account wrote:<br/>
&gt; Hi David,<br/>
&gt; When I backed-up, I don&#39;t know if the server was offline? &nbsp;I can say<br/>
&gt; that I was not&nbsp;running pgAdmin. &nbsp;For instance, I backed up the Operating<br/>
&gt; System and all of its applications. &nbsp;If I go run other application,<br/>
&gt; including other servers, they work. &nbsp;As a matter of fact, if I boot into<br/>
&gt; the old hard drive while&nbsp;it is outside of the laptop, it still works<br/>
&gt; just as it did before I took it out of the laptop.<br/>
&gt; As far as your question of &quot;And the relevant content from the log<br/>
&gt; directory log file?&quot;: what are you asking for?&nbsp; That *is* the entire and<br/>
&gt; complete log after that command.<br/>
<br/>
Those are the messages sent to the screen. There are also messages sent<br/>
to the Postgres server log. Not sure where the OS X install puts that,<br/>
but I would start under /Library/PostgreSQL/12/data.<br/>
<br/>
&gt; Thanks, I appreciate the help.<br/>
&gt; *Sent:*&nbsp;Thursday, April 23, 2020 at 1:55 PM<br/>
&gt; *From:*&nbsp;&quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
&gt; *To:*&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
&gt; *Cc:*&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;<br/>
&gt; *Subject:*&nbsp;Re: Could Not Connect To Server<br/>
&gt; On Thu, Apr 23, 2020 at 11:48 AM Dummy Account &lt;dummyaccount4u@mail.com<br/>
&gt; &lt;mailto:dummyaccount4u@mail.com&gt;&gt; wrote:<br/>
&gt;<br/>
&gt; But here they are:<br/>
&gt;<br/>
&gt; waiting for server to start....2020-04-22 15:57:51.766 CDT [5255]<br/>
&gt; LOG: &nbsp;starting PostgreSQL 12.2 on x86_64-apple-darwin, compiled by<br/>
&gt; Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), 64-bit<br/>
&gt; 2020-04-22 15:57:51.766 CDT [5255] LOG: &nbsp;listening on IPv6 address<br/>
&gt; &quot;::&quot;, port 5432<br/>
&gt; 2020-04-22 15:57:51.766 CDT [5255] LOG: &nbsp;listening on IPv4 address<br/>
&gt; &quot;0.0.0.0&quot;, port 5432<br/>
&gt; 2020-04-22 15:57:51.768 CDT [5255] LOG: &nbsp;listening on Unix socket<br/>
&gt; &quot;/tmp/.s.PGSQL.5432&quot;<br/>
&gt; 2020-04-22 15:57:51.782 CDT [5255] LOG: &nbsp;redirecting log output to<br/>
&gt; logging collector process<br/>
&gt; 2020-04-22 15:57:51.782 CDT [5255] HINT: &nbsp;Future log output will<br/>
&gt; appear in directory &quot;log&quot;.<br/>
&gt;<br/>
&gt; And the relevant content from the log directory log file?<br/>
&gt;<br/>
&gt; &nbsp;stopped waiting<br/>
&gt; pg_ctl: could not start server<br/>
&gt; You might be misunderstanding where I said restore, I did&nbsp;not backup<br/>
&gt; the database, I restored an Operating System because I changed out<br/>
&gt; my hard drive for a solid state drive; therefore, I had to restore<br/>
&gt; my Operating System from Time Machine/(backup).<br/>
&gt;<br/>
&gt; And was that Time Machine backup made while the server was offline?&nbsp; If<br/>
&gt; not, and you didn&#39;t take any explicit steps to backup and restore the<br/>
&gt; database itself, then your database may be corrupted and thus unable to<br/>
&gt; boot.&nbsp; The log file should indicate whether that is the case.<br/>
&gt; David J.<br/>
<br/>
<br/>
--<br/>
Adrian Klaver<br/>
adrian.klaver@aklaver.com</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>





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

* Re: Fw: Re: Could Not Connect To Server
@ 2020-04-23 20:27  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  0 siblings, 1 reply; 29+ messages in thread

From: Adrian Klaver @ 2020-04-23 20:27 UTC (permalink / raw)
  To: Dummy Account <dummyaccount4u@mail.com>; pgsql-general; David G. Johnston <david.g.johnston@gmail.com>

On 4/23/20 1:24 PM, Dummy Account wrote:
> Hey Everyone,
> I did find loggin.h and insallation_summary.log.  Neither of which look 
> to include the info you may want.
> Please advise as to what log file you want to see.

Did you look under:

/Library/PostgreSQL/12/data

directory for sub-directory?:

log/

And under it for log files?

> Thanks
> *Sent:* Thursday, April 23, 2020 at 2:32 PM
> *From:* "Dummy Account" <dummyaccount4u@mail.com>
> *To:* "Adrian Klaver" <adrian.klaver@aklaver.com>
> *Cc:* "David G. Johnston" <david.g.johnston@gmail.com>, "pgsql-general" 
> <pgsql-general@postgresql.org>
> *Subject:* Re: Could Not Connect To Server
> Hey David,
> Can you tell me the exact name of the log file?  Then I can search for it.
> Thanks
> *Sent:* Thursday, April 23, 2020 at 2:25 PM
> *From:* "Adrian Klaver" <adrian.klaver@aklaver.com>
> *To:* "Dummy Account" <dummyaccount4u@mail.com>, "David G. Johnston" 
> <david.g.johnston@gmail.com>
> *Cc:* "pgsql-general" <pgsql-general@postgresql.org>
> *Subject:* Re: Could Not Connect To Server
> On 4/23/20 12:12 PM, Dummy Account wrote:
>  > Hi David,
>  > When I backed-up, I don't know if the server was offline?  I can say
>  > that I was not running pgAdmin.  For instance, I backed up the Operating
>  > System and all of its applications.  If I go run other application,
>  > including other servers, they work.  As a matter of fact, if I boot into
>  > the old hard drive while it is outside of the laptop, it still works
>  > just as it did before I took it out of the laptop.
>  > As far as your question of "And the relevant content from the log
>  > directory log file?": what are you asking for?  That *is* the entire and
>  > complete log after that command.
> 
> Those are the messages sent to the screen. There are also messages sent
> to the Postgres server log. Not sure where the OS X install puts that,
> but I would start under /Library/PostgreSQL/12/data.
> 
>  > Thanks, I appreciate the help.
>  > *Sent:* Thursday, April 23, 2020 at 1:55 PM
>  > *From:* "David G. Johnston" <david.g.johnston@gmail.com>
>  > *To:* "Dummy Account" <dummyaccount4u@mail.com>
>  > *Cc:* "pgsql-general" <pgsql-general@postgresql.org>
>  > *Subject:* Re: Could Not Connect To Server
>  > On Thu, Apr 23, 2020 at 11:48 AM Dummy Account <dummyaccount4u@mail.com
>  > <mailto:dummyaccount4u@mail.com>> wrote:
>  >
>  > But here they are:
>  >
>  > waiting for server to start....2020-04-22 15:57:51.766 CDT [5255]
>  > LOG:  starting PostgreSQL 12.2 on x86_64-apple-darwin, compiled by
>  > Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), 64-bit
>  > 2020-04-22 15:57:51.766 CDT [5255] LOG:  listening on IPv6 address
>  > "::", port 5432
>  > 2020-04-22 15:57:51.766 CDT [5255] LOG:  listening on IPv4 address
>  > "0.0.0.0", port 5432
>  > 2020-04-22 15:57:51.768 CDT [5255] LOG:  listening on Unix socket
>  > "/tmp/.s.PGSQL.5432"
>  > 2020-04-22 15:57:51.782 CDT [5255] LOG:  redirecting log output to
>  > logging collector process
>  > 2020-04-22 15:57:51.782 CDT [5255] HINT:  Future log output will
>  > appear in directory "log".
>  >
>  > And the relevant content from the log directory log file?
>  >
>  >  stopped waiting
>  > pg_ctl: could not start server
>  > You might be misunderstanding where I said restore, I did not backup
>  > the database, I restored an Operating System because I changed out
>  > my hard drive for a solid state drive; therefore, I had to restore
>  > my Operating System from Time Machine/(backup).
>  >
>  > And was that Time Machine backup made while the server was offline?  If
>  > not, and you didn't take any explicit steps to backup and restore the
>  > database itself, then your database may be corrupted and thus unable to
>  > boot.  The log file should indicate whether that is the case.
>  > David J.
> 
> 
> --
> Adrian Klaver
> adrian.klaver@aklaver.com


-- 
Adrian Klaver
adrian.klaver@aklaver.com





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

* Re: Fw: Re: Could Not Connect To Server
@ 2020-04-23 20:37  Dummy Account <dummyaccount4u@mail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 29+ messages in thread

From: Dummy Account @ 2020-04-23 20:37 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general; David G. Johnston <david.g.johnston@gmail.com>

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>&nbsp;</div>

<div>
<div>From the Finder, I think that is the same a File Explorer on Widows. &nbsp;From Finder, it&#39;s locked; I cannot access it. &nbsp;Could I use the command line and change ownership or access privledges? &nbsp;And then get access?</div>

<div>&nbsp;</div>

<div>Thanks</div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Thursday, April 23, 2020 at 3:27 PM<br/>
<b>From:</b>&nbsp;&quot;Adrian Klaver&quot; &lt;adrian.klaver@aklaver.com&gt;<br/>
<b>To:</b>&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;, &quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;, &quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
<b>Subject:</b>&nbsp;Re: Fw: Re: Could Not Connect To Server</div>

<div name="quoted-content">On 4/23/20 1:24 PM, Dummy Account wrote:<br/>
&gt; Hey Everyone,<br/>
&gt; I did find loggin.h and insallation_summary.log. &nbsp;Neither of which look<br/>
&gt; to include the info you may want.<br/>
&gt; Please advise as to what log file you want to see.<br/>
<br/>
Did you look under:<br/>
<br/>
/Library/PostgreSQL/12/data<br/>
<br/>
directory for sub-directory?:<br/>
<br/>
log/<br/>
<br/>
And under it for log files?<br/>
<br/>
&gt; Thanks<br/>
&gt; *Sent:*&nbsp;Thursday, April 23, 2020 at 2:32 PM<br/>
&gt; *From:*&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
&gt; *To:*&nbsp;&quot;Adrian Klaver&quot; &lt;adrian.klaver@aklaver.com&gt;<br/>
&gt; *Cc:*&nbsp;&quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;, &quot;pgsql-general&quot;<br/>
&gt; &lt;pgsql-general@postgresql.org&gt;<br/>
&gt; *Subject:*&nbsp;Re: Could Not Connect To Server<br/>
&gt; Hey David,<br/>
&gt; Can you tell me the exact name of the log file? &nbsp;Then I can search for it.<br/>
&gt; Thanks<br/>
&gt; *Sent:*&nbsp;Thursday, April 23, 2020 at 2:25 PM<br/>
&gt; *From:*&nbsp;&quot;Adrian Klaver&quot; &lt;adrian.klaver@aklaver.com&gt;<br/>
&gt; *To:*&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;, &quot;David G. Johnston&quot;<br/>
&gt; &lt;david.g.johnston@gmail.com&gt;<br/>
&gt; *Cc:*&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;<br/>
&gt; *Subject:*&nbsp;Re: Could Not Connect To Server<br/>
&gt; On 4/23/20 12:12 PM, Dummy Account wrote:<br/>
&gt; &gt; Hi David,<br/>
&gt; &gt; When I backed-up, I don&#39;t know if the server was offline? &nbsp;I can say<br/>
&gt; &gt; that I was not&nbsp;running pgAdmin. &nbsp;For instance, I backed up the Operating<br/>
&gt; &gt; System and all of its applications. &nbsp;If I go run other application,<br/>
&gt; &gt; including other servers, they work. &nbsp;As a matter of fact, if I boot into<br/>
&gt; &gt; the old hard drive while&nbsp;it is outside of the laptop, it still works<br/>
&gt; &gt; just as it did before I took it out of the laptop.<br/>
&gt; &gt; As far as your question of &quot;And the relevant content from the log<br/>
&gt; &gt; directory log file?&quot;: what are you asking for?&nbsp; That *is* the entire and<br/>
&gt; &gt; complete log after that command.<br/>
&gt;<br/>
&gt; Those are the messages sent to the screen. There are also messages sent<br/>
&gt; to the Postgres server log. Not sure where the OS X install puts that,<br/>
&gt; but I would start under /Library/PostgreSQL/12/data.<br/>
&gt;<br/>
&gt; &gt; Thanks, I appreciate the help.<br/>
&gt; &gt; *Sent:*&nbsp;Thursday, April 23, 2020 at 1:55 PM<br/>
&gt; &gt; *From:*&nbsp;&quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
&gt; &gt; *To:*&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
&gt; &gt; *Cc:*&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;<br/>
&gt; &gt; *Subject:*&nbsp;Re: Could Not Connect To Server<br/>
&gt; &gt; On Thu, Apr 23, 2020 at 11:48 AM Dummy Account &lt;dummyaccount4u@mail.com<br/>
&gt; &gt; &lt;mailto:dummyaccount4u@mail.com&gt;&gt; wrote:<br/>
&gt; &gt;<br/>
&gt; &gt; But here they are:<br/>
&gt; &gt;<br/>
&gt; &gt; waiting for server to start....2020-04-22 15:57:51.766 CDT [5255]<br/>
&gt; &gt; LOG: &nbsp;starting PostgreSQL 12.2 on x86_64-apple-darwin, compiled by<br/>
&gt; &gt; Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), 64-bit<br/>
&gt; &gt; 2020-04-22 15:57:51.766 CDT [5255] LOG: &nbsp;listening on IPv6 address<br/>
&gt; &gt; &quot;::&quot;, port 5432<br/>
&gt; &gt; 2020-04-22 15:57:51.766 CDT [5255] LOG: &nbsp;listening on IPv4 address<br/>
&gt; &gt; &quot;0.0.0.0&quot;, port 5432<br/>
&gt; &gt; 2020-04-22 15:57:51.768 CDT [5255] LOG: &nbsp;listening on Unix socket<br/>
&gt; &gt; &quot;/tmp/.s.PGSQL.5432&quot;<br/>
&gt; &gt; 2020-04-22 15:57:51.782 CDT [5255] LOG: &nbsp;redirecting log output to<br/>
&gt; &gt; logging collector process<br/>
&gt; &gt; 2020-04-22 15:57:51.782 CDT [5255] HINT: &nbsp;Future log output will<br/>
&gt; &gt; appear in directory &quot;log&quot;.<br/>
&gt; &gt;<br/>
&gt; &gt; And the relevant content from the log directory log file?<br/>
&gt; &gt;<br/>
&gt; &gt; &nbsp;stopped waiting<br/>
&gt; &gt; pg_ctl: could not start server<br/>
&gt; &gt; You might be misunderstanding where I said restore, I did&nbsp;not backup<br/>
&gt; &gt; the database, I restored an Operating System because I changed out<br/>
&gt; &gt; my hard drive for a solid state drive; therefore, I had to restore<br/>
&gt; &gt; my Operating System from Time Machine/(backup).<br/>
&gt; &gt;<br/>
&gt; &gt; And was that Time Machine backup made while the server was offline?&nbsp; If<br/>
&gt; &gt; not, and you didn&#39;t take any explicit steps to backup and restore the<br/>
&gt; &gt; database itself, then your database may be corrupted and thus unable to<br/>
&gt; &gt; boot.&nbsp; The log file should indicate whether that is the case.<br/>
&gt; &gt; David J.<br/>
&gt;<br/>
&gt;<br/>
&gt; --<br/>
&gt; Adrian Klaver<br/>
&gt; adrian.klaver@aklaver.com<br/>
<br/>
<br/>
--<br/>
Adrian Klaver<br/>
adrian.klaver@aklaver.com</div>
</div>
</div>
</div></div></body></html>





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

* Re: Fw: Re: Could Not Connect To Server
@ 2020-04-23 21:26  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  0 siblings, 2 replies; 29+ messages in thread

From: Adrian Klaver @ 2020-04-23 21:26 UTC (permalink / raw)
  To: Dummy Account <dummyaccount4u@mail.com>; +Cc: pgsql-general; David G. Johnston <david.g.johnston@gmail.com>

On 4/23/20 1:37 PM, Dummy Account wrote:
>  From the Finder, I think that is the same a File Explorer on Widows. 
>   From Finder, it's locked; I cannot access it.  Could I use the command 
> line and change ownership or access privledges?  And then get access?

Why not from the command line use a text editor to view the file(s)?

> Thanks



-- 
Adrian Klaver
adrian.klaver@aklaver.com





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

* Re: Fw: Re: Could Not Connect To Server
@ 2020-04-23 21:36  Rob Sargent <robjsargent@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 29+ messages in thread

From: Rob Sargent @ 2020-04-23 21:36 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org



On 4/23/20 3:26 PM, Adrian Klaver wrote:
> On 4/23/20 1:37 PM, Dummy Account wrote:
>>  From the Finder, I think that is the same a File Explorer on Widows. 
>>   From Finder, it's locked; I cannot access it.  Could I use the 
>> command line and change ownership or access privledges?  And then get 
>> access?
>
> Why not from the command line use a text editor to view the file(s)?
>
>> Thanks
>
Does this work for you in a terminal?

    sudo su - postgres
    <your login password>
    cd /Library/PostgreSQL
    find . -name log

 From your first post, that ought to find the "log" mentioned in the 
output (and possible more than one if you have multiple installations).  
As Peter pointed out that's a directory.  The logs will be in there.

    cd <dir found from find command>
    ls -ltr

Should show the most recent file last.  That's likely the file of interest.


>
>

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

* Re: Fw: Re: Could Not Connect To Server
@ 2020-04-23 22:03  Dummy Account <dummyaccount4u@mail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 2 replies; 29+ messages in thread

From: Dummy Account @ 2020-04-23 22:03 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general; David G. Johnston <david.g.johnston@gmail.com>

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>&nbsp;</div>

<div>
<div>I cannot login into a postgres role via command line. &nbsp;</div>

<div>&nbsp;</div>

<div>Issue #1.</div>

<div>I have never done it before via command line, so maybe I am doing it incorrectly.</div>

<div>I have been attempting to go:&nbsp;</div>

<div>&nbsp;</div>

<div>su - postgres</div>

<div>&nbsp;</div>

<div>Then it prompts me for the password.</div>

<div>Unfortunately, none of the passwords that I think would pertain to Postgres or PgAdmin work. &nbsp;</div>

<div>What does work, is the &quot;master password&quot; that I use to log into the pgAdmin Graphical User Interface.</div>

<div>I would think that one would work, but it does not.</div>

<div>&nbsp;</div>

<div>Issue #2.</div>

<div>I am thinking out loud hear, there are 3 passwords:</div>

<div>Operating System Admin Password: I know that.</div>

<div>pgAmin password: I know that.</div>

<div>PostgreSQL 12 - the server with multiple database on it. &nbsp;I believe I know that?</div>

<div>The issue with that is, while it was not letting me connect, I selected what I think was called &quot;clear password&quot;.</div>

<div>Nonetheless, I still have what pgAdmin calls the &quot;master password&quot;.</div>

<div>So even if I did remove the password for &quot;PostgreSQL&quot; server, would I be able to reset one?&nbsp;</div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Thursday, April 23, 2020 at 4:26 PM<br/>
<b>From:</b>&nbsp;&quot;Adrian Klaver&quot; &lt;adrian.klaver@aklaver.com&gt;<br/>
<b>To:</b>&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
<b>Cc:</b>&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;, &quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
<b>Subject:</b>&nbsp;Re: Fw: Re: Could Not Connect To Server</div>

<div name="quoted-content">On 4/23/20 1:37 PM, Dummy Account wrote:<br/>
&gt; From the Finder, I think that is the same a File Explorer on Widows.<br/>
&gt; &nbsp;From Finder, it&#39;s locked; I cannot access it. &nbsp;Could I use the command<br/>
&gt; line and change ownership or access privledges? &nbsp;And then get access?<br/>
<br/>
Why not from the command line use a text editor to view the file(s)?<br/>
<br/>
&gt; Thanks<br/>
<br/>
<br/>
<br/>
--<br/>
Adrian Klaver<br/>
adrian.klaver@aklaver.com</div>
</div>
</div>
</div></div></body></html>





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

* Re: Fw: Re: Could Not Connect To Server
@ 2020-04-23 22:05  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  1 sibling, 1 reply; 29+ messages in thread

From: Adrian Klaver @ 2020-04-23 22:05 UTC (permalink / raw)
  To: Dummy Account <dummyaccount4u@mail.com>; +Cc: pgsql-general; David G. Johnston <david.g.johnston@gmail.com>

On 4/23/20 3:03 PM, Dummy Account wrote:
> I cannot login into a postgres role via command line.
> Issue #1.
> I have never done it before via command line, so maybe I am doing it 
> incorrectly.
> I have been attempting to go:
> su - postgres
> Then it prompts me for the password.
> Unfortunately, none of the passwords that I think would pertain to 
> Postgres or PgAdmin work.
> What does work, is the "master password" that I use to log into the 
> pgAdmin Graphical User Interface.
> I would think that one would work, but it does not.

What did you use to do?:

sudo -u postgres ./pg_ctl start -D /Library/PostgreSQL/12/data


> Issue #2.
> I am thinking out loud hear, there are 3 passwords:
> Operating System Admin Password: I know that.
> pgAmin password: I know that.
> PostgreSQL 12 - the server with multiple database on it.  I believe I 
> know that?
> The issue with that is, while it was not letting me connect, I selected 
> what I think was called "clear password".
> Nonetheless, I still have what pgAdmin calls the "master password".
> So even if I did remove the password for "PostgreSQL" server, would I be 
> able to reset one?
> *Sent:* Thursday, April 23, 2020 at 4:26 PM
> *From:* "Adrian Klaver" <adrian.klaver@aklaver.com>
> *To:* "Dummy Account" <dummyaccount4u@mail.com>
> *Cc:* "pgsql-general" <pgsql-general@postgresql.org>, "David G. 
> Johnston" <david.g.johnston@gmail.com>
> *Subject:* Re: Fw: Re: Could Not Connect To Server
> On 4/23/20 1:37 PM, Dummy Account wrote:
>  > From the Finder, I think that is the same a File Explorer on Widows.
>  >  From Finder, it's locked; I cannot access it.  Could I use the command
>  > line and change ownership or access privledges?  And then get access?
> 
> Why not from the command line use a text editor to view the file(s)?
> 
>  > Thanks
> 
> 
> 
> --
> Adrian Klaver
> adrian.klaver@aklaver.com


-- 
Adrian Klaver
adrian.klaver@aklaver.com





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

* Re: Fw: Re: Could Not Connect To Server
@ 2020-04-23 22:06  David G. Johnston <david.g.johnston@gmail.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  1 sibling, 0 replies; 29+ messages in thread

From: David G. Johnston @ 2020-04-23 22:06 UTC (permalink / raw)
  To: Dummy Account <dummyaccount4u@mail.com>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general

On Thu, Apr 23, 2020 at 3:03 PM Dummy Account <dummyaccount4u@mail.com>
wrote:

>
> I cannot login into a postgres role via command line.
>
> Issue #1.
> I have never done it before via command line, so maybe I am doing it
> incorrectly.
> I have been attempting to go:
>
> su - postgres
>
>
The "sudo" in Rob's answer wasn't optional.  Attempting to use sudo should
require the OS Admin Password

David J.

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

* Re: Fw: Re: Could Not Connect To Server
@ 2020-04-23 22:19  Dummy Account <dummyaccount4u@mail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 2 replies; 29+ messages in thread

From: Dummy Account @ 2020-04-23 22:19 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general; David G. Johnston <david.g.johnston@gmail.com>

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>This worked.</div>

<div>
<div>sudo su - postgres</div>

<div>I was now able to log into data and ls</div>

<div>Inside data is &quot;log&quot;.</div>

<div>&nbsp;</div>

<div>How do I open log?</div>

<div>and got:</div>

<div>LSOpenURLsWithRole() failed with erro -610</div>

<div>
<div>&nbsp;</div>

<div>I then tried:</div>

<div>log show</div>

<div>and I got:</div>

<div>log: Could not be open local log store: The log archive format is corrupt and cannot be read</div>

<div>&nbsp;</div>

<div>So that right there sounds more conducive to&nbsp;the OS being restored( not that I know&nbsp;), all the files were likely rewritten?</div>

<div>&nbsp;</div>

<div>&nbsp;</div>

<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Thursday, April 23, 2020 at 5:05 PM<br/>
<b>From:</b>&nbsp;&quot;Adrian Klaver&quot; &lt;adrian.klaver@aklaver.com&gt;<br/>
<b>To:</b>&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
<b>Cc:</b>&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;, &quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
<b>Subject:</b>&nbsp;Re: Fw: Re: Could Not Connect To Server</div>

<div name="quoted-content">On 4/23/20 3:03 PM, Dummy Account wrote:<br/>
&gt; I cannot login into a postgres role via command line.<br/>
&gt; Issue #1.<br/>
&gt; I have never done it before via command line, so maybe I am doing it<br/>
&gt; incorrectly.<br/>
&gt; I have been attempting to go:<br/>
&gt; su - postgres<br/>
&gt; Then it prompts me for the password.<br/>
&gt; Unfortunately, none of the passwords that I think would pertain to<br/>
&gt; Postgres or PgAdmin work.<br/>
&gt; What does work, is the &quot;master password&quot; that I use to log into the<br/>
&gt; pgAdmin Graphical User Interface.<br/>
&gt; I would think that one would work, but it does not.<br/>
<br/>
What did you use to do?:<br/>
<br/>
sudo -u postgres ./pg_ctl start -D /Library/PostgreSQL/12/data<br/>
<br/>
<br/>
&gt; Issue #2.<br/>
&gt; I am thinking out loud hear, there are 3 passwords:<br/>
&gt; Operating System Admin Password: I know that.<br/>
&gt; pgAmin password: I know that.<br/>
&gt; PostgreSQL 12 - the server with multiple database on it. &nbsp;I believe I<br/>
&gt; know that?<br/>
&gt; The issue with that is, while it was not letting me connect, I selected<br/>
&gt; what I think was called &quot;clear password&quot;.<br/>
&gt; Nonetheless, I still have what pgAdmin calls the &quot;master password&quot;.<br/>
&gt; So even if I did remove the password for &quot;PostgreSQL&quot; server, would I be<br/>
&gt; able to reset one?<br/>
&gt; *Sent:*&nbsp;Thursday, April 23, 2020 at 4:26 PM<br/>
&gt; *From:*&nbsp;&quot;Adrian Klaver&quot; &lt;adrian.klaver@aklaver.com&gt;<br/>
&gt; *To:*&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
&gt; *Cc:*&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;, &quot;David G.<br/>
&gt; Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
&gt; *Subject:*&nbsp;Re: Fw: Re: Could Not Connect To Server<br/>
&gt; On 4/23/20 1:37 PM, Dummy Account wrote:<br/>
&gt; &gt; From the Finder, I think that is the same a File Explorer on Widows.<br/>
&gt; &gt; &nbsp;From Finder, it&#39;s locked; I cannot access it. &nbsp;Could I use the command<br/>
&gt; &gt; line and change ownership or access privledges? &nbsp;And then get access?<br/>
&gt;<br/>
&gt; Why not from the command line use a text editor to view the file(s)?<br/>
&gt;<br/>
&gt; &gt; Thanks<br/>
&gt;<br/>
&gt;<br/>
&gt;<br/>
&gt; --<br/>
&gt; Adrian Klaver<br/>
&gt; adrian.klaver@aklaver.com<br/>
<br/>
<br/>
--<br/>
Adrian Klaver<br/>
adrian.klaver@aklaver.com</div>
</div>
</div>
</div></div></body></html>





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

* Re: Fw: Re: Could Not Connect To Server
@ 2020-04-23 22:22  Rob Sargent <robjsargent@gmail.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  1 sibling, 0 replies; 29+ messages in thread

From: Rob Sargent @ 2020-04-23 22:22 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org



On 4/23/20 4:19 PM, Dummy Account wrote:
> This worked.
> sudo su - postgres
> I was now able to log into data and ls
> Inside data is "log".
> How do I open log?
> and got:
> LSOpenURLsWithRole() failed with erro -610
> I then tried:
> log show
> and I got:
> log: Could not be open local log store: The log archive format is 
> corrupt and cannot be read
> So that right there sounds more conducive to the OS being restored( 
> not that I know ), all the files were likely rewritten?
>
"log" is another directory, correct?

    cd log
    ls -l

should show you the logfiles.  Use a text editor on the most recently 
written.

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

* Fw: Re:  Re: Could Not Connect To Server
@ 2020-04-23 22:46  Dummy Account <dummyaccount4u@mail.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  1 sibling, 1 reply; 29+ messages in thread

From: Dummy Account @ 2020-04-23 22:46 UTC (permalink / raw)
  To: david.g.johnston@gmail.com; pgsql-general; adrian.klaver@aklaver.com

<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>&nbsp;</div>

<div>
<div>I cd&#39;d into log and listed the files. &nbsp;There are many.</div>

<div>How should I get the log that you want.</div>

<div>&nbsp;</div>

<div>&nbsp;</div>

<div>I tried:</div>

<div>
<p>open -a TextEdit postgresql-2020-04-22_171300.log</p>

<p>I got:</p>

<p>LSOpenURLsWithRole() failed for the application /Applications/TextEdit.app with error -610 for the file /Library/PostgreSQL/12/data/log/postgresql-2020-04-22_171300.log.</p>
</div>

<div>&nbsp;</div>

<div>&nbsp;
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b>&nbsp;Thursday, April 23, 2020 at 5:19 PM<br/>
<b>From:</b>&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
<b>To:</b>&nbsp;&quot;Adrian Klaver&quot; &lt;adrian.klaver@aklaver.com&gt;<br/>
<b>Cc:</b>&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;, &quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
<b>Subject:</b>&nbsp;Re: Fw: Re: Could Not Connect To Server</div>

<div name="quoted-content">
<div style="font-family: Verdana;font-size: 12.0px;">
<div>This worked.</div>

<div>
<div>sudo su - postgres</div>

<div>I was now able to log into data and ls</div>

<div>Inside data is &quot;log&quot;.</div>

<div>&nbsp;</div>

<div>How do I open log?</div>

<div>and got:</div>

<div>LSOpenURLsWithRole() failed with erro -610</div>

<div>
<div>&nbsp;</div>

<div>I then tried:</div>

<div>log show</div>

<div>and I got:</div>

<div>log: Could not be open local log store: The log archive format is corrupt and cannot be read</div>

<div>&nbsp;</div>

<div>So that right there sounds more conducive to&nbsp;the OS being restored( not that I know&nbsp;), all the files were likely rewritten?</div>

<div>&nbsp;</div>

<div>&nbsp;</div>

<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Sent:</b>&nbsp;Thursday, April 23, 2020 at 5:05 PM<br/>
<b>From:</b>&nbsp;&quot;Adrian Klaver&quot; &lt;adrian.klaver@aklaver.com&gt;<br/>
<b>To:</b>&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
<b>Cc:</b>&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;, &quot;David G. Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
<b>Subject:</b>&nbsp;Re: Fw: Re: Could Not Connect To Server</div>

<div>On 4/23/20 3:03 PM, Dummy Account wrote:<br/>
&gt; I cannot login into a postgres role via command line.<br/>
&gt; Issue #1.<br/>
&gt; I have never done it before via command line, so maybe I am doing it<br/>
&gt; incorrectly.<br/>
&gt; I have been attempting to go:<br/>
&gt; su - postgres<br/>
&gt; Then it prompts me for the password.<br/>
&gt; Unfortunately, none of the passwords that I think would pertain to<br/>
&gt; Postgres or PgAdmin work.<br/>
&gt; What does work, is the &quot;master password&quot; that I use to log into the<br/>
&gt; pgAdmin Graphical User Interface.<br/>
&gt; I would think that one would work, but it does not.<br/>
<br/>
What did you use to do?:<br/>
<br/>
sudo -u postgres ./pg_ctl start -D /Library/PostgreSQL/12/data<br/>
<br/>
<br/>
&gt; Issue #2.<br/>
&gt; I am thinking out loud hear, there are 3 passwords:<br/>
&gt; Operating System Admin Password: I know that.<br/>
&gt; pgAmin password: I know that.<br/>
&gt; PostgreSQL 12 - the server with multiple database on it. &nbsp;I believe I<br/>
&gt; know that?<br/>
&gt; The issue with that is, while it was not letting me connect, I selected<br/>
&gt; what I think was called &quot;clear password&quot;.<br/>
&gt; Nonetheless, I still have what pgAdmin calls the &quot;master password&quot;.<br/>
&gt; So even if I did remove the password for &quot;PostgreSQL&quot; server, would I be<br/>
&gt; able to reset one?<br/>
&gt; *Sent:*&nbsp;Thursday, April 23, 2020 at 4:26 PM<br/>
&gt; *From:*&nbsp;&quot;Adrian Klaver&quot; &lt;adrian.klaver@aklaver.com&gt;<br/>
&gt; *To:*&nbsp;&quot;Dummy Account&quot; &lt;dummyaccount4u@mail.com&gt;<br/>
&gt; *Cc:*&nbsp;&quot;pgsql-general&quot; &lt;pgsql-general@postgresql.org&gt;, &quot;David G.<br/>
&gt; Johnston&quot; &lt;david.g.johnston@gmail.com&gt;<br/>
&gt; *Subject:*&nbsp;Re: Fw: Re: Could Not Connect To Server<br/>
&gt; On 4/23/20 1:37 PM, Dummy Account wrote:<br/>
&gt; &gt; From the Finder, I think that is the same a File Explorer on Widows.<br/>
&gt; &gt; &nbsp;From Finder, it&#39;s locked; I cannot access it. &nbsp;Could I use the command<br/>
&gt; &gt; line and change ownership or access privledges? &nbsp;And then get access?<br/>
&gt;<br/>
&gt; Why not from the command line use a text editor to view the file(s)?<br/>
&gt;<br/>
&gt; &gt; Thanks<br/>
&gt;<br/>
&gt;<br/>
&gt;<br/>
&gt; --<br/>
&gt; Adrian Klaver<br/>
&gt; adrian.klaver@aklaver.com<br/>
<br/>
<br/>
--<br/>
Adrian Klaver<br/>
adrian.klaver@aklaver.com</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>





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

* Re: Fw: Re: Re: Could Not Connect To Server
@ 2020-04-23 22:55  Rob Sargent <robjsargent@gmail.com>
  parent: Dummy Account <dummyaccount4u@mail.com>
  0 siblings, 0 replies; 29+ messages in thread

From: Rob Sargent @ 2020-04-23 22:55 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org



On 4/23/20 4:46 PM, Dummy Account wrote:
> I cd'd into log and listed the files.  There are many.
> How should I get the log that you want.
> I tried:
>
> open -a TextEdit postgresql-2020-04-22_171300.log
>
> I got:
>
> LSOpenURLsWithRole() failed for the application 
> /Applications/TextEdit.app with error -610 for the file 
> /Library/PostgreSQL/12/data/log/postgresql-2020-04-22_171300.log.
>
That appears to me to say that, for the current user, TextEdit could not 
open the log file.  What was the effective user?  Were you still in a 
session under 'sudo su - postgres' in which case postgres can't read the 
log file.  If that's the case then postgres likely can't read the data 
files either.

Can you show the output of these commands in the data directory?

    id
    \ls -ltr

I ask for the "\ls" to make sure there are no funny aliases in place.

> *Sent:* Thursday, April 23, 2020 at 5:19 PM
> *From:* "Dummy Account" <dummyaccount4u@mail.com>
> *To:* "Adrian Klaver" <adrian.klaver@aklaver.com>
> *Cc:* "pgsql-general" <pgsql-general@postgresql.org>, "David G. 
> Johnston" <david.g.johnston@gmail.com>
> *Subject:* Re: Fw: Re: Could Not Connect To Server
> This worked.
> sudo su - postgres
> I was now able to log into data and ls
> Inside data is "log".
> How do I open log?
> and got:
> LSOpenURLsWithRole() failed with erro -610
> I then tried:
> log show
> and I got:
> log: Could not be open local log store: The log archive format is 
> corrupt and cannot be read
> So that right there sounds more conducive to the OS being restored( 
> not that I know ), all the files were likely rewritten?
>

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


end of thread, other threads:[~2020-04-23 22:55 UTC | newest]

Thread overview: 29+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-10-15 17:11 could not connect to server Antonio Silva <aolinto.lst@gmail.com>
2016-10-15 17:28 ` Adrian Klaver <adrian.klaver@aklaver.com>
2016-10-16 04:09   ` Antonio Silva <aolinto.lst@gmail.com>
2016-10-16 13:49     ` Adrian Klaver <adrian.klaver@aklaver.com>
2016-10-16 15:06     ` Adrian Klaver <adrian.klaver@aklaver.com>
2016-10-16 15:42     ` Christoph Berg <myon@debian.org>
2016-10-15 17:33 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-04-23 18:18 Could Not Connect To Server Dummy Account <dummyaccount4u@mail.com>
2020-04-23 18:26 ` Re: Could Not Connect To Server David G. Johnston <david.g.johnston@gmail.com>
2020-04-23 18:48   ` Re: Could Not Connect To Server Dummy Account <dummyaccount4u@mail.com>
2020-04-23 18:55     ` Re: Could Not Connect To Server David G. Johnston <david.g.johnston@gmail.com>
2020-04-23 19:12       ` Re: Could Not Connect To Server Dummy Account <dummyaccount4u@mail.com>
2020-04-23 19:23         ` Re: Could Not Connect To Server Rob Sargent <robjsargent@gmail.com>
2020-04-23 19:25         ` Re: Could Not Connect To Server Adrian Klaver <adrian.klaver@aklaver.com>
2020-04-23 19:32           ` Re: Could Not Connect To Server Dummy Account <dummyaccount4u@mail.com>
2020-04-23 19:36             ` Re: Could Not Connect To Server Rob Sargent <robjsargent@gmail.com>
2020-04-23 19:40               ` Re: Could Not Connect To Server Adrian Klaver <adrian.klaver@aklaver.com>
2020-04-23 20:24             ` Fw: Re: Could Not Connect To Server Dummy Account <dummyaccount4u@mail.com>
2020-04-23 20:27               ` Re: Fw: Re: Could Not Connect To Server Adrian Klaver <adrian.klaver@aklaver.com>
2020-04-23 20:37                 ` Re: Fw: Re: Could Not Connect To Server Dummy Account <dummyaccount4u@mail.com>
2020-04-23 21:26                   ` Re: Fw: Re: Could Not Connect To Server Adrian Klaver <adrian.klaver@aklaver.com>
2020-04-23 21:36                     ` Re: Fw: Re: Could Not Connect To Server Rob Sargent <robjsargent@gmail.com>
2020-04-23 22:03                     ` Re: Fw: Re: Could Not Connect To Server Dummy Account <dummyaccount4u@mail.com>
2020-04-23 22:05                       ` Re: Fw: Re: Could Not Connect To Server Adrian Klaver <adrian.klaver@aklaver.com>
2020-04-23 22:19                         ` Re: Fw: Re: Could Not Connect To Server Dummy Account <dummyaccount4u@mail.com>
2020-04-23 22:22                           ` Re: Fw: Re: Could Not Connect To Server Rob Sargent <robjsargent@gmail.com>
2020-04-23 22:46                           ` Fw: Re:  Re: Could Not Connect To Server Dummy Account <dummyaccount4u@mail.com>
2020-04-23 22:55                             ` Re: Fw: Re: Re: Could Not Connect To Server Rob Sargent <robjsargent@gmail.com>
2020-04-23 22:06                       ` Re: Fw: Re: Could Not Connect To Server David G. Johnston <david.g.johnston@gmail.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