gitbase icon indicating copy to clipboard operation
gitbase copied to clipboard

Error when connecting from JDBC MariaDB driver

Open ajnavarro opened this issue 5 years ago • 7 comments

Error on gitbase side:

gsc-gitbase                        | time="2019-04-26T08:22:34Z" level=info msg="NewConnection: client 1"
gsc-gitbase                        | time="2019-04-26T08:22:34Z" level=error msg="Cannot parse client handshake response from client 1 (172.19.0.4:59740): Code: INTERNAL\nparseClientHandshakePacket: can't read connection attribute value\n"

Error from the client side:

gsc-gitbase-spark-connector-jupyter | Exception in thread "main" java.sql.SQLNonTransientConnectionException: Could not connect to gitbase:3306 : unexpected end of stream, read 0 bytes from 4 (socket was closed by server)
gsc-gitbase-spark-connector-jupyter |   at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:234)
gsc-gitbase-spark-connector-jupyter |   at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:165)
gsc-gitbase-spark-connector-jupyter |   at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1199)
gsc-gitbase-spark-connector-jupyter |   at org.mariadb.jdbc.internal.util.Utils.retrieveProxy(Utils.java:560)
gsc-gitbase-spark-connector-jupyter |   at org.mariadb.jdbc.MariaDbConnection.newConnection(MariaDbConnection.java:174)
...

Only happening with the latest v0.20.0-beta4 release

ajnavarro avatar Apr 26 '19 08:04 ajnavarro

What query are you making? Can you provide more specific details. I've been trying to reproduce this with both 0.20.0-beta4 and master and it works for me.

erizocosmico avatar Apr 26 '19 09:04 erizocosmico

From https://github.com/src-d/gitbase-spark-connector repo:

  • go to docker-compose.yml
    • change srcd/gitbase:v0.20.0-beta3 to srcd/gitbase:v0.20.0-beta4
    • change /path/to/repos to a valid path with repositories
  • execute docker-compose up
  • go to localhost:8080
  • try to execute first notebook page
  • error appears

screenshot-localhost-8080-2019 04 26-12-15-07

ajnavarro avatar Apr 26 '19 10:04 ajnavarro

Ok, got to reproduce this.

erizocosmico avatar Apr 26 '19 10:04 erizocosmico

There's an error parsing connection attributes, which has been reported for a couple months: https://github.com/vitessio/vitess/issues/4603

I added more details to the issue and a reproduction case.

We have two options here:

  • Try to fix the issue in vitess.
  • Wait until they fix it, rollback to go-vitess 1.4.0 and scan manually for "SHOW SCHEMAS" instead of using the builtin support in vitess we added.

I think we should fix vitess, but no idea how much that's gonna take.

WDYT @ajnavarro?

erizocosmico avatar Apr 30 '19 09:04 erizocosmico

Not fixed in gitbase.

ajnavarro avatar May 31 '19 06:05 ajnavarro

https://github.com/vitessio/vitess/pull/4897

kuba-- avatar May 31 '19 22:05 kuba--

Will be fixed once we upgrade to latest vitess version.

erizocosmico avatar Oct 09 '19 08:10 erizocosmico