Comments (4)
Hello @quaternionma, i recheked today and not get error, in my pg_hba.conf:
hostssl all all 0.0.0.0/0 cert
I guess you have a configuration error, check the postgres documentation:
https://www.postgresql.org/docs/16/ssl-tcp.html
https://www.postgresql.org/docs/16/libpq-ssl.html
from documentserver.
This is strange. I'm using the same database with several other services and all connects through SSL without problems.
Usually i refrain from using client certificates for identity verification and my pg_hba line looks like this:
hostssl onlyoffice onlyoffice 10.10.0.151/32 scram-sha-256
According to your configuration you are using client certificates for client identity verification. I did not found any config option for this in the actual onlyoffice documentation, so in order to reproduce your config i put client cert, key and root cert in a directory named .postgresql
in the home folder of the user ds
and changed the line to
hostssl onlyoffice onlyoffice 10.10.0.151/32 cert
Unfortunately i had still no luck. If this standard way is not the way to go, would you please give some advice? Is there any not documented option?
The relevant error line in /var/log/onlyoffice/documentserver/docservice/out.log
is again
nodeJS - getTableColumns error: error: kein pg_hba.conf-Eintrag für Host »10.10.0.151«, Benutzer »onlyoffice«, Datenbank »onlyoffice«, keine Verschlüsselung
.
Again: changing hostssl
to host
resolves the problem but this is not really a good solution. I'm using AlmaLinux release 9.4 (Seafoam Ocelot) and Postgesql 15.6 on the database server.
So I#m stuck here!
from documentserver.
I see what is the problem, you add certificates to a separate file. You need to add cert as string (you can convert to string with awk as i show in the post), we do not support reading from file in our configuration files, my sql section looks like:
"sql": {
"type": "postgres",
"dbHost": "192.168.0.110",
"dbPort": "5432",
"dbName": "onlyoffice",
"dbUser": "onlyoffice",
"dbPass": "onlyoffice",
"pgPoolExtraOptions": {
"ssl":{
"rejectUnauthorized": false,
"ca": "-----BEGIN CERTIFICATE-----\n...root_crt...\n",
"key": "-----BEGIN PRIVATE KEY-----\n...client_key...\n",
"cert": "-----BEGIN CERTIFICATE-----\n...client_crt...\n"
}
}
},
Onlyoffice can work without checking client certs, i just checked . My sql section in the local.json:
"sql": {
"type": "postgres",
"dbHost": "192.168.0.110",
"dbPort": "5432",
"dbName": "onlyoffice",
"dbUser": "onlyoffice",
"dbPass": "onlyoffice",
"pgPoolExtraOptions": {
"ssl":{
"rejectUnauthorized": false
}
}
},
pg_hba.conf:
hostssl onlyoffice onlyoffice 192.168.0.151/32 scram-sha-256
Maybe you specified the wrong IP address in the pg_hba.conf? Judging by your mistake postgresql rejects connection, can you show postgresql log?
from documentserver.
Many thanks @igwyd.
"pgPoolExtraOptions": {
"ssl":{
"rejectUnauthorized": false
}
}
did the magic. It works now. So the "rejectUnauthorized": false
JSON key seems to be mandatory for connecting through SSL, at least for certificates signed by a local CA. Unfortunately there is no mentioniong about in the documentation.
It would be great if this can be added to https://helpcenter.onlyoffice.com/installation/docs-community-install-ubuntu.aspx in order to prevent further confusion and frustation, especially because it was mentioned in #1708 (comment) as a temporary workaround.
from documentserver.
Related Issues (20)
- ODT files: if saving file with a custom field, the custom property is wiped out from the file HOT 1
- Logs stopping after few days , running on kubernetes HOT 5
- Special Characters Displayed in Documents After Changing OnlyOffice Fonts on Server HOT 5
- Incorrect CSV Export When First Row Contains Merged Cells in XLSX File
- Image cropping is being ignored after changing image shape and exporting/printing to PDF HOT 2
- "The document security token is not correctly formed. Please contact your Document Server administrator" OnlyOffice HOT 6
- Spreadsheet load wokbook with chart error HOT 1
- Format of line number changes after file with .odt format is reopened after editing HOT 2
- Keep Database after restart HOT 6
- Mail merge from URL not working if a token is passed in the URL
- Using =TEXT( . , "YYYY-DD") function does not work in the German locale HOT 1
- DocumentServer editor widget does not get token even when correctly supplied
- IP address in a csv file is mistakenly identified as a date format in Spreadsheet Editor when create the backup on docker version 7.5.1.1 and restore it on win version 8.0.1.31 HOT 3
- SVG objects with encoding="windows-1252" are not included in printouts (paper and PDF) HOT 6
- After inserting a plain text content control, I cannot press Enter at the end to create a new line HOT 1
- There is a difference in the display of msword's table in OnlyOfficeMS word HOT 1
- When I copy a piece of text containing comments, the original comment box is in the wrong position after pasting HOT 4
- Documentserver fails to connect to Nextcloud with Letsencrypt ISRG Root X2 signed certificate
- PDF editor doesn't use embedded fonts HOT 1
- sdkjs compilation problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from documentserver.