Hey folks. Anyone seen this error before? I got p...
# troubleshooting
f
Hey folks. Anyone seen this error before? I got pyflink working in terms of creating new tables and doing INSERTs to Iceberg, but when I try to do a SELECT I get the following and some subsequent JDBC driver errors. The same config works fine for WRITEs but not for READs. Weird...
Copy code
2024-04-12T18:49:31.018Z | FlinkDeployment | SPOBD2 | hostname=spobd2-worker-38 | namespace=s-insights | application=s-insights-prometheus-poc | component=jobmanager | pod=s-insights-prometheus-poc-f586b57dd-blcnh | ERROR | o.a.f.r.r.h.j.JobDetailsHandler | flink-rest-server-netty-worker-thread-7 | Could not create the handler request.
org.apache.flink.runtime.rest.handler.HandlerRequestException: Cannot resolve path parameter (jobid) from value "null".
r
does the
insert
definitely work? Or does the insert job just submit asynchronously successfully?
I found that i'd run an insert and it seem to work, but checking job manager web UI (or from Flink SQL,
SHOW JOBS
you'd see the insert had failed too
what's the JDBC error that you're getting?
f
The insert defintely worked. I can access the databased out of band and see the tables and rows created.
Something I read gave an indication that there's more coordination that goes on between the Job manager and task managers on SELECTS that have to do row scanning. That for the insert, the task manager might be able to do all the work and that the Job Manager doesn't required a JDBC connection in that case. But for the SELECT, both components need the JDBC connection. Wondering if I'm still having classpath issues in the job manager, but not the task managers.
These are the JDBC errors I get AFTER the job id null error.
Copy code
2024-04-15T13:23:26.115Z | FlinkDeployment | SPOBD2 | hostname=spobd2-worker-38 | namespace=s-insights | application=s-insights-prometheus-poc | component=jobmanager | pod=s-insights-prometheus-poc-84c477f6f6-qgt6k | INFO | o.a.f.r.d.StandaloneDispatcher | flink-akka.actor.default-dispatcher-17 | Job 28e35f4edfe24f7aba6ac9fe3cfbe90f reached terminal state FAILED.
org.apache.flink.runtime.client.JobInitializationException: Could not start the JobMaster.
...
Caused by: java.util.concurrent.CompletionException: java.lang.RuntimeException: org.apache.flink.runtime.JobException: Creating the input splits caused an error: Failed to connect: jdbc:comdb2://dev/cntadev?comdb2dbname=comdb3db
..
Caused by: java.lang.RuntimeException: org.apache.flink.runtime.JobException: Creating the input splits caused an error: Failed to connect: jdbc:comdb2://dev/cntadev?comdb2dbname=comdb3db
..
Caused by: org.apache.flink.runtime.JobException: Creating the input splits caused an error: Failed to connect: jdbc:comdb2://dev/cntadev?comdb2dbname=comdb3db...
Caused by: org.apache.iceberg.jdbc.UncheckedSQLException: Failed to connect: jdbc:comdb2://dev/cntadev?comdb2dbname=comdb3db
i..
Caused by: java.sql.SQLException: No suitable driver found for jdbc:comdb2://dev/cntadev?comdb2dbname=comdb3db
        at org.apache.iceberg.jdbc.JdbcClientPool.newClient(JdbcClientPool.java:55)
        ... 32 more
r
so you're using JDBC for your Iceberg catalog?
but yes, it does sound like it could be a classpath issue on one of the components
f
Yes JDBC for the catalog metastore. Our internally managed iceberg platform uses a database for the metastore.
πŸ‘ 1
These classpath issues are killin' me.
r
yep. they're a pain.
i've definitely seen similar patterns where one operation works whilst another doesn't. it always came down to a dependency missing on one component or another
f
FYI, The fix was to use
classloader.parent-first-patterns.additional
and add our JDBC driver classpath there.
r
@Frank Gilroy glad you got it fixed. Do you have an example of that config to share? I looked at https://nightlies.apache.org/flink/flink-docs-release-1.19/docs/ops/debugging/debugging_classloading/#inverted-class-loadin[…]oader-resolution-order but didn't quite follow.