This message was deleted.
# troubleshooting
s
This message was deleted.
a
Have you added mysql-metadata-storage to your extensions loadList?
o
Yeah.. i did..
a
What does your loadList look like?
o
and its loading them in the log:
Copy code
2023-05-23T00:43:11,060 INFO [main] org.apache.druid.guice.ExtensionsLoader - Loading extension [mysql-metadata-storage], jars: mariadb-java-client-3.1.4.jar, mariadb-java-client-2.7.4.jar, mariadb-java-client-2.7.3.jar
I added 3 different versions at the same timeโ€ฆ and same error.. tried with jsut one of them.. and with each version same error
Copy code
druid.metadata.storage.type=mysql
druid.metadata.mysql.driver.driverClassName=org.mariadb.jdbc.Driver
druid.metadata.storage.connector.connectURI=jdbc:<mariadb://server1.com:3115/druid>
druid.metadata.storage.connector.user=druid
druid.metadata.storage.connector.password=druid
this is what i have in my common file
not sure if this will help.. first error:
Copy code
Exception in thread "main" java.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see the following errors:

1) Unknown provider [mysql] of Key[type=org.apache.druid.metadata.MetadataStorageConnector, annotation=[none]], known options [[derby]]
  at org.apache.druid.guice.PolyBind.createChoiceWithDefault(PolyBind.java:110) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.metadata.storage.derby.DerbyMetadataStorageDruidModule)
  while locating org.apache.druid.metadata.MetadataStorageConnector
    for the 1st parameter of org.apache.druid.guice.JacksonConfigManagerModule.getConfigManager(JacksonConfigManagerModule.java:52)
  at org.apache.druid.guice.JacksonConfigManagerModule.getConfigManager(JacksonConfigManagerModule.java:52) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.guice.JacksonConfigManagerModule)
  while locating org.apache.druid.common.config.ConfigManager
    for the 1st parameter of org.apache.druid.common.config.JacksonConfigManager.<init>(JacksonConfigManager.java:54)
  at org.apache.druid.guice.JacksonConfigManagerModule.configure(JacksonConfigManagerModule.java:41) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.guice.JacksonConfigManagerModule)
  while locating org.apache.druid.common.config.JacksonConfigManager
    for the 1st parameter of org.apache.druid.guice.JacksonConfigProvider.configure(JacksonConfigProvider.java:65)
  at org.apache.druid.guice.JacksonConfigProvider.bind(JacksonConfigProvider.java:38) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.cli.CliOverlord$1)
g
it looks like you are missing the actual Druid extension code from
mysql-metadata-storage
there are also too many mariadb clients (you have 3, you should pick just 1)
o
Copy code
-rw-r--r--. 1 druid druid  19676 May 23 15:16 mysql-metadata-storage-25.0.0.jar
-rw-r--r--. 1 druid druid 641587 May 23 15:16 mariadb-java-client-3.1.4.jar
taht was the fix.. to have both in ther
g
i.e. this list
Loading extension [mysql-metadata-storage], jars: mariadb-java-client-3.1.4.jar, mariadb-java-client-2.7.4.jar, mariadb-java-client-2.7.3.jar
should have 1 mariadb client and 1 druid extension jar
ok cool ๐Ÿ™‚
o
btw any idea what could be causing this:
Copy code
Caused by: org.skife.jdbi.v2.exceptions.UnableToExecuteStatementException: Exception thrown in statement customization [statement:"SELECT payload FROM druid_segments WHERE used=true", located:"SELECT payload FROM druid_segments WHERE used=true", rewritten:"SELECT payload FROM druid_segments WHERE used=true", arguments:{ positional:{}, named:{}, finder:[]}]
Caused by: java.sql.SQLSyntaxErrorException: (conn=285) invalid fetch size
keep seeing these in overlord and coordinator logs
g
i'm not sure, i haven't seen this before
a little searching finds this https://stackoverflow.com/questions/72648809/setfetchsize-mariadb-jdbcdriver-version-3-0-4 which seems to suggest it's something related to mariadb driver version?
o
looks like a bug with maria db connector.. and have to downgrade to 2.7 ๐Ÿ˜ž
g
ah, it looks like this code we have works with mysql, but isn't compatible with mariadb
Copy code
@Override
  public int getStreamingFetchSize()
  {
    // this is MySQL's way of indicating you want results streamed back
    // see <http://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-implementation-notes.html>
    return Integer.MIN_VALUE;
  }
it looks like on later mariadb versions we need to set
1
maybe we could detect mariadb client version and change this dynamically?
if you are interested in figuring that out, go for a PR ๐Ÿ™‚
o
If only I was good in java as i am in python, i would ๐Ÿ˜ž
can confirm.. downgrading to 2.7.9 resolved the issue