Open DrissiReda opened 11 months ago
We don't do any replacements on our side. We use Java Spring for data connection and pass this variable straight to Spring: https://github.com/exadel-inc/CompreFace/blob/master/java/admin/src/main/resources/application.yml#L39C30-L39C40 I think it may be a Spring, or even JDBC bug.
While I'm not familiar with spring. I'm using a lot of projects that use JDBC and this is the first time I've ever had this issue with my setup...
Actually i have same problem
this is set as env for both api and for admin
name: POSTGRES_URL value: >- jdbc:postgresql://postgresql-rw.postgresql.svc.cluster.local:5432/compreface
and this is logerror from api java.sql.SQLException: Connection Error: address 'pgsql-rw.pgsql.svc.cluster.local' is unresolved
Can tell, that when i renamed the service and the namespace, ( was also postgresql ) everything worked as it should for api also.
Actually i have same problem this is set as env for both api and for admin
name: POSTGRES_URL value: >- jdbc:postgresql://postgresql-rw.postgresql.svc.cluster.local:5432/compreface
and this is logerror from api java.sql.SQLException: Connection Error: address 'pgsql-rw.pgsql.svc.cluster.local' is unresolved
you can see all postgresql was replaced with pgsql
@newbenji I have only managed to circumvent it by adding another Kubernetes service, you know, just like an alternate dns, it works.
@newbenji I have only managed to circumvent it by adding another Kubernetes service, you know, just like an alternate dns, it works.
Did the same, but sadly also needed new namespace. was postgresql :-D But was new postgresqlsetup so was not so big a deal
@newbenji I have only managed to circumvent it by adding another Kubernetes service, you know, just like an alternate dns, it works.
Did the same, but sadly also needed new namespace. was postgresql :-D But was new postgresqlsetup so was not so big a deal
as you've understood, it really overwrites any string postgresql in the provided url, probably to correct the protocol (e.g replace postgresql://.... by psql://....)
@newbenji I have only managed to circumvent it by adding another Kubernetes service, you know, just like an alternate dns, it works.
Did the same, but sadly also needed new namespace. was postgresql :-D But was new postgresqlsetup so was not so big a deal
as you've understood, it really overwrites any string postgresql in the provided url, probably to correct the protocol (e.g replace postgresql://.... by psql://....)
actually its not looking at :// it just replace all postgresql with psql
But weird it dosnt happen for admin
Hi,
I have encountered the same issue as described in this thread. After investigating the cause, I believe the following code is responsible:
NotificationDbConfig.java#L15
replace()
method replaces every matched string.
It seems that this part of the code is causing the problem. Could you please take a look into this?
Thank you!
@pospielov could you see if it can be removed or modified? Why is it necessary for this commit: https://github.com/exadel-inc/CompreFace/commit/f9f0f33708c9381591d0bcec52d1ebddb2b5a511 ?
Describe the bug
I supplied a custom jdbc url to my already running postgresql host. However the host name includes
postgresql
which gets rewritten intopsql
for some reason.The
compreface-api
container image from version0.6.0
until the latest has this issue,0.5.1
works as intended.Is that normal? Is there some code that replaces every string
postgresql
in the configuration bypsql
?To Reproduce
Steps to reproduce the behavior:
postgresql
in the host part of the environment variablePOSTGRES_URL
.Expected behavior
My url is supposed to be used as-is, not overwritten by something I cannot control
compreface-admin
does not have this issue, regardless of the version.