jefflester / minitrino

A tool that makes it easy to run modular Trino environments locally.
Apache License 2.0
32 stars 3 forks source link

DB2 module error #41

Closed epiekarski closed 1 year ago

epiekarski commented 2 years ago

When provisioning a minitrino cluster with the DB2 module, the cluster is able to come up successfully. However, if you try to query the module, you receive the following error:

`trino> show schemas from db2;

Query 20220719_163217_00001_k9r9w, FAILED, 1 node Splits: 11 total, 0 done (0.00%) 0.51 [0 rows, 0B] [0 rows/s, 0B/s]

Query 20220719_163217_00001_k9r9w failed: DB2 SQL Error: SQLCODE=-1001, SQLSTATE=2E000, SQLERRMC=MINITRINO, DRIVER=4.25.13`

I stopped minitrino, removing docker volumes using minitrino -v remove --volumes, and deleted everything in ~/.minitrino/lib/modules/catalog/db2/resources/db2/db2-storage/

After spinning up the DB2 module again and attempting to query it, I received a new exception as shown below: 'trino> show schemas from db2;

Query 20220719_170146_00017_kfa26, FAILED, 1 node Splits: 11 total, 0 done (0.00%) 0.67 [0 rows, 0B] [0 rows/s, 0B/s]

Query 20220719_170146_00017_kfa26 failed: [jcc][t4][2043][11550][4.25.13] Exception java.net.ConnectException: Error opening socket to server db2/172.19.0.3 on port 50,000 with message: Connection refused (Connection refused). ERRORCODE=-4499, SQLSTATE=08001'

jefflester commented 1 year ago

@epiekarski do you recall if you were building this on an M1 Mac? I am wondering if it's platform-specific.

jefflester commented 1 year ago

@epiekarski if you can, can you please give the latest Db2 module a try using the 2.0.3 release? I couldn't get it to work on my M1 chip, but I have yet to test it on an Intel system.

epiekarski commented 1 year ago

@jefflester Sorry missed your previous comment from 2 weeks ago! Will def give it a try asap

epiekarski commented 1 year ago

@jefflester tested the new build and it seems to be working!

I noticed i did have to wait an extra few minutes after provisioning before querying the DB2 catalog otherwise I would see the following error:

trino> show schemas from db2;

Query 20230502_201458_00016_jt8qv, FAILED, 1 node Splits: 19 total, 0 done (0.00%) 0.37 [0 rows, 0B] [0 rows/s, 0B/s]

Query 20230502_201458_00016_jt8qv failed: Error listing schemas for catalog db2: [jcc][t4][2043][11550][4.25.13] Exception java.net.ConnectException: Error opening socket to server db2/172.19.0.2 on port 50,000 with message: Connection refused. ERRORCODE=-4499, SQLSTATE=08001

jefflester commented 1 year ago

@epiekarski excellent, thank you for confirming! I'll play around with this a bit more on the newer Macs and see if I can get it working on those machines.

I'll close this issue for now. Feel free to open other issues if you run into anything else!