DB unavailable during server startup

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

DB unavailable during server startup

Postby automazione » Mon Feb 09, 2004 6:30 pm

When I try to start the server R2 2.0 RC3 (W2K or XP) if one of the DB defined in the preferences is not accessible the server tries to connect to it indefinitively (with no timeout) and Servoy Server does not complete the startup and is not available for the clients...

If all the DB were accessible at startup the server keeps working OK when one of the connected DB goes down...

I would prefer a short time-out at startup (or not connection test at all)

thank you in advance
Enrico Arata
Servoy Italia
automazione
 
Posts: 366
Joined: Thu Apr 24, 2003 11:37 am
Location: Torino, Italy

Postby sebster » Wed Feb 11, 2004 8:21 pm

I will look into this on Friday, it should be fixed in 2.0 RC6.
Sebastiaan van Erk
Servoy
sebster
 
Posts: 251
Joined: Thu Apr 24, 2003 10:03 am
Location: Utrecht, The Netherlands

Postby sebster » Fri Feb 13, 2004 12:32 pm

Hi, can you tell me exactly what kind of database failure you are experiencing when Servoy server fails to start up completely. For I have tested multiple possible failures, and Servoy server has started up properly in every case. Is it the repository database or another database which is not accessible, and what are the errors/exceptions that are reported? If possible mail me the server log file which contains traces of the relevant exceptions.
Sebastiaan van Erk
Servoy
sebster
 
Posts: 251
Joined: Thu Apr 24, 2003 10:03 am
Location: Utrecht, The Netherlands

Postby automazione » Wed Feb 18, 2004 10:31 am

Hi Sebastiaan,
and many thanks in advance...

is not the repository DB but a data DB. the MYSQL is on a machine of one of my costumers that is firewall-protected by an AIC. If I log into the AIC before starting servoy (opening ports 1099 3060 8080) everything goes OK but If I start servoy-server without logging into the AIC the following log is generated... and server never goes up ...
Looking for servoy.properties on C:\Documents and Settings\Enrico\servoy.propert
ies
Loading servoy.properties from C:\Servoy\servoy.properties - Done
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
DBCP borrowObject failed: java.sql.SQLException: Cannot connect to MySQL server
on 81.116.158.130:3306. Is there a MySQL server running on the machine/port you
are trying to connect to? (java.net.ConnectException)
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Cannot connect to
MySQL server on 81.116.158.130:3306. Is there a MySQL server running on the mach
ine/port you are trying to connect to? (java.net.ConnectException)
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Cannot connect to
MySQL server on 81.116.158.130:3306. Is there a MySQL server running on the mach
ine/port you are trying to connect to? (java.net.ConnectException)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
erConnectionFactory.java:85)
at com.servoy.j2db.persistence.datasource.l.createConnection(Unknown Sou
rce)
at com.servoy.j2db.persistence.datasource.p.makeObject(Unknown Source)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown S
ource)
at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObj
ectPool.java:117)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSo
urce.java:110)
at com.servoy.j2db.persistence.datasource.h.getConnection(Unknown Source
)
at com.servoy.j2db.persistence.Server.getConnection(Unknown Source)
at com.servoy.j2db.persistence.Server.bQ(Unknown Source)
at com.servoy.j2db.persistence.Server.getTableNames(Unknown Source)
at com.servoy.j2db.server.ApplicationServer$a.run(Unknown Source)
at com.servoy.j2db.util.ap.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Cannot connect to MySQL server on 81.116.158.1
30:3306. Is there a MySQL server running on the machine/port you are trying to c
onnect to? (java.net.ConnectException)
at org.gjt.mm.mysql.Connection.connectionInit(Connection.java)
at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Connection.java)
at org.gjt.mm.mysql.Driver.connect(Driver.java)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
erConnectionFactory.java:83)
... 12 more
Enrico Arata
Servoy Italia
automazione
 
