Discussion:
[JIRA] Created: (MYO-54) Myosotis connector does not support connections from PostgreSQL JDBC driver
Robert Hodges (JIRA)
2008-03-14 07:35:44 UTC
Permalink
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.
--
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
Robert Hodges (JIRA)
2008-03-14 07:37:43 UTC
Permalink
[ https://forge.continuent.org/jira/browse/MYO-54?page=comments#action_14342 ]

Robert Hodges commented on MYO-54:
----------------------------------

If this is something simple I would appreciate a quick fix, as I'm running benchmarks for a PostgreSQL East conference presentation and would like to include Myosotis results. Myosotis performance on MySQL is about 2800 queries per second.
Post by Robert Hodges (JIRA)
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
Assignee: 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
Marc Herbert (JIRA)
2008-03-14 09:22:18 UTC
Permalink
[ https://forge.continuent.org/jira/browse/MYO-54?page=comments#action_14343 ]

Marc Herbert commented on MYO-54:
---------------------------------

Since this looks like a protocol error, it might be instructive to test an older 7.x JDBC drivers as well connecting from different versions of the (non-Java) psql client.
Even faster, trying to change connection options like "protocolVersion" might prove useful:
<http://jdbc.postgresql.org/documentation/83/connect.html#connection-parameters>
Post by Robert Hodges (JIRA)
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
Assignee: 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
Gilles Rayrat (JIRA)
2008-03-14 10:49:43 UTC
Permalink
[ https://forge.continuent.org/jira/browse/MYO-54?page=comments#action_14344 ]

Gilles Rayrat commented on MYO-54:
----------------------------------

Well spotted Marc, thanks :)

I tested with jdbc driver version 7.4 and it works
7.3 and earlier versions use protocol V2, which we don't support.
By the way, the "protocolVersion" option only allows to switch between V2 and V3. As we support only V3, it's useless for this case

Now we need to figure out what changed between 7.4 and 8.x
Post by Robert Hodges (JIRA)
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
Assignee: 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
Gilles Rayrat (JIRA)
2008-03-14 10:53:43 UTC
Permalink
[ https://forge.continuent.org/jira/browse/MYO-54?page=comments#action_14345 ]

Gilles Rayrat commented on MYO-54:
----------------------------------

Note that changing the server version myosotis declares itself as has no effect. I tried with both 8.X and 7.X (in myosotis.properties => server.version)
Post by Robert Hodges (JIRA)
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
Assignee: 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
Robert Hodges (JIRA)
2008-03-14 14:20:43 UTC
Permalink
[ https://forge.continuent.org/jira/browse/MYO-54?page=comments#action_14346 ]

Robert Hodges commented on MYO-54:
----------------------------------

Thanks Marc and Gilles for the tip on the PG 7.4 JDBC driver. I will try this for performance testing - I'm trying to get numbers on throughput for now, which has little dependency on the client.
Post by Robert Hodges (JIRA)
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
Assignee: 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
Robert Hodges (JIRA)
2008-03-14 14:54:43 UTC
Permalink
[ https://forge.continuent.org/jira/browse/MYO-54?page=comments#action_14348 ]

Robert Hodges commented on MYO-54:
----------------------------------

PG 7.4 is successful. As a reward I'm attaching sample test results. Testing against connector installed on a dual CPU 2-core SC 1425 and going against postgreSQL installed on the same host, I get up to 3000 queries per second throughput. It looks as if there may be some internal overhead in processing thread context switches as we top out at 3000 at 10 threads but go down thereafter. The CPUs are not fully allocated.
Post by Robert Hodges (JIRA)
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
Assignee: 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
Gilles Rayrat (JIRA)
2008-03-14 15:47:44 UTC
Permalink
[ https://forge.continuent.org/jira/browse/MYO-54?page=comments#action_14350 ]

Gilles Rayrat commented on MYO-54:
----------------------------------

Very interesting. Do you see the same problem with mysql protocol ?
Post by Robert Hodges (JIRA)
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
Assignee: Gilles Rayrat
Priority: Blocker
Attachments: rs3.html
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
Gilles Rayrat (JIRA)
2008-06-13 08:27:30 UTC
Permalink
[ https://forge.continuent.org/jira/browse/MYO-54?page=comments#action_14637 ]

Gilles Rayrat commented on MYO-54:
----------------------------------

Issue is in the connection strings sent by myosotis: server parameter "client_encoding" should be "UNICODE" instead of "UTF-8"
Note that the fix is backward compatible with 7.4
Post by Robert Hodges (JIRA)
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
Assignee: Gilles Rayrat
Priority: Blocker
Fix For: 0.7
Attachments: rs3.html
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
Gilles Rayrat (JIRA)
2008-06-13 08:37:29 UTC
Permalink
[ https://forge.continuent.org/jira/browse/MYO-54?page=all ]

Gilles Rayrat resolved MYO-54:
------------------------------

Resolution: Fixed

Fix in trunk, waiting for backport in 0.7 branch to close case
Post by Robert Hodges (JIRA)
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
Assignee: Gilles Rayrat
Priority: Blocker
Fix For: 0.7
Attachments: rs3.html
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
Gilles Rayrat (JIRA)
2009-08-07 11:02:46 UTC
Permalink
[ https://forge.continuent.org/jira/browse/MYO-54?page=all ]

Gilles Rayrat closed MYO-54:
----------------------------


Will not backport in 0.7 - closing
Post by Robert Hodges (JIRA)
Myosotis connector does not support connections from PostgreSQL JDBC driver
---------------------------------------------------------------------------
Key: MYO-54
URL: https://forge.continuent.org/jira/browse/MYO-54
Project: Tungsten Connector
Type: Bug
Components: PostgreSQL protocol
Environment: PostgreSQL 8.1 and 8.2 JDBC driver
Reporter: Robert Hodges
Assignee: Gilles Rayrat
Priority: Blocker
Fix For: 0.7
Attachments: rs3.html
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
Gilles Rayrat (JIRA)
2010-02-08 19:51:46 UTC
Permalink
[ https://forge.continuent.org/jira/browse/MYO-54?page=all ]

Gilles Rayrat reopened MYO-54:
------------------------------


Re-opening to edit fix version
Post by Robert Hodges (JIRA)
Myosotis connector does not support connections from PostgreSQL JDBC driver
---------------------------------------------------------------------------
Key: MYO-54
URL: https://forge.continuent.org/jira/browse/MYO-54
Project: Tungsten Connector
Type: Bug
Components: PostgreSQL protocol
Environment: PostgreSQL 8.1 and 8.2 JDBC driver
Reporter: Robert Hodges
Assignee: Gilles Rayrat
Priority: Blocker
Fix For: 0.6.8
Attachments: rs3.html
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
Gilles Rayrat (JIRA)
2010-02-08 19:53:47 UTC
Permalink
[ https://forge.continuent.org/jira/browse/MYO-54?page=all ]

Gilles Rayrat closed MYO-54:
----------------------------

Resolution: Fixed
Post by Robert Hodges (JIRA)
Myosotis connector does not support connections from PostgreSQL JDBC driver
---------------------------------------------------------------------------
Key: MYO-54
URL: https://forge.continuent.org/jira/browse/MYO-54
Project: Tungsten Connector
Type: Bug
Components: PostgreSQL protocol
Environment: PostgreSQL 8.1 and 8.2 JDBC driver
Reporter: Robert Hodges
Assignee: Gilles Rayrat
Priority: Blocker
Fix For: 0.6.8
Attachments: rs3.html
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
Loading...