[ https://issues.apache.org/jira/browse/FINERACT-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17560617#comment-17560617 ]
Francis Guchie commented on FINERACT-1653: ------------------------------------------ [~avidakovic] I have changed the value and put the IP address of the server database in Column "schema_server" from table "tenant_server_connections" but still it is catching localhost, not sure how to configure the server ip of the database. *but i still fail and get error below* Caused by: java.sql.SQLNonTransientConnectionException: Socket fail to connect to host:localhost, port:3306. Connection refused at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73) at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:188) at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createSocket(AbstractConnectProtocol.java:257) at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(AbstractConnectProtocol.java:524) at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1389) ... 173 common frames omitted Caused by: java.net.ConnectException: Connection refused at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:633) at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createSocket(AbstractConnectProtocol.java:252) ... 175 common frames omitted 2022-06-29 20:01:43.952 WARN 4011 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: 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.useradministration.domain.AppUserRepository defined in @EnableJpaRepositories declared on JPAConfig: Cannot create inner bean '(inner bean)#18961ef0' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#18961ef0': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tenantDatabaseUpgradeService' defined in URL [jar:file:/usr/share/tomcat9/webapps/fineract-provider/WEB-INF/lib/fineract-provider-1.5.1-0d5bace3-plain.jar!/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseUpgradeService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jdbcTenantDetailsService' defined in URL [jar:file:/usr/share/tomcat9/webapps/fineract-provider/WEB-INF/lib/fineract-provider-1.5.1-0d5bace3-plain.jar!/org/apache/fineract/infrastructure/security/service/JdbcTenantDetailsService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hikariTenantDataSource' defined in class path resource [org/apache/fineract/infrastructure/core/config/HikariCpConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'hikariTenantDataSource' threw exception; nested exception is com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Could not connect to address=(host=localhost)(port=3306)(type=master) : Socket fail to connect to host:localhost, port:3306. Connection refused 2022-06-29 20:01:43.982 INFO 4011 --- [ main] ConditionEvaluationReportLoggingListener : > Cannot boot Apache Fineract if database is not on local host and password is > not the default > -------------------------------------------------------------------------------------------- > > Key: FINERACT-1653 > URL: https://issues.apache.org/jira/browse/FINERACT-1653 > Project: Apache Fineract > Issue Type: Improvement > Affects Versions: 1.7.0 > Reporter: Francis Guchie > Priority: Major > Fix For: 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0 > > > As a user, i would like to setup apache fineract in a live production where > the database server is separate from the ui server with a different root > password from usual. > In the latest release, 1.7.0, there is a pre-compiled jar by the names of > fineract-provider-1.5.1-0d5bace3-plain.jar which is used during boot up of > Apache-Fineract. > As such, the user gets an error shown below ( amongst others ) > Error creating bean with name '(inner bean)#10ee8a73': > Cannot resolve reference to bean 'entityManagerFactory' while setting > constructor argument; nested exception is > org.springframework.beans.factory.UnsatisfiedDependencyException: Error > creating bean with name 'tenantDatabaseUpgradeService' defined in URL > [jar:file:{*}/usr/share/tomcat9/webapps/fineract-provider/WEB-INF/lib/fineract-provider-1.5.1-0d5bace3-plain.jar{*}! > /org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseUpgradeService.class]: > Unsatisfied dependency expressed through constructor parameter 0; > nested exception is > org.springframework.beans.factory.UnsatisfiedDependencyException: Error > creating bean with name 'jdbcTenantDetailsService' > defined in URL > [jar:file:/{*}usr/share/tomcat9/webapps/fineract-provider/WEB-INF/lib/fineract-provider-1.5.1-0d5bace3-plain.jar!{*} > this means users will not be able to deploy Mifos without using the default > root password and if they have the database and ui on different servers. > IN release 1.6.0, tomcat deployment users had the opportunity to edit the > following files after a first boot up when the war file is deployed ( > *......webapps/fineract-provider/WEB-INF/classes/META-INF/spring/jdbc.properties* > *.....webapps/fineract-provider/WEB-INF/classes/META-INF/spring/hikariDataSource.xml* > -- This message was sent by Atlassian Jira (v8.20.10#820010)