Could not load server certificate file "server.crt": No such file or directory.

Started by Howard Coleover 3 years ago3 messagesgeneral
Jump to latest
#1Howard Cole
howardnews@selestial.com

Hi,

Running 14.4.1 on Mac OSX on M1 and found that the postgres daemon had
not started. It was running fine previously.

When I ran the following command line:

sudo -u postgres /Library/Postgresql/14/bin/postmaster -D
/Library/Postgresql/14/data

I get the following error:

2022-08-12 17:47:33.239 BST [896] FATAL: could not load server
certificate file "server.crt": No such file or directory

Not sure what I have done - but where do I find this file - and can I
regenerate it easily?

Thanks,

Howard.

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Howard Cole (#1)
Re: Could not load server certificate file "server.crt": No such file or directory.

On 8/12/22 10:02 AM, howardnews@selestial.com wrote:

Hi,

Running 14.4.1 on Mac OSX on M1 and found that the postgres daemon had
not started. It was running fine previously.

When I ran the following command line:

sudo -u postgres /Library/Postgresql/14/bin/postmaster -D
/Library/Postgresql/14/data

I get the following error:

2022-08-12 17:47:33.239 BST [896] FATAL:  could not load server
certificate file "server.crt": No such file or directory

Not sure what I have done - but where do I find this file - and can I
regenerate it easily?

I am guessing you did from here:

https://www.postgresql.org/docs/current/runtime-config-connection.html#RUNTIME-CONFIG-CONNECTION-SSL

"ssl (boolean)

Enables SSL connections. This parameter can only be set in the
postgresql.conf file or on the server command line. The default is off.
"

set ssl on.

Check postgresql.conf to verify. If you don't want SSL on then set to off.

If you want it on and need a certificate see:

https://www.postgresql.org/docs/14/ssl-tcp.html#SSL-CERTIFICATE-CREATION

Thanks,

Howard.

--
Adrian Klaver
adrian.klaver@aklaver.com

#3Howard Cole
howardnews@selestial.com
In reply to: Adrian Klaver (#2)
Re: Could not load server certificate file "server.crt": No such file or directory.

set ssl on.

Check postgresql.conf to verify. If you don't want SSL on then set to
off.

If you want it on and need a certificate see:

https://www.postgresql.org/docs/14/ssl-tcp.html#SSL-CERTIFICATE-CREATION

You were right. Many thanks

Howard.