Connection to the database failed! on installation

Questions and answers for all installation-related topics for Servoy products

Connection to the database failed! on installation

Postby bobm » Wed Jul 31, 2013 5:31 pm

I are having to install the Server on a new Cloud Instance and I am running into a problem.
I have loaded pgadmin and restored all databases with no problems. The issue I am having is when installing Servoy 6.1

When I run the Verify Connection at the beginning of the Servoy install - I get "Connection to the database failed!"

Because the pgadmin in the Servoy server install was a lower version I installed pgadmin separately and am using the Connect to an existing Database option on the install.

The Server URL: jdbc:posgresql://localhost:5432
The JDBC driver classname: org.postgresql.Driver
The user name: postgres
and password is entered correctly

What could I be missing?

Thanks,
Bob
Bob Mezzadri
EyeCOR By Nteon
bobm
 
Posts: 81
Joined: Thu Dec 29, 2011 8:24 pm

Re: Connection to the database failed! on installation

Postby bobm » Wed Jul 31, 2013 9:23 pm

update: I was able to get everything installed - the initial problem was two fold -
1: the ports 8080 and 1099 needed to be open
2: java 64 needed t be installed.

However now there is an issue with the Service not remaining "Started" - below is some information from the log file

2013-07-31 15:09:33,709 ERROR [WrapperSimpleAppMain] com.servoy.j2db.util.Debug - Cannot start repository: [ ]
com.servoy.j2db.persistence.RepositoryException: Error checking repository
at com.servoy.j2db.server.Za.Za.Zb(Za.java:34)
at com.servoy.j2db.server.Za.Za.<init>(Za.java:1684)
at com.servoy.j2db.server.Za.Za.<init>(Za.java:706)
at com.servoy.j2db.server.Za.Zo.Za(Zo.java:8)
at com.servoy.j2db.server.main.ApplicationServer.main(ApplicationServer.java:686)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:238)
at java.lang.Thread.run(Unknown Source)
Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at com.servoy.j2db.datasource.Zp.createConnection(Zp.java:5)
at com.servoy.j2db.datasource.Ze.createConnection(Ze.java:5)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1158)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at com.servoy.j2db.datasource.Za.getConnection(Za.java:14)
at com.servoy.j2db.datasource.jmx.ManagedBasicPoolingDataSource.getConnection(ManagedBasicPoolingDataSource.java:34)
at com.servoy.j2db.server.Za.Zo.getRawConnection(Zo.java:1272)
at com.servoy.j2db.server.Za.Zo.Zf(Zo.java:644)
at com.servoy.j2db.server.Za.Za.Zb(Za.java:1625)
... 10 more
2013-07-31 15:09:33,724 ERROR [WrapperSimpleAppMain] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database! [ ]
Bob Mezzadri
EyeCOR By Nteon
bobm
 
Posts: 81
Joined: Thu Dec 29, 2011 8:24 pm

Re: Connection to the database failed! on installation

Postby jcompagner » Thu Aug 01, 2013 10:43 am

your password is not correct, or your are not talking to the posgresql instance that you think you are talking to.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Connection to the database failed! on installation

Postby bobm » Thu Aug 01, 2013 4:30 pm

Thanks Johan,

During the installation the connection and password was verified - How can I set this password after the installation has completed? The password in the servoy.properties file is encrypted

Bob
Bob Mezzadri
EyeCOR By Nteon
bobm
 
Posts: 81
Joined: Thu Dec 29, 2011 8:24 pm

Re: Connection to the database failed! on installation

Postby jcompagner » Thu Aug 01, 2013 4:42 pm

you can write your real password in the servoy.properties, so straight over the encrypted value
to see if that works
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Connection to the database failed! on installation

Postby bobm » Thu Aug 01, 2013 5:20 pm

after setting the passwords to the real passwords for each of the databases II now get the following in the server_log file
2013-08-01 11:13:46,701 ERROR [pool-1-thread-1] com.servoy.j2db.server.Za.Zo - Final get connection failure for server abbrev in 1 times [ ]


