MySQL Quits working

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

MySQL Quits working

Postby mattman » Wed Jun 23, 2004 7:24 am

After using Servoy Server 2.0.3 successfully for the last month, things all of a sudden stopped working. I was connecting just fine to a Firebird 1.5 server and MySQL 4 on a RH Enterprise OS (Linux). Turns out I was using the older open source driver that ships with Servoy (Bad, bad, bad if you're using a more recent version of MySQL)

So I upgrade to the latest 3.0.14 (com.mysql.jdbc.Driver) and I start getting connection errors. Fortunately, I can change my privileges in mysql to account for the host that it does not want to allow to connect. Here's the odd thing. It's seeing the host name as something other than what our host name is set for.

Does anyone know if this setting for the host is controlled by mysql or where is servoy getting this host name from? I'm suspect that it's the Tomcat server that Servoy runs that is passing the odd host name to the db server. Here is some of the output from the Servoy server.

Code: Select all
DBCP borrowObject failed: java.sql.SQLException: Data source rejected establishment of connection,  message from server: "Host 'isoproductionsinc.' is not allowed to connect to this MySQL server"


Our server host name is not isoproductionsinc. but rather another name. (See error above or at end below)

Code: Select all
[root@server servoy]# sh ./servoy_server.sh
Looking for servoy.properties on /root/servoy.properties
Loading servoy.properties from /home/servoy/servoy.properties
Loading - Done
DBCP borrowObject failed: java.sql.SQLException: Data source rejected establishment of connection,  message from server: "Host 'isoproductionsinc.' is not allowed to connect to this MySQL server"
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Data source rejected establishment of connection,  message from server: "Host 'isoproductionsinc.' is not allowed to connect to this MySQL server"
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: Data source rejected establishment of connection,  message from server: "Host 'isoproductionsinc.' is not allowed to connect to this MySQL server"
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:85)
        at com.servoy.j2db.persistence.datasource.l.createConnection(Unknown Source)
        at com.servoy.j2db.persistence.datasource.p.makeObject(Unknown Source)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:816)
        at org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
        at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.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.b3(Unknown Source)
        at com.servoy.j2db.persistence.Server.getTable(Unknown Source)
        at com.servoy.j2db.persistence.Repository.a(Unknown Source)
        at com.servoy.j2db.persistence.Repository.a(Unknown Source)
        at com.servoy.j2db.persistence.Repository.a(Unknown Source)
        at com.servoy.j2db.persistence.l.if(Unknown Source)
        at com.servoy.j2db.persistence.Repository.getSolution(Unknown Source)
        at com.servoy.j2db.persistence.Repository.getActiveSolution(Unknown Source)
        at com.servoy.j2db.persistence.Repository.loadAllSolutionsCompletlyInMem(Unknown Source)
        at com.servoy.j2db.server.ApplicationServer.main(Unknown Source)
Caused by: java.sql.SQLException: Data source rejected establishment of connection,  message from server: "Host 'isoproductionsinc.' is not allowed to connect to this MySQL server"
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:645)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:1771)
        at com.mysql.jdbc.Connection.<init>(Connection.java:440)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:83)
        ... 17 more
   
( the above errors repeated many times...)


Using RMI registry on port 1099
DBCP borrowObject failed: java.sql.SQLException: Data source rejected establishment of connection,  message from server: "Host 'isoproductionsinc.' is not allowed to connect to this MySQL server"
DBCP borrowObject failed: java.sql.SQLException: Data source rejected establishment of connection,  message from server: "Host 'isoproductionsinc.' is not allowed to connect to this MySQL server"
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
DBCP borrowObject failed: java.sql.SQLException: Data source rejected establishment of connection,  message from server: "Host 'isoproductionsinc.' is not allowed to connect to this MySQL server"
DBCP borrowObject failed: java.sql.SQLException: Data source rejected establishment of connection,  message from server: "Host 'isoproductionsinc.' is not allowed to connect to this MySQL server"
DBCP borrowObject failed: java.sql.SQLException: Data source rejected establishment of connection,  message from server: "Host 'isoproductionsinc.' is not allowed to connect to this MySQL server"
DBCP borrowObject failed: java.sql.SQLException: Data source rejected establishment of connection,  message from server: "Host 'isoproductionsinc.' is not allowed to connect to this MySQL server"
Final get connection failure for server isonuke in 6 times
Matt Petrowsky
mattman
 
Posts: 160
Joined: Wed Aug 06, 2003 8:23 am
Location: Murrieta, CA

Postby mattman » Wed Jun 23, 2004 7:48 am

Answering my own post here...

With the help of Jan Aleman, it looks like this value is coming from the /etc/hosts file.

It appears that the mysql driver will take the first one that is listed. Since we have multiples this is where the host name was coming from.

For those of you running Servoy on Linux and you're trying to troubleshoot MySQL, make sure you get the latest mysql driver and make sure your hosts file is setup so localhost is first. And, of course, you'll need the proper permissions set up in MySQL.

Good luck!

:wink:
Matt Petrowsky
mattman
 
Posts: 160
Joined: Wed Aug 06, 2003 8:23 am
Location: Murrieta, CA


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 26 guests

cron