Robert Hodges (JIRA)
2008-03-14 07:35:44 UTC
Myosotis connector does not support connections from PostgreSQL JDBC driver
---------------------------------------------------------------------------
Key: MYO-54
URL: https://forge.continuent.org/jira/browse/MYO-54
Project: Myosotis
Type: Bug
Components: PostgreSQL protocol
Environment: PostgreSQL 8.1 and 8.2 JDBC driver
Reporter: Robert Hodges
Assigned to: Gilles Rayrat
Priority: Blocker
Mysotis does not correctly handle client connections from PostgreSQL JDBC drivers. This occurs with both 8.1 and 8.2 versions. On the client side the following exception appears when connecting. (Example is from a Bristlecone performance test scenario.)
22:50:10,692 FATAL Benchmark execution failed due to unexpected exception
com.continuent.bristlecone.benchmark.BenchmarkException: Unable to initialize scenario class: com.continuent.bristlecone.benchmark.scenarios.QueryScenario
at com.continuent.bristlecone.benchmark.Benchmark.runBenchmark(Benchmark.java:216)
at com.continuent.bristlecone.benchmark.Benchmark.go(Benchmark.java:165) at com.continuent.bristlecone.benchmark.BenchmarkLauncher.main(BenchmarkLauncher.java:101)
Caused by: org.postgresql.util.PSQLException: Protocol error. Session setup failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:470)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:98)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:116)
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:369)
at org.postgresql.Driver.connect(Driver.java:245)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.continuent.bristlecone.benchmark.db.TableSetHelper.getConnection(TableSetHelper.java:243)
at com.continuent.bristlecone.benchmark.scenarios.ScenarioBase.initialize(ScenarioBase.java:131)
at com.continuent.bristlecone.benchmark.Benchmark.runBenchmark(Benchmark.java:197)
... 2 more
Benchmark execution failed...See log for detailed stack trace(s)
EXCEPTION: Unable to initialize scenario class: com.continuent.bristlecone.benchmark.scenarios.QueryScenario
SUB-EXCEPTION: Protocol error. Session setup failed.
On the myosotis side the following messages appears in the logs. I enabled DEBUG messages to try to get additional information.
INFO | jvm 1 | 2008/03/13 22:50:10 | DEBUG [PostgreSQLConnectionHandler] -
Start serving client: /172.16.10.1:57760
INFO | jvm 1 | 2008/03/13 22:50:10 | DEBUG [PostgreSQLProtocolHandler] - User = cluster database = test2
INFO | jvm 1 | 2008/03/13 22:50:10 | DEBUG [PostgreSQLProtocolHandler] - Connect string: jdbc:postgresql://pelican/test2
INFO | jvm 1 | 2008/03/13 22:50:10 | DEBUG [PostgreSQLProtocolHandler] - User: cluster Password: secret
INFO | jvm 1 | 2008/03/13 22:50:10 | ERROR [PostgreSQLConnectionHandler] -
Socket error, closing connection: /172.16.10.1:57760
INFO | jvm 1 | 2008/03/13 22:50:10 | java.io.EOFException
INFO | jvm 1 | 2008/03/13 22:50:10 | at java.io.DataInputStream.readByte(DataInputStream.java:243)
INFO | jvm 1 | 2008/03/13 22:50:10 | at org.continuent.myosotis.protocol.postgresql.PostgreSQLPacket.<init>(PostgreSQLPacket.java:54)
INFO | jvm 1 | 2008/03/13 22:50:10 | at org.continuent.myosotis.protocol.postgresql.PostgreSQLProtocolHandler.handleCommand(PostgreSQLProtocolHandler.java:320)
INFO | jvm 1 | 2008/03/13 22:50:10 | at org.continuent.myosotis.protocol.postgresql.PostgreSQLProtocolHandler.handleClientRequest(PostgreSQLProtocolHandler.java:143)
INFO | jvm 1 | 2008/03/13 22:50:10 | at org.continuent.myosotis.protocol.postgresql.PostgreSQLConnectionHandler.run(PostgreSQLConnectionHandler.java:72)
INFO | jvm 1 | 2008/03/13 22:50:10 | at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
INFO | jvm 1 | 2008/03/13 22:50:10 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
INFO | jvm 1 | 2008/03/13 22:50:10 | at java.lang.Thread.run(Thread.java:595)
INFO | jvm 1 | 2008/03/13 22:50:10 | DEBUG [PostgreSQLConnectionHandler] -
Stop serving client: /172.16.10.1:57760
Myosotis works fine with psql, so there's no problem. Also, the current version of myosotis does not have a problem with the MySQL connector/J driver. This seems to be specific to PostgreSQL JDBC drivers.
---------------------------------------------------------------------------
Key: MYO-54
URL: https://forge.continuent.org/jira/browse/MYO-54
Project: Myosotis
Type: Bug
Components: PostgreSQL protocol
Environment: PostgreSQL 8.1 and 8.2 JDBC driver
Reporter: Robert Hodges
Assigned to: Gilles Rayrat
Priority: Blocker
Mysotis does not correctly handle client connections from PostgreSQL JDBC drivers. This occurs with both 8.1 and 8.2 versions. On the client side the following exception appears when connecting. (Example is from a Bristlecone performance test scenario.)
22:50:10,692 FATAL Benchmark execution failed due to unexpected exception
com.continuent.bristlecone.benchmark.BenchmarkException: Unable to initialize scenario class: com.continuent.bristlecone.benchmark.scenarios.QueryScenario
at com.continuent.bristlecone.benchmark.Benchmark.runBenchmark(Benchmark.java:216)
at com.continuent.bristlecone.benchmark.Benchmark.go(Benchmark.java:165) at com.continuent.bristlecone.benchmark.BenchmarkLauncher.main(BenchmarkLauncher.java:101)
Caused by: org.postgresql.util.PSQLException: Protocol error. Session setup failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:470)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:98)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:116)
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:369)
at org.postgresql.Driver.connect(Driver.java:245)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.continuent.bristlecone.benchmark.db.TableSetHelper.getConnection(TableSetHelper.java:243)
at com.continuent.bristlecone.benchmark.scenarios.ScenarioBase.initialize(ScenarioBase.java:131)
at com.continuent.bristlecone.benchmark.Benchmark.runBenchmark(Benchmark.java:197)
... 2 more
Benchmark execution failed...See log for detailed stack trace(s)
EXCEPTION: Unable to initialize scenario class: com.continuent.bristlecone.benchmark.scenarios.QueryScenario
SUB-EXCEPTION: Protocol error. Session setup failed.
On the myosotis side the following messages appears in the logs. I enabled DEBUG messages to try to get additional information.
INFO | jvm 1 | 2008/03/13 22:50:10 | DEBUG [PostgreSQLConnectionHandler] -
Start serving client: /172.16.10.1:57760
INFO | jvm 1 | 2008/03/13 22:50:10 | DEBUG [PostgreSQLProtocolHandler] - User = cluster database = test2
INFO | jvm 1 | 2008/03/13 22:50:10 | DEBUG [PostgreSQLProtocolHandler] - Connect string: jdbc:postgresql://pelican/test2
INFO | jvm 1 | 2008/03/13 22:50:10 | DEBUG [PostgreSQLProtocolHandler] - User: cluster Password: secret
INFO | jvm 1 | 2008/03/13 22:50:10 | ERROR [PostgreSQLConnectionHandler] -
Socket error, closing connection: /172.16.10.1:57760
INFO | jvm 1 | 2008/03/13 22:50:10 | java.io.EOFException
INFO | jvm 1 | 2008/03/13 22:50:10 | at java.io.DataInputStream.readByte(DataInputStream.java:243)
INFO | jvm 1 | 2008/03/13 22:50:10 | at org.continuent.myosotis.protocol.postgresql.PostgreSQLPacket.<init>(PostgreSQLPacket.java:54)
INFO | jvm 1 | 2008/03/13 22:50:10 | at org.continuent.myosotis.protocol.postgresql.PostgreSQLProtocolHandler.handleCommand(PostgreSQLProtocolHandler.java:320)
INFO | jvm 1 | 2008/03/13 22:50:10 | at org.continuent.myosotis.protocol.postgresql.PostgreSQLProtocolHandler.handleClientRequest(PostgreSQLProtocolHandler.java:143)
INFO | jvm 1 | 2008/03/13 22:50:10 | at org.continuent.myosotis.protocol.postgresql.PostgreSQLConnectionHandler.run(PostgreSQLConnectionHandler.java:72)
INFO | jvm 1 | 2008/03/13 22:50:10 | at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
INFO | jvm 1 | 2008/03/13 22:50:10 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
INFO | jvm 1 | 2008/03/13 22:50:10 | at java.lang.Thread.run(Thread.java:595)
INFO | jvm 1 | 2008/03/13 22:50:10 | DEBUG [PostgreSQLConnectionHandler] -
Stop serving client: /172.16.10.1:57760
Myosotis works fine with psql, so there's no problem. Also, the current version of myosotis does not have a problem with the MySQL connector/J driver. This seems to be specific to PostgreSQL JDBC drivers.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira