{
"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "1.8.0_282-8u282-b08-0ubuntu1~20.04-b08",
"java.vendor": "Private Build",
"java.vendor.url": "http://java.oracle.com/",
"java.version": "1.8.0_282",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "25.282-b08",
"os.name": "Linux",
"os.version": "5.8.0-44-generic",
"user.language": "en",
"user.timezone": "Europe/Bucharest"
},
"metabase-info": {
"databases": [
"h2",
"mysql"
],
"hosting-env": "unknown",
"application-database": "h2",
"application-database-details": {
"database": {
"name": "H2",
"version": "1.4.197 (2018-03-18)"
},
"jdbc-driver": {
"name": "H2 JDBC Driver",
"version": "1.4.197 (2018-03-18)"
}
},
"run-mode": "prod",
"version": {
"tag": "v0.38.0.1",
"date": "2021-02-19",
"branch": "release-x.38.x",
"hash": "0635914"
},
"settings": {
"report-timezone": "Europe/Bucharest"
}
}
}
Hi @cblaga
Is this a new problem? If yes, which version did it work on previously?
Does the Metabot have permissions for those questions? Admin > Permissions
Does it happen even for simple SQL question like select 1
?
You should migrate away from H2 if you’re using Metabase in production:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html
And I would recommend Java 11:
https://www.metabase.com/docs/latest/operations-guide/java-versions.html
Hi @flamber . I just downloaded Slack, never used it before this. I checked user permissions but metabot does not appear in the user list.it does appear in permissions though.
Tried to give it acces to my database but when I save changes it reverts to ‘X’.
I am doing dashboards from a MySQL DB, should I migrate ?
Will dashboard and questions definitions be saved in mysql db after I migrate?
@cblaga Yeah, the Metabot will never appear as an user and I actually don’t think it should be shown in Permissions either, which is why you cannot change permissions for it - sorry about the confusion.
I think you might not have setup the bot correctly in Slack.
Check the log for activity, when you try to use the Metabot (or warnings/errors) - Admin > Troubleshooting > Logs
Everything is migrated. After migration, remove the H2 file (backup) and you would then point Metabase to use the new database: https://www.metabase.com/docs/latest/operations-guide/configuring-application-database.html
I’m not sure it’s config related, the bot responds to ‘metabot list’ - I get my questions but it returns nothing
This is what the log says:
[371e57b0-58d9-4145-8021-32c768e1a548] 2021-03-13T13:51:26+02:00 ERROR metabase.metabot.slack Error in Metabot command
java.lang.NullPointerException
at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130)
at javax.swing.UIDefaults.getUI(UIDefaults.java:761)
at javax.swing.UIManager.getUI(UIManager.java:1016)
at javax.swing.JPanel.updateUI(JPanel.java:126)
at javax.swing.JPanel.(JPanel.java:86)
at javax.swing.JPanel.(JPanel.java:109)
at javax.swing.JPanel.(JPanel.java:117)
at org.fit.cssbox.layout.BrowserCanvas.(BrowserCanvas.java:68)
at metabase.pulse.render.png$content_canvas.invokeStatic(png.clj:71)
at metabase.pulse.render.png$content_canvas.invoke(png.clj:67)
at metabase.pulse.render.png$render_to_png_BANG_.invokeStatic(png.clj:87)
at metabase.pulse.render.png$render_to_png_BANG_.invoke(png.clj:81)
at metabase.pulse.render.png$fn__50393$render_html_to_png__50398$fn__50402.invoke(png.clj:101)
at metabase.pulse.render.png$fn__50393$render_html_to_png__50398.invoke(png.clj:90)
at metabase.pulse.render$fn__50594$render_pulse_card_to_png__50599$fn__50600.invoke(render.clj:157)
at metabase.pulse.render$fn__50594$render_pulse_card_to_png__50599.invoke(render.clj:154)
at metabase.pulse$create_slack_attachment_data$iter__70330__70334$fn__70335$fn__70336$fn__70339.invoke(pulse.clj:113)
at metabase.pulse$create_and_upload_slack_attachments_BANG_$iter__70353__70357$fn__70358$fn__70359.invoke(pulse.clj:124)
at metabase.pulse$create_and_upload_slack_attachments_BANG_$iter__70353__70357$fn__70358.invoke(pulse.clj:123)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:51)
at clojure.lang.RT.seq(RT.java:535)
at clojure.core$seq__5402.invokeStatic(core.clj:137)
at clojure.core$dorun.invokeStatic(core.clj:3133)
at clojure.core$doall.invokeStatic(core.clj:3148)
at clojure.core$doall.invoke(core.clj:3148)
at metabase.pulse$create_and_upload_slack_attachments_BANG_.invokeStatic(pulse.clj:122)
at metabase.pulse$create_and_upload_slack_attachments_BANG_.invoke(pulse.clj:119)
at metabase.metabot.command$fn__70561$fn__70563$fn__70564.invoke(command.clj:167)
at metabase.metabot.slack$do_async$fn__70233$fn__70234.invoke(slack.clj:42)
at metabase.metabot.slack$do_async$fn__70233.invoke(slack.clj:41)
at clojure.core$binding_conveyor_fn$fn__5754.invoke(core.clj:2030)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[371e57b0-58d9-4145-8021-32c768e1a548] 2021-03-13T13:51:29+02:00 DEBUG metabase.server.middleware.log GET /api/user/current 200 7.4 ms (3 DB calls) App DB connections: 0/15 Jetty threads: 5/50 (8 idle, 0 queued) (134 total active threads) Queries in flight: 0 (0 queued)
[371e57b0-58d9-4145-8021-32c768e1a548] 2021-03-13T13:51:29+02:00 DEBUG metabase.server.middleware.log GET /api/session/properties 200 9.0 ms (2 DB calls) App DB connections: 0/15 Jetty threads: 5/50 (8 idle, 0 queued) (134 total active threads) Queries in flight: 0 (0 queued)
[371e57b0-58d9-4145-8021-32c768e1a548] 2021-03-13T13:51:30+02:00 DEBUG metabase.server.middleware.log GET /api/database 200 10.3 ms (3 DB calls) App DB connections: 0/15 Jetty threads: 4/50 (8 idle, 0 queued) (134 total active threads) Queries in flight: 0 (0 queued)
@cblaga I don’t understand - you can use metabot list
, but not any other commands? Which commands are you using?
Fairly sure the problem is your Java version.
For another question I get this error
Uh oh!
Input to defaulted-timezone does not match schema:
[0;33m [(named (not (instance? metabase.models.card.CardInstance nil)) card)] [0m
@cblaga Please post the full error from Admin > Troubleshooting > Logs.
[371e57b0-58d9-4145-8021-32c768e1a548] 2021-03-13T13:59:07+02:00 ERROR metabase.metabot.slack Error in Metabot command
clojure.lang.ExceptionInfo: Input to defaulted-timezone does not match schema:
[(named (not (instance? metabase.models.card.CardInstance nil)) card)]
{:type :schema.core/error, :schema [#schema.core.One{:schema metabase.models.card.CardInstance, :optional? false, :name card}], :value [nil], :error [(named (not (instance? metabase.models.card.CardInstance nil)) card)]}
at metabase.pulse$fn__70306$defaulted_timezone__70311.invoke(pulse.clj:92)
at metabase.pulse$create_slack_attachment_data$iter__70330__70334$fn__70335$fn__70336$fn__70339.invoke(pulse.clj:113)
at metabase.pulse$create_and_upload_slack_attachments_BANG_$iter__70353__70357$fn__70358$fn__70359.invoke(pulse.clj:124)
at metabase.pulse$create_and_upload_slack_attachments_BANG_$iter__70353__70357$fn__70358.invoke(pulse.clj:123)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:51)
at clojure.lang.RT.seq(RT.java:535)
at clojure.core$seq__5402.invokeStatic(core.clj:137)
at clojure.core$dorun.invokeStatic(core.clj:3133)
at clojure.core$doall.invokeStatic(core.clj:3148)
at clojure.core$doall.invoke(core.clj:3148)
at metabase.pulse$create_and_upload_slack_attachments_BANG_.invokeStatic(pulse.clj:122)
at metabase.pulse$create_and_upload_slack_attachments_BANG_.invoke(pulse.clj:119)
at metabase.metabot.command$fn__70561$fn__70563$fn__70564.invoke(command.clj:167)
at metabase.metabot.slack$do_async$fn__70233$fn__70234.invoke(slack.clj:42)
at metabase.metabot.slack$do_async$fn__70233.invoke(slack.clj:41)
at clojure.core$binding_conveyor_fn$fn__5754.invoke(core.clj:2030)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[371e57b0-58d9-4145-8021-32c768e1a548] 2021-03-13T13:59:12+02:00 DEBUG metabase.server.middleware.log GET /api/user/current 200 7.5 ms (3 DB calls) App DB connections: 0/15 Jetty threads: 5/50 (2 idle, 0 queued) (129 total active threads) Queries in flight: 0 (0 queued)
[371e57b0-58d9-4145-8021-32c768e1a548] 2021-03-13T13:59:12+02:00 DEBUG metabase.server.middleware.log GET /api/session/properties 200 8.2 ms (2 DB calls) App DB connections: 0/15 Jetty threads: 5/50 (2 idle, 0 queued) (129 total active threads) Queries in flight: 0 (0 queued)
[371e57b0-58d9-4145-8021-32c768e1a548] 2021-03-13T13:59:12+02:00 DEBUG metabase.server.middleware.log GET /api/database 200 12.7 ms (3 DB calls) App DB connections: 0/15 Jetty threads: 4/50 (2 idle, 0 queued) (129 total active threads) Queries in flight: 0 (0 queued)
In the slack config page it says that metabot is in no channels even though in slack app I created the #metabase_files channel. Maybe I need to somehow tell slack that the bot should use that channel?
Just switched to java11 on the server, still same errors.
I’m using “metabot show 13” or “metabot show ~|name of question|~”
@cblaga
Make sure that you’re actually starting with Java 11 - check “Diagnostic Info” in Admin > Troubleshooting.
@metabot
needs to be invited into channels - #metabase_files
is where images are stored - there would be different errors if that is the problem.
The only time I have seen this error was while trying to debug this issue, which I think has something to do with timezones, but that’s some really difficult stuff to debug:
https://github.com/metabase/metabase/issues/11587
I think i got it. Checked the log after metabot list command and it’s looking in another database. I have 4 databases configured. 1. Sample 2. Production 3. Reporting 4. Testing. It returns my questions but it queryes db 4 instead of 2
Gotta go now, I’ll check it later and let you know, maybe I will try to delete the other 3 databases because I don’t really need them right now.
@cblaga Not quite sure I understand, but if you use metabot show 13
, then it should use the question ID to return data from that, which doesn’t have anything to do with your databases (besides the question is of course connected to a database).
Hi @flamber, restarted metabase with jdk11 and it works like a charm. Thanks for the help !
How can I flag the post as resolved ? It’s my first time posting here.