This message was deleted.
# troubleshooting
s
This message was deleted.
j
Actually it looks like we are using postgresql for metadata and the extension is loaded so the driver should be in the classpath however it fails to load the lookup due to an error with calcite
s
What's the error?
j
the actual error is
Copy code
2022-09-26T20:33:35,340 INFO [sql[cc91f75c-447f-437a-96b2-1053381b7c6c]] org.apache.druid.server.log.LoggingRequestLogger - 2022-09-26T20:33:35.328Z    10.3.120.136        {"sqlQuery/time":11,"sqlQuery/planningTimeMs":0,"sqlQuery/bytes":0,"s │
│ uccess":false,"identity":"admin","context":{"nativeQueryIds":"[]","sqlQueryId":"cc91f75c-447f-437a-96b2-1053381b7c6c"},"exception":"org.apache.druid.sql.SqlPlanningException: org.apache.calcite.runtime.CalciteContextException: From line 1, c │
│ olumn 22 to line 1, column 41: Object 'user_to_city' not found within 'lookup'"}    {"query":"SELECT \"k\", \"v\" FROM lookup.user_to_city LIMIT 5000","context":{"nativeQueryIds":"[]","sqlQueryId":"cc91f75c-447f-437a-96b2-1053381b7c6c"}}   │
│ 2022-09-26T20:33:35,342 DEBUG [qtp1747862622-162] org.apache.druid.jetty.RequestLog - 10.3.120.136 POST //10.3.116.255:8082/druid/v2/sql HTTP/1.1 400                                                                                             │
│ 2022-09-26T20:33:43,709 DEBUG [qtp1747862622-155] org.apache.druid.jetty.RequestLog - 10.3.114.17 GET //10.3.116.255:8082/status/health HTTP/1.1 200                                                                                              │                                                                                             │
│ 2022-09-26T20:34:19,409 INFO [MetadataSegmentView-Cache--0] org.apache.druid.sql.calcite.schema.MetadataSegmentView - polling published segments from coordinator                                                                                 │
│ 2022-09-26T20:34:23,709 DEBUG [qtp1747862622-123] org.apache.druid.jetty.RequestLog - 10.3.114.17 GET //10.3.116.255:8082/status/health HTTP/1.1 200                                                                                              │
│ 2022-09-26T20:34:24,771 DEBUG [qtp1747862622-131] org.apache.druid.jetty.RequestLog - 10.3.114.17 GET //10.3.116.255:8082/status/health HTTP/1.1 200                                                                                              │
│ 2022-09-26T20:34:30,409 DEBUG [qtp1747862622-159] org.apache.druid.jetty.RequestLog - 10.3.124.123 GET //10.3.116.255:8082/druid/listen/v1/lookups HTTP/1.1 200                                                                                   │
│ 2022-09-26T20:34:30,440 WARN [qtp1747862622-152] org.apache.druid.query.lookup.LookupUtils - Lookup [user_to_city] could not be serialized properly. Please check its configuration. Error: Cannot construct instance of `org.apache.druid.query │
│ .lookup.namespace.JdbcExtractionNamespace`, problem: java.lang.ClassNotFoundException: org.postgresql.Driver                                                                                                                                      │
│  at [Source: (byte[])":)                                                                                                                                                                                                                          │
│ ��versionAv1�lookupExtractorFactory��typeNcachedNamespace�extractionNamespace�BCjdbc�namespaceLuser_to_city�connectorConfig��connectURI�jdbc:<postgresql://druid-test.cluster-abcde4a12345.us-east-1.rds.amazonaws.com:5432/lookups>��userJtest │
│ admin�password1234��tableLuser_to_city�keyColumnFuser_id�valueColumnDemail�pollPeriodBP1D�tsColumnAts��firstCacheTimeout��injective#��"; line: -1, column: 366] (through reference chain: org.apache.druid.query.lookup.Looku │
│ pExtractorFactoryContainer["lookupExtractorFactory"]->org.apache.druid.query.lookup.NamespaceLookupExtractorFactory["extractionNamespace"])                                                                                                       │
│ 2022-09-26T20:34:30,440 DEBUG [qtp1747862622-152] org.apache.druid.jetty.RequestLog - 10.3.124.123 POST //10.3.116.255:8082/druid/listen/v1/lookups/updates HTTP/1.1 202                                                                          │
│ 2022-09-26T20:34:33,709 DEBUG [qtp1747862622-140] org.apache.druid.jetty.RequestLog - 10.3.114.17 GET //10.3.116.255:8082/status/health HTTP/1.1 200                                                                                              │
I have
postgresql-metadata-storage
in extensions
Copy code
bash-5.1$ cd postgresql-metadata-storage/
bash-5.1$ ls
checker-qual-3.5.0.jar                  postgresql-42.4.1.jar                   postgresql-metadata-storage-24.0.0.jar
bash-5.1$ ls -l
total 1256
-rw-r--r--    1 druid    druid       214381 Sep 10 05:43 checker-qual-3.5.0.jar
-rw-r--r--    1 druid    druid      1045138 Sep 10 05:43 postgresql-42.4.1.jar
-rw-r--r--    1 druid    druid        19699 Sep 10 05:55 postgresql-metadata-storage-24.0.0.jar
bash-5.1$
might need to copy
postgresql-42.4.1.jar
to
druid/lib
?
that was it, it works now
s
👍