Analytics plugin - Unsupported DB engine: GENERIC

128 views
Skip to first unread message

Enrico Mano

unread,
Dec 6, 2021, 11:06:46 AM12/6/21
to Kill Bill users mailing-list
Hello,
we are trying to launch the Analytics plugin on a docker compose installation and we have the following error:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Screenshot 2021-12-06 at 16-26-47 Kaui.png

Here you can see the killbill stacktrace that we have in the logs:

org.jooby.Err: Server Error(500)
at org.jooby.internal.HttpHandlerImpl.handleErr(HttpHandlerImpl.java:589)
at org.jooby.internal.HttpHandlerImpl.cleanup(HttpHandlerImpl.java:562)
at org.jooby.internal.HttpHandlerImpl.handle(HttpHandlerImpl.java:504)
at org.killbill.billing.plugin.core.JoobyServlet.service(JoobyServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
...
at org.jooby.internal.mvc.MvcHandler.invoke(MvcHandler.java:269)
at org.jooby.internal.mvc.MvcHandler.handle(MvcHandler.java:251)
at org.jooby.internal.RouteImpl.handle(RouteImpl.java:280)
at org.jooby.internal.RouteChain.next(RouteChain.java:262)
at org.jooby.Route$Chain.next(Route.java:2164)
at org.jooby.internal.HttpHandlerImpl.handle(HttpHandlerImpl.java:496)
... 98 common frames omitted\nCaused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Unsupported DB engine: GENERIC
at org.killbill.commons.concurrent.WrappedRunnableFuture.checkForException(WrappedRunnableFuture.java:86)
at org.killbill.commons.concurrent.WrappedRunnableFuture.get(WrappedRunnableFuture.java:60)
at org.killbill.billing.plugin.analytics.reports.ReportsUserApi.waitForJobCompletion(ReportsUserApi.java:400)
... 115 common frames omitted\nCaused by: java.lang.IllegalArgumentException: Unsupported DB engine: GENERIC
at org.killbill.billing.plugin.analytics.reports.SqlReportDataExtractor.SQLDialectFromDBEngine(SqlReportDataExtractor.java:218)
at org.killbill.billing.plugin.analytics.reports.SqlReportDataExtractor.<init>(SqlReportDataExtractor.java:82)
at org.killbill.billing.plugin.analytics.reports.QueryEngine.getTimeSeriesData(QueryEngine.java:133)
at org.killbill.billing.plugin.analytics.reports.ReportsUserApi$4.run(ReportsUserApi.java:268)
at org.killbill.commons.concurrent.WrappedRunnable.run(WrappedRunnable.java:49)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.killbill.commons.concurrent.WrappedRunnable.run(WrappedRunnable.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 common frames omitted

Have a look to the attached archive that contains the code to replicate the error.

Thanks,
Enrico
setup-tenant.zip

Enrico Mano

unread,
Dec 6, 2021, 11:10:33 AM12/6/21
to Kill Bill users mailing-list
I performed a little search in the code to understand the root cause.


{"@timestamp":"2021-12-06T14:40:14.108Z","message":"Generic DBEngine detected, falling back to SQLDialect.MYSQL","logger_name":"org.killbill.billing.plugin.dao.PluginDao","thread_name":"localhost-startStop-1","level":"WARN"}


Pierre-Alexandre Meyer

unread,
Dec 7, 2021, 7:36:55 AM12/7/21
to Enrico Mano, Kill Bill users mailing-list
Hello,

What is your database configuration for Kill Bill plugins? Can you share with us the environment properties used to start the container, as well as the Docker image version?

--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/fac64b9e-09c9-48a0-ab4f-6a4fc416a550n%40googlegroups.com.


--
Pierre

Enrico Mano

unread,
Dec 7, 2021, 9:41:53 AM12/7/21
to Kill Bill users mailing-list
Hi Pierre,

I have put my docker compose file in the attached ZIP file
There you have the full configuration environment with the docker images version

Enrico Mano

unread,
Dec 7, 2021, 11:38:05 AM12/7/21
to Kill Bill users mailing-list
# KB stack
version: '3.2'
volumes:
db:
services:
killbill:
image: killbill/killbill:latest
entrypoint:
- /bin/sh
- -c
- sleep 5; /var/lib/killbill/killbill.sh
ports:
- "8080:8080"
- "8000:8000"
- "12345:12345"
environment:
- KILLBILL_DAO_URL=jdbc:mysql://db:3306/killbill
- KILLBILL_DAO_USER=root
- KILLBILL_DAO_PASSWORD=killbill
- KILLBILL_OSGI_DAO_URL=jdbc:mysql://db:3306/killbill
- KILLBILL_OSGI_DAO_USER=root
- KILLBILL_OSGI_DAO_PASSWORD=killbill
- KILLBILL_METRICS_INFLUXDB=false
- KILLBILL_METRICS_INFLUXDB_HOST=host.docker.internal
- KILLBILL_METRICS_INFLUXDB_PORT=8086
depends_on:
- db
volumes:
- ./kpm.yml:/var/lib/killbill/kpm.yml:ro
kaui:
image: killbill/kaui:2.0.11
entrypoint:
- /bin/sh
- -c
- sleep 15; /var/lib/kaui/kaui.sh
ports:
- "9090:8080"
environment:
- KAUI_CONFIG_DAO_URL=jdbc:mysql://db:3306/kaui
- KAUI_CONFIG_DAO_USER=root
- KAUI_CONFIG_DAO_PASSWORD=killbill
- KAUI_KILLBILL_URL=http://killbill:8080
- KAUI_KILLBILL_API_KEY=bob
- KAUI_KILLBILL_API_SECRET=lazar
depends_on:
- killbill
db:
image: killbill/mariadb:0.22
volumes:
- type: volume
source: db
target: /var/lib/mysql
expose:
- "3306"
environment:
- MYSQL_ROOT_PASSWORD=killbill
setup-tenant:
image: killbill/killbill:latest
entrypoint:
- /bin/sh
- -c
- sleep 20; sh /opt/script-runner/setup-tenant.sh
environment:
- KILLBILL_URL=http://killbill:8080
- KILLBILL_HOST=killbill
- MYSQL_HOST=db
- MYSQL_PASSWORD=killbill
- CURL_COMMAND=curl -v
- CATALOG_FOLDER=/tmp/catalogs
- TENANT_ID=Tenant
- SETUP_ANALYTICS_PLUGIN=true
volumes:
- ./setup-tenant.sh:/opt/script-runner/setup-tenant.sh
- ./kpm.yml:/var/lib/killbill/kpm.yml:ro
- ./kaui-new-tenant-ddl.sql:/opt/script-runner/ddl/kaui-new-tenant-ddl.sql:ro
- ./catalogs:/tmp/catalogs
depends_on:
- kaui




On Tuesday, December 7, 2021 at 1:36:55 PM UTC+1 Pierre-Alexandre Meyer wrote:

Enrico Mano

unread,
Dec 7, 2021, 11:45:47 AM12/7/21
to Kill Bill users mailing-list
For info I see passwords in clear text in logs from org.killbill.billing.plugin.notification.setup.EmailNotificationConfigurationHandler

{"@timestamp":"2021-12-07T16:25:45.109Z","message":"New properties for region null: {org.killbill.server.baseUrl=http://localhost:8080, org.killbill.dao.password=killbill, ADMIN.PASSWO
RD=password, org.killbill.metrics.influxDb.port=8086, org.killbill.osgi.bundle.install.dir=/var/lib/killbill/bundles, org.killbill.persistent.bus.external.historyTableName=bus_ext_events_history, org.ki
llbill.billing.plugin.kpm.kpmPath=/opt/kpm-latest/kpm, org.killbill.server.updateCheck.url=https://raw.github.com/killbill/killbill/master/profiles/killbill/src/main/resources/update-checker/killbill-se
rver-update-list.properties, org.killbill.server.enableJasypt=false, org.killbill.billing.osgi.bundles.jruby.conf.dir=/var/lib/killbill/config, org.killbill.metrics.influxDb.host=host.docker.internal, o
rg.killbill.server.lookupEnvironmentVariables=true, org.killbill.metrics.influxDb=false, org.killbill.dao.url=jdbc:mysql://db:3306/killbill, org.killbill.billing.osgi.dao.password=killbill, org.killbill
.security.shiroResourcePath=/var/lib/killbill/config/shiro.ini, org.killbill.billing.plugin.kpm.bundlesPath=/var/lib/killbill/bundles, org.killbill.dao.user=root, org.killbill.billing.osgi.dao.user=root
, org.killbill.persistent.bus.external.tableName=bus_ext_events, org.killbill.billing.osgi.dao.url=jdbc:mysql://db:3306/killbill}","logger_name":"org.killbill.billing.plugin.notification.setup.EmailNoti
ficationConfigurationHandler","thread_name":"localhost-startStop-1","level":"INFO"}

Pierre-Alexandre Meyer

unread,
Dec 8, 2021, 3:17:02 AM12/8/21
to Enrico Mano, Kill Bill users mailing-list
Thanks.

I'm still not sure what's going on unfortunately.

Follow-up questions:
  • Which version of the Analytics plugin are you running?
  • What's the report configuration of one of the failing reports that trigger the error?
  • Can you paste (or upload somewhere) the entire log file? The Zip attachments were stripped from your post.
Kind regards,

Kyle

unread,
Mar 27, 2022, 5:41:52 AM3/27/22
to Kill Bill users mailing-list
hi all, 
I have the same problem and I found it may be caused by method PluginDao.getDBEngine.

dbengine-generic.png
dbengine-generic-exception.png

Vijay Nandwana

unread,
Apr 11, 2022, 12:21:49 PM4/11/22
to Kill Bill users mailing-list
Reply all
Reply to author
Forward
0 new messages