Also when I look at the command window I have this additional information

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: C:\Servoy\application_server\servoy_log.txt (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:428)
at com.servoy.j2db.server.main.ApplicationServer.initLoggingSystem(ApplicationServer.java:274)
at com.servoy.j2db.server.main.ApplicationServer.main(ApplicationServer.java:128)
Exception in thread "pool-1-thread-1" java.lang.NoSuchMethodError: com.hxtt.sql.dp.a(ILjava/lang/String;Ljava/util/Properties;)Lcom/hxtt/concurrent/aa;
at com.hxtt.sql.access.EmbeddedDriver.connect(Unknown Source)
at com.hxtt.global.SQLState.getConnection(Unknown Source)
at com.hxtt.sql.HxttDriver.if(Unknown Source)
at com.hxtt.sql.HxttDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at com.servoy.j2db.datasource.Zp.createConnection(Zp.java:5)
at com.servoy.j2db.datasource.Ze.createConnection(Ze.java:5)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1158)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at com.servoy.j2db.datasource.Za.getConnection(Za.java:14)
at com.servoy.j2db.datasource.jmx.ManagedBasicPoolingDataSource.getConnection(ManagedBasicPoolingDataSource.java:34)
at com.servoy.j2db.server.Za.Zo.getRawConnection(Zo.java:1272)
at com.servoy.j2db.server.Za.Zo.Zf(Zo.java:644)
at com.servoy.j2db.server.Za.Zo.Za(Zo.java:721)
at com.servoy.j2db.server.Za.Zo.Zk(Zo.java:1044)
at com.servoy.j2db.server.Za.Zo.getTableAndViewNames(Zo.java:819)
at com.servoy.j2db.server.Za.Zo.getTableAndViewNames(Zo.java:268)
at com.servoy.j2db.server.main.Zs.run(Zs.java:31)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "main" java.lang.NoSuchMethodError: com.hxtt.sql.dp.a(ILjava
/lang/String;Ljava/util/Properties;)Lcom/hxtt/concurrent/aa;
at com.hxtt.sql.access.EmbeddedDriver.connect(Unknown Source)
at com.hxtt.global.SQLState.getConnection(Unknown Source)
at com.hxtt.sql.HxttDriver.if(Unknown Source)
at com.hxtt.sql.HxttDriver.connect(Unknown Source)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at com.servoy.j2db.datasource.Zp.createConnection(Zp.java:5)
at com.servoy.j2db.datasource.Ze.createConnection(Ze.java:5)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1158)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at com.servoy.j2db.datasource.Za.getConnection(Za.java:14)
at com.servoy.j2db.datasource.jmx.ManagedBasicPoolingDataSource.getConnection(ManagedBasicPoolingDataSource.java:34)
at com.servoy.j2db.server.Za.Zo.getRawConnection(Zo.java:1272)
at com.servoy.j2db.server.Za.Zo.Zf(Zo.java:644)
at com.servoy.j2db.server.Za.Zo.Za(Zo.java:721)
at com.servoy.j2db.server.Za.Zo.Zk(Zo.java:1044)
at com.servoy.j2db.server.Za.Zo.getTable(Zo.java:38)
at com.servoy.j2db.server.Za.Zo.getTable(Zo.java:1428)
at com.servoy.j2db.persistence.ServerProxy.getTable(ServerProxy.java:84)

at com.servoy.j2db.server.Za.Za.Za(Za.java:582)
at com.servoy.j2db.server.Za.Za.loadRootObject(Za.java:903)
at com.servoy.j2db.persistence.RootObjectCache.getRootObject(RootObjectCache.java:226)
at com.servoy.j2db.persistence.RootObjectCache.getActiveRootObject(RootObjectCache.java:160)
at com.servoy.j2db.persistence.AbstractRepository.getActiveRootObject(AbstractRepository.java:421)
at com.servoy.j2db.server.main.ApplicationServer.loadAllSolutionsCompletelyInMem(ApplicationServer.java:432)
at com.servoy.j2db.server.main.ApplicationServer.main(ApplicationServer.java:433)
Bob Mezzadri
EyeCOR By Nteon
bobm
 
Posts: 81
Joined: Thu Dec 29, 2011 8:24 pm

Re: Connection to the database failed! on installation

Postby jcompagner » Thu Aug 01, 2013 5:50 pm

the process has no rights to save into that dir somehow at least thats the first part
the second part is a bit weird but that could be the result of the the first.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Connection to the database failed! on installation

Postby bobm » Thu Aug 01, 2013 8:20 pm

