You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Omar Baqueiro (Jira)" <ji...@apache.org> on 2022/11/08 20:02:00 UTC

[jira] [Updated] (FINERACT-1800) docker-compose-postgresql.yml Error when spinning up

     [ https://issues.apache.org/jira/browse/FINERACT-1800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Omar Baqueiro updated FINERACT-1800:
------------------------------------
    Description: 
When trying to deploy Fineract using the `docker-compose-postgresql.yml` file, there are multiple errors:

 
 # First, if we attempt to run the default configuration by  running:

 
{code:java}
 git clone https://github.com/apache/fineract.git
     cd fineract
     docker-compose -f docker-compose-postgresql.yml up
{code}
 

 

We get the following error:
{code:java}
 
fineract-server_1     |   .   ____          _            __ _ _
fineract-server_1     |  /
/ __' __ _ ()_ __  __ _ \ \ \ \
fineract-server_1     | ( ( )___ | '_ | '| | ' \/ _` | \ \ \ \
fineract-server_1     |  
/  __)| |)| | | | | || (_| |  ) ) ) )
fineract-server_1     |   '  |___| .|| ||| |_, | / / / /
fineract-server_1     |  =========||==============|_/=////
fineract-server_1     |  :: Spring Boot ::                (v2.6.0)
fineract-server_1     | 
fineract-server_1     | 2022-11-08 19:55:12.243  INFO 8 — [           main] org.apache.fineract.ServerApplication    : Starting ServerApplication using Java 11.0.13 on 077bd22e6c42 with PID 8 (/app started by root in /)
fineract-server_1     | 2022-11-08 19:55:12.249  INFO 8 — [           main] org.apache.fineract.ServerApplication    : No active profile set, falling back to default profiles: basicauth
fineract-server_1     | 2022-11-08 19:55:18.396  INFO 8 — [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http) 8443 (https)
fineract-server_1     | 2022-11-08 19:55:20.130 ERROR 8 — [           main] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Exception during pool initialization.
fineract-server_1     | 
fineract-server_1     | java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=localhost)(port=3306)(type=master) : Socket fail to connect to host:localhost, port:3306. Connection refused (Connection refused)
fineract-server_1     |     at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73)
fineract-server_1     |     at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:194)
fineract-server_1     |     at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1394)
fineract-server_1     |     at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:635)
fineract-server_1     |     at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:150)
fineract-server_1     |     at org.mariadb.jdbc.Driver.connect(Driver.java:89)
fineract-server_1     |     at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
fineract-server_1     |     at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
fineract-server_1     |
{code}
 

 

Which means that the application is not using the provided PostgreSQL connection as defined in the HIKARI_*  variables in the docker compose. 

 

Then if we go ahead and un-comment the `fineract_` variables in the docker-compose-postgresql.yml file:

 
{code:java}
      #- fineract_tenants_driver=org.postgresql.Driver
      #- fineract_tenants_url=jdbc:postgresql://fineractpostgresql:5432/fineract_tenants
      #- fineract_tenants_uid=postgres
      #- fineract_tenants_pwd=skdcnwauicn2ucnaecasdsajdnizucawencascdca{code}
 

 We get a different error:

 

 

 
{code:java}
fineract-server_1     |  
/  __)| |)| | | | | || (_| |  ) ) ) )
fineract-server_1     |   '  |___| .|| ||| |_, | / / / /
fineract-server_1     |  =========||==============|_/=////
fineract-server_1     |  :: Spring Boot ::                (v2.6.0)
fineract-server_1     | 
fineract-server_1     | 2022-11-08 19:58:24.014  INFO 8 — [           main] org.apache.fineract.ServerApplication    : Starting ServerApplication using Java 11.0.13 on 76fd60fa8f35 with PID 8 (/app started by root in /)
fineract-server_1     | 2022-11-08 19:58:24.017  INFO 8 — [           main] org.apache.fineract.ServerApplication    : No active profile set, falling back to default profiles: basicauth
fineract-server_1     | 2022-11-08 19:58:30.415  INFO 8 — [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http) 8443 (https)
fineract-server_1     | 2022-11-08 19:58:31.267 ERROR 8 — [           main] com.zaxxer.hikari.HikariConfig           : Failed to load driver class org.postgresql.Driver from HikariConfig class classloader jdk.internal.loader.ClassLoaders$AppClassLoader@67424e82
fineract-server_1     | 2022-11-08 19:58:31.273 ERROR 8 — [           main] o.s.b.web.embedded.tomcat.TomcatStarter  : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'securityConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDetailsService': Unsatisfied dependency expressed through field 'platformUserRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appUserRepository' defined in org.apache.fineract.useradmini
{code}
 

Which appears to be ( _Failed to load driver class org.postgresql.Driver from HikariConfig class)_  that the PostgreSQL library is missing in the Docker image of Fineract.

 

 

 

  was:
When trying to deploy Fineract using the `docker-compose-postgresql.yml` file, there are multiple errors:

 
 # First, if we attempt to run the default configuration by  running:

``` git clone [https://github.com/apache/fineract.git]

     cd fineract

     docker-compose -f docker-compose-postgresql.yml up

```

 

We get the following error:

 

 

```

fineract-server_1     |   .   ____          _            __ _ _
fineract-server_1     |  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
fineract-server_1     | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
fineract-server_1     |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
fineract-server_1     |   '  |____| .__|_| |_|_| |_\__, | / / / /
fineract-server_1     |  =========|_|==============|___/=/_/_/_/
fineract-server_1     |  :: Spring Boot ::                (v2.6.0)
fineract-server_1     | 
fineract-server_1     | 2022-11-08 19:55:12.243  INFO 8 --- [           main] org.apache.fineract.ServerApplication    : Starting ServerApplication using Java 11.0.13 on 077bd22e6c42 with PID 8 (/app started by root in /)
fineract-server_1     | 2022-11-08 19:55:12.249  INFO 8 --- [           main] org.apache.fineract.ServerApplication    : No active profile set, falling back to default profiles: basicauth
fineract-server_1     | 2022-11-08 19:55:18.396  INFO 8 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http) 8443 (https)
fineract-server_1     | 2022-11-08 19:55:20.130 ERROR 8 --- [           main] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Exception during pool initialization.
fineract-server_1     | 
fineract-server_1     | java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=localhost)(port=3306)(type=master) : Socket fail to connect to host:localhost, port:3306. Connection refused (Connection refused)
fineract-server_1     |     at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73)
fineract-server_1     |     at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:194)
fineract-server_1     |     at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1394)
fineract-server_1     |     at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:635)
fineract-server_1     |     at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:150)
fineract-server_1     |     at org.mariadb.jdbc.Driver.connect(Driver.java:89)
fineract-server_1     |     at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
fineract-server_1     |     at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
fineract-server_1     |

