-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTF8 Encoding issues when importing certs #160
Comments
Hello @JA-HBK, thanks for reporting, though PostgreSQL support works only with the master branch. Therefore you have to either use the master or switch to mysql. |
Hi @yhabteab Thanks for getting back to me. Swapping to the master branch did get me around that error |
Hello @yhabteab This issue has come up again. I'm using version 1.2.1 of the x509 module, which seems like it ought to support PostgreSQL, based on the release notes. Symptoms are the same as they were previously, and I haven't changed anything else in my icinga environment. Any further recommendations? |
Hii, please share the error message? |
Describe the bug
When running 'icingacli x509 import' I repeatedly get an errors like:
ERROR: PDOException in /usr/share/icinga-php/ipl/vendor/ipl/sql/src/Connection.php:402 with message: SQLSTATE[22021]: Character not in repertoire: 7 ERROR: invalid byte sequence for encoding "UTF8": 0x9c
The specific invalid byte changes depending on which certificate file I provide, but the error is the same.
I have confirmed that the files I am providing to the command are valid .pem formatted certificates. When I run 'file -bi' I see that the files have charset=us-ascii. This should be a subset of UTF8, so there shouldn't be any invalid bytes in the files.
I double checked the cert files using /%d in vi to search for the dec code corresponding to the invalid byte sequence returned in the error message (for 0x9c it would be /%d156), and vi does not identify any occurrences of that byte in the file.
I have also confirmed that the Postgres DB backing the x509 module has the appropriate encoding of en_US.UTF-8.
To Reproduce
sudo icingacli x509 import --file /tmp/<cert_file_name>
Expected behavior
Icingacli command should add the certificate to the Postgres DB.
Your Environment
Icinga Web 2 version: 2.11.3
ipl version: 0.10.1
thirdparty version: 0.11.0
x509 version: 1.1.2
x509 db backend: Postgres 12.9
PHP version: 7.3.11
Web browser used: N/A. Commands executed through ssh connection to Icinga master
Icinga 2 version used (
icinga2 --version
): r2.13.6-1Server operating system and version: CentOS 7
The text was updated successfully, but these errors were encountered: