mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-26 01:16:01 +03:00
[GH-ISSUE #1702] Postgresql: could not accept SSL connection: Success #1341
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1341
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cremesk on GitHub (Mar 20, 2019).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1702
No bug! Only for security.
Impacted versions
Steps to reproduce
Hey, my Postgresql with default modoboa settings show this log.
How can i fix ssl for postgresql?
Steps:
Thanks
/srv/modoboa/instance/instance/settings.py
/etc/postgresql/9.6/main/postgresql.conf
@tonioo commented on GitHub (Mar 20, 2019):
@cremesk Is your server loaded?
@cremesk commented on GitHub (Mar 20, 2019):
@tonioo yes all work correctly and is online.
But I think more secure is good ;)
@tonioo commented on GitHub (Mar 20, 2019):
@cremesk By loaded I mean under heavy charge. Maybe not enough resource?
@cremesk commented on GitHub (Mar 20, 2019):
@tonioo my bad. No i think it all okay.
@tonioo commented on GitHub (Mar 20, 2019):
@cremesk How many users do you have?
@cremesk commented on GitHub (Mar 20, 2019):
@tonioo
Identities | 54
@cremesk commented on GitHub (Mar 20, 2019):
@tonioo commented on GitHub (Mar 20, 2019):
And they all have active IMAP/SMTP connections? Maybe you could tune your postgres config a bit if it is not already done
(https://friendsmeet.win/posts/662)
@cremesk commented on GitHub (Mar 20, 2019):
Not all. ~ 20 connections currently.
I have try to tune my config. Same Issue.
@cremesk commented on GitHub (Mar 21, 2019):
My postgresql.conf:
uptime 24days load average: 0.36, 0.58, 0.72
Host: 4CPU's | 16GB RAM (used 6,2G) | 8GB SWAP (12KB used) | SSD (Raid1) 200GB (used 41GB)
LXC: Modoboa
4 CPU's | 6GB RAM(used 2,3G) + 4 GB SWAP(used 0)
postgresql.txt
@tonioo commented on GitHub (Mar 22, 2019):
@cremesk Unfortunately I'm not a postgres expert... @kryskool Do you have any idea?
@cremesk commented on GitHub (Mar 28, 2019):
I take a look in my /etc/postgresql/9.6/main/pg_hba.conf
i need to add and try this line?
hostssl all all 127.0.0.1/32 md5@cremesk commented on GitHub (Mar 29, 2019):
I try this. But i have the same issue.
@cremesk commented on GitHub (Apr 5, 2019):
@tonioo small update:
[unknown]@[unknown] LOG: could not accept SSL connection: SuccessMeens we use a plain connection not secured with ssl.
To Setup a SSL-Connection we need this setup:
https://www.postgresql.org/docs/9.6/ssl-tcp.html
@kryskool commented on GitHub (Apr 9, 2019):
Hi @cremesk
Try:
max_connections = 200
work_mem = 12MB
maintenance_work_mem = 128MB
wal_buffers = 64MB
effective_cache_size = 512MB
To log slow query on postgresql.log
log_min_duration_statement = 100
It's not a good idea to enable SSL on localhost, use it only on remote PostgreSQL Server
Regards,
@tonioo commented on GitHub (Apr 29, 2019):
@cremesk Is it better now?
@cremesk commented on GitHub (Apr 30, 2019):
sorry for the delay..
Yes it works fine.
I think the "problem" was only:
ssl = true # (change requires restart)@franpog859 commented on GitHub (Sep 8, 2023):
@cremesk, what exactly was the problem and how did you solve it? Did you remove the
ssl = trueline/ did you change it tofalse/ did you restart the service?