```

 

Which means that the application is not using the provided PostgreSQL connection as defined in the HIKARI_*  variables in the docker compose. 

 

Then if we go ahead and un-comment the `fineract_` variables in the docker-compose-postgresql.yml file:

```

      #- fineract_tenants_driver=org.postgresql.Driver
      #- fineract_tenants_url=jdbc:postgresql://fineractpostgresql:5432/fineract_tenants
      #- fineract_tenants_uid=postgres
      #- fineract_tenants_pwd=skdcnwauicn2ucnaecasdsajdnizucawencascdca

```

 We get a different error:

 

```

ineract-server_1     |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
fineract-server_1     |   '  |____| .__|_| |_|_| |_\__, | / / / /
fineract-server_1     |  =========|_|==============|___/=/_/_/_/
fineract-server_1     |  :: Spring Boot ::                (v2.6.0)
fineract-server_1     | 
fineract-server_1     | 2022-11-08 19:58:24.014  INFO 8 --- [           main] org.apache.fineract.ServerApplication    : Starting ServerApplication using Java 11.0.13 on 76fd60fa8f35 with PID 8 (/app started by root in /)
fineract-server_1     | 2022-11-08 19:58:24.017  INFO 8 --- [           main] org.apache.fineract.ServerApplication    : No active profile set, falling back to default profiles: basicauth
fineract-server_1     | 2022-11-08 19:58:30.415  INFO 8 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http) 8443 (https)
fineract-server_1     | 2022-11-08 19:58:31.267 ERROR 8 --- [           main] com.zaxxer.hikari.HikariConfig           : Failed to load driver class org.postgresql.Driver from HikariConfig class classloader jdk.internal.loader.ClassLoaders$AppClassLoader@67424e82
fineract-server_1     | 2022-11-08 19:58:31.273 ERROR 8 --- [           main] o.s.b.web.embedded.tomcat.TomcatStarter  : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'securityConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDetailsService': Unsatisfied dependency expressed through field 'platformUserRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appUserRepository' defined in org.apache.fineract.useradmini

 