Posts: 366
Joined: Thu Apr 24, 2003 11:37 am
Location: Torino, Italy

Postby jcompagner » Wed Feb 18, 2004 11:27 am

The server never goes up?
that is very strange because looking at the output, youre server is up and running! (at least the webserver is.. Can't you access the start page??)

piece of youre log:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1

that means that the webserver is up and running.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby automazione » Wed Feb 18, 2004 11:43 am

No...

:8080 and :8080/servoy-admin do NOT answer
Enrico Arata
Servoy Italia
automazione
 
Posts: 366
Joined: Thu Apr 24, 2003 11:37 am
Location: Torino, Italy

Postby jcompagner » Wed Feb 18, 2004 12:36 pm

and if you remove that mysql server entry from the properties it does?

Do you also get an error after you make the first request to the server?
(if you first wait for all to go by)

are you sure that it is port 8080?
Does the server.xml file in youre SERVOY\server\conf dir really have 8080 in this portion:

<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8080" minProcessors="1" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="60000"/>

(see port="8080")
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby automazione » Wed Feb 18, 2004 12:53 pm

and if you remove that mysql server entry from the properties it does?


YES work fine

Do you also get an error after you make the first request to the server?
(if you first wait for all to go by)


No - no error when i remove the mysql server and restart servoy and log in with a client

are you sure that it is port 8080?
Does the server.xml file in youre SERVOY\server\conf dir really have 8080 in this portion:


YES

I'm sending you by e-mail the db parameters if you want to try...
Enrico Arata
Servoy Italia
automazione
 
Posts: 366
Joined: Thu Apr 24, 2003 11:37 am
Location: Torino, Italy

Postby jcompagner » Wed Feb 18, 2004 1:11 pm

look i have here the same stacktrace as you have:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
DBCP borrowObject failed: java.sql.SQLException: Unable to connect to any hosts
due to exception: java.net.ConnectException: Connection timed out: connect
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Unable to connect
to any hosts due to exception: java.net.ConnectException: Connection timed out:
connect
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Unable to connect
to any hosts due to exception: java.net.ConnectException: Connection timed out:
connect
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
erConnectionFactory.java:85)
at com.servoy.j2db.persistence.datasource.l.createConnection(Unknown Sou
rce)
at com.servoy.j2db.persistence.datasource.p.makeObject(Unknown Source)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown S
ource)
at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObj
ectPool.java:117)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSo
urce.java:110)
at com.servoy.j2db.persistence.datasource.h.getConnection(Unknown Source
)
at com.servoy.j2db.persistence.Server.getConnection(Unknown Source)
at com.servoy.j2db.persistence.Server.bQ(Unknown Source)
at com.servoy.j2db.persistence.Server.getTableNames(Unknown Source)
at com.servoy.j2db.server.ApplicationServer$a.run(Unknown Source)
at com.servoy.j2db.util.ap.run(Unknown Source)
at java.lang.Thread.run(Thread.java:566)
Caused by: java.sql.SQLException: Unable to connect to any hosts due to exceptio
n: java.net.ConnectException: Connection timed out: connect
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1797)
at com.mysql.jdbc.Connection.<init>(Connection.java:562)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:361)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(Driv
erConnectionFactory.java:83)
... 12 more


but after that i can perfectly get to http://localhost:8080/index.html
Because a failure of a server doesn't have anything to do with the webserver that servers the index.html.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby automazione » Wed Feb 18, 2004 3:06 pm

Hi Johan.. well... ehemm... :oops: ... now works fine also for me....

I have been trying from two different client machines.. . with no success

I started the client on the same server.. worked ok

I flushed the cache of java and of explorer from the client machines... NOW everything works fine.... would like to understand why but... :?:

Thanks a lot!!!

bye
Enrico Arata
Servoy Italia
automazione
 
Posts: 366
Joined: Thu Apr 24, 2003 11:37 am
Location: Torino, Italy


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 9 guests