Thanks Johan,
I was able to get the server up and running now onto the client application.

Thanks again,
Bob
Bob Mezzadri
EyeCOR By Nteon
bobm
 
Posts: 81
Joined: Thu Dec 29, 2011 8:24 pm

Re: Connection to the database failed! on installation

Postby akaash » Fri Jan 10, 2014 10:59 pm

I entered the password in straight into the properties file. I'm also doing a cloud installaiton and got all the exact same problems, although for me my ' "FATAL: password authentication failed for user "postgres" ' is still showing up.

This is the error output from the log file:
2014-01-10 20:43:08,750 ERROR [main] com.servoy.j2db.util.Debug - Cannot start repository: [ ]
com.servoy.j2db.persistence.RepositoryException: Error checking repository
at com.servoy.j2db.server.Za.Za.Zb(Za.java:1664)
at com.servoy.j2db.server.Za.Za.<init>(Za.java:155)
at com.servoy.j2db.server.Za.Za.<init>(Za.java:1280)
at com.servoy.j2db.server.Za.Zo.Za(Zo.java:1380)
at com.servoy.j2db.server.main.ApplicationServer.main(ApplicationServer.java:59)
Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
at org.postgresql.Driver.makeConnection(Driver.java:393)
at org.postgresql.Driver.connect(Driver.java:267)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at com.servoy.j2db.datasource.Zp.createConnection(Zp.java:3)
at com.servoy.j2db.datasource.Ze.createConnection(Ze.java:1)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1158)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at com.servoy.j2db.datasource.Za.getConnection(Za.java:40)
at com.servoy.j2db.datasource.jmx.ManagedBasicPoolingDataSource.getConnection(ManagedBasicPoolingDataSource.java:39)
at com.servoy.j2db.server.Za.Zo.getRawConnection(Zo.java:866)
at com.servoy.j2db.server.Za.Zo.Zf(Zo.java:886)
at com.servoy.j2db.server.Za.Za.Zb(Za.java:1056)
... 4 more
2014-01-10 20:43:08,759 ERROR [main] com.servoy.j2db.util.Debug - Do note Servoy server does not start any database! [ ]



This is the properties file:
# Servoy properties file
# NOTE: At least one connection must be called 'repository_server' !!
# Number of servers defined in this file
ServerManager.numberOfServers=1
# Definition 1
server.0.serverName=repository_server
server.0.URL=jdbc:postgresql://localhost:5432/servoy_repository
server.0.driver=org.postgresql.Driver
server.0.userName=postgres
server.0.password=****** (I'm sure the password is right)
server.0.catalog=<none>#start database enginenativeStartupLauncher=%%user.dir%%\\postgres_db\\bin\\pg_ctl|start|-D|database|-l|postgres_db\\postgres_log.txt
waitForNativeStartup=falsenativeShutdownLauncher=%%user.dir%%\\postgres_db\\bin\\pg_ctl|stop|-D|database|-l|postgres_db\\postgres_log.txt#for use by pdf_forms plugin
pdf_forms_plugin_servername=pdf_forms#network configSocketFactory.useTwoWaySocket=trueSocketFactory.useSSL=truejava.rmi.server.hostname=localhost
akaash
 
Posts: 30
Joined: Fri Jan 25, 2013 4:58 pm
Location: Montréal

Re: Connection to the database failed! on installation

Postby david » Sat Jan 11, 2014 2:12 am

akaash wrote:I entered the password in straight into the properties file.


Are you entering the password or the encrypted version of your password? Needs to be encrypted and look something like this:

Code: Select all
server.1.password=encrypted\:r63HS2VdZOM\=
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: Connection to the database failed! on installation

Postby jcompagner » Sun Jan 12, 2014 1:06 pm

a plain text password should work, if you save it again (through admin pages) then we store the encrypted version of them again.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Connection to the database failed! on installation

Postby akaash » Mon Jan 13, 2014 4:44 pm

Hi Johan, I can't really get to the admin page since I can't start the server in the first place... Also, I went in and manually changed the server.0.userName, it was orginally DBA even though I specified postgres in the installation not sure why this would have been either...
akaash
 
Posts: 30
Joined: Fri Jan 25, 2013 4:58 pm
Location: Montréal


Return to Installation

Who is online

Users browsing this forum: No registered users and 7 guests