```

 

Which appears to be ( Failed to load driver class org.postgresql.Driver from HikariConfig class)  that the PostgreSQL library is missing in the Docker image of Fineract.

 

 

 


> docker-compose-postgresql.yml Error when spinning up
> ----------------------------------------------------
>
>                 Key: FINERACT-1800
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1800
>             Project: Apache Fineract
>          Issue Type: Bug
>          Components: Deployment
>            Reporter: Omar Baqueiro
>            Priority: Major
>
> When trying to deploy Fineract using the `docker-compose-postgresql.yml` file, there are multiple errors:
>  
>  # First, if we attempt to run the default configuration by  running:
>  
> {code:java}
>  git clone https://github.com/apache/fineract.git
>      cd fineract
>      docker-compose -f docker-compose-postgresql.yml up
> {code}
>  
>  
> We get the following error:
> {code:java}
>  
> fineract-server_1     |   .   ____          _            __ _ _
> fineract-server_1     |  /
> / __' __ _ ()_ __  __ _ \ \ \ \
> fineract-server_1     | ( ( )___ | '_ | '| | ' \/ _` | \ \ \ \
> fineract-server_1     |  
> /  __)| |)| | | | | || (_| |  ) ) ) )
> fineract-server_1     |   '  |___| .|| ||| |_, | / / / /
> fineract-server_1     |  =========||==============|_/=////
> fineract-server_1     |  :: Spring Boot ::                (v2.6.0)
> fineract-server_1     | 
> fineract-server_1     | 2022-11-08 19:55:12.243  INFO 8 — [           main] org.apache.fineract.ServerApplication    : Starting ServerApplication using Java 11.0.13 on 077bd22e6c42 with PID 8 (/app started by root in /)
> fineract-server_1     | 2022-11-08 19:55:12.249  INFO 8 — [           main] org.apache.fineract.ServerApplication    : No active profile set, falling back to default profiles: basicauth
> fineract-server_1     | 2022-11-08 19:55:18.396  INFO 8 — [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http) 8443 (https)
> fineract-server_1     | 2022-11-08 19:55:20.130 ERROR 8 — [           main] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Exception during pool initialization.
> fineract-server_1     | 
> fineract-server_1     | java.sql.SQLNonTransientConnectionException: Could not connect to address=(host=localhost)(port=3306)(type=master) : Socket fail to connect to host:localhost, port:3306. Connection refused (Connection refused)
> fineract-server_1     |     at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73)
> fineract-server_1     |     at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:194)
> fineract-server_1     |     at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1394)
> fineract-server_1     |     at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:635)
> fineract-server_1     |     at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:150)
> fineract-server_1     |     at org.mariadb.jdbc.Driver.connect(Driver.java:89)
> fineract-server_1     |     at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
> fineract-server_1     |     at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364)
> fineract-server_1     |
> {code}
>  
>  
> Which means that the application is not using the provided PostgreSQL connection as defined in the HIKARI_*  variables in the docker compose. 
>  
> Then if we go ahead and un-comment the `fineract_` variables in the docker-compose-postgresql.yml file:
>  
> {code:java}
>       #- fineract_tenants_driver=org.postgresql.Driver
>       #- fineract_tenants_url=jdbc:postgresql://fineractpostgresql:5432/fineract_tenants
>       #- fineract_tenants_uid=postgres
>       #- fineract_tenants_pwd=skdcnwauicn2ucnaecasdsajdnizucawencascdca{code}
>  
>  We get a different error:
>  
>  
>  
> {code:java}
> fineract-server_1     |  
> /  __)| |)| | | | | || (_| |  ) ) ) )
> fineract-server_1     |   '  |___| .|| ||| |_, | / / / /
> fineract-server_1     |  =========||==============|_/=////
> fineract-server_1     |  :: Spring Boot ::                (v2.6.0)
> fineract-server_1     | 
> fineract-server_1     | 2022-11-08 19:58:24.014  INFO 8 — [           main] org.apache.fineract.ServerApplication    : Starting ServerApplication using Java 11.0.13 on 76fd60fa8f35 with PID 8 (/app started by root in /)
> fineract-server_1     | 2022-11-08 19:58:24.017  INFO 8 — [           main] org.apache.fineract.ServerApplication    : No active profile set, falling back to default profiles: basicauth
> fineract-server_1     | 2022-11-08 19:58:30.415  INFO 8 — [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http) 8443 (https)
> fineract-server_1     | 2022-11-08 19:58:31.267 ERROR 8 — [           main] com.zaxxer.hikari.HikariConfig           : Failed to load driver class org.postgresql.Driver from HikariConfig class classloader jdk.internal.loader.ClassLoaders$AppClassLoader@67424e82
> fineract-server_1     | 2022-11-08 19:58:31.273 ERROR 8 — [           main] o.s.b.web.embedded.tomcat.TomcatStarter  : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'securityConfig': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDetailsService': Unsatisfied dependency expressed through field 'platformUserRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appUserRepository' defined in org.apache.fineract.useradmini
> {code}
>  
> Which appears to be ( _Failed to load driver class org.postgresql.Driver from HikariConfig class)_  that the PostgreSQL library is missing in the Docker image of Fineract.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)