Could Not Connect To Server

Started by Dummy Accountabout 6 years ago22 messagesgeneral
Jump to latest
#1Dummy Account
dummyaccount4u@mail.com

<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.com%2Fquestions%2F61353989%2Fpgadmin-could-not-connect-to-server-connection-refused&quot; target="_blank">https://stackoverflow.com/questions/61353989/pgadmin-could-not-connect-to-server-connection-refused&lt;/a&gt;&lt;/div&gt;

<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>

#2David G. Johnston
david.g.johnston@gmail.com
In reply to: Dummy Account (#1)
Re: Could Not Connect To Server

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.

#3Dummy Account
dummyaccount4u@mail.com
In reply to: David G. Johnston (#2)
Re: Could Not Connect To Server

<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>

#4David G. Johnston
david.g.johnston@gmail.com
In reply to: Dummy Account (#3)
Re: Could Not Connect To Server

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.

#5Dummy Account
dummyaccount4u@mail.com
In reply to: David G. Johnston (#4)
Re: Could Not Connect To Server

<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>

#6Rob Sargent
robjsargent@gmail.com
In reply to: Dummy Account (#5)
Re: Could Not Connect To Server

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.

#7Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Dummy Account (#5)
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

#8Dummy Account
dummyaccount4u@mail.com
In reply to: Adrian Klaver (#7)
Re: Could Not Connect To Server

<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>

#9Rob Sargent
robjsargent@gmail.com
In reply to: Dummy Account (#8)
Re: Could Not Connect To Server

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

#10Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Rob Sargent (#9)
Re: Could Not Connect To Server

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

#11Dummy Account
dummyaccount4u@mail.com
In reply to: Dummy Account (#1)
Fw: Re: Could Not Connect To Server

<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>

#12Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Dummy Account (#11)
Re: Fw: Re: Could Not Connect To Server

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

#13Dummy Account
dummyaccount4u@mail.com
In reply to: Adrian Klaver (#12)
Re: Fw: Re: Could Not Connect To Server

<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>

#14Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Dummy Account (#13)
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

#15Rob Sargent
robjsargent@gmail.com
In reply to: Adrian Klaver (#14)
Re: Fw: Re: Could Not Connect To Server

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.

Show quoted text
#16Dummy Account
dummyaccount4u@mail.com
In reply to: Adrian Klaver (#14)
Re: Fw: Re: Could Not Connect To Server

<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>

#17Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Dummy Account (#16)
Re: Fw: Re: Could Not Connect To Server

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

#18David G. Johnston
david.g.johnston@gmail.com
In reply to: Dummy Account (#16)
Re: Fw: Re: Could Not Connect To Server

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.

#19Dummy Account
dummyaccount4u@mail.com
In reply to: Adrian Klaver (#17)
Re: Fw: Re: Could Not Connect To Server

<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>

#20Rob Sargent
robjsargent@gmail.com
In reply to: Dummy Account (#19)
Re: Fw: Re: Could Not Connect To Server

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.

#21Dummy Account
dummyaccount4u@mail.com
In reply to: Dummy Account (#1)
#22Rob Sargent
robjsargent@gmail.com
In reply to: Dummy Account (#21)