Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saved credentials encryption is DISABLED for this Metabase instance. #8368

Closed
Trap-only opened this issue Aug 21, 2018 · 13 comments
Closed

Saved credentials encryption is DISABLED for this Metabase instance. #8368

Trap-only opened this issue Aug 21, 2018 · 13 comments
Assignees
Labels
Type:Bug Product defects
Milestone

Comments

@Trap-only
Copy link

Bugs

When I run lein ring server,
will show this:
Compiling metabase.logger
Compiling metabase.task.DynamicClassLoadHelper
08-21 10:27:10 INFO metabase.util :: Loading Metabase...
08-21 10:27:17 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. 🔓
For more information, see https://www.metabase.com/docs/latest/operations-guide/start.html#encrypting-your-database-connection-details-at-rest
08-21 10:28:18 INFO metabase.core :: Starting Metabase version v0.30.1 (null null) ...
08-21 10:28:18 INFO metabase.core :: System timezone is 'Asia/Shanghai' ...
Exception in thread "main" java.lang.NullPointerException, compiling:(google.clj:51:3)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3700)
at clojure.lang.Compiler$DefExpr.eval(Compiler.java:457)
at clojure.lang.Compiler.eval(Compiler.java:7067)
at clojure.lang.Compiler.load(Compiler.java:7514)
at clojure.lang.RT.loadResourceScript(RT.java:379)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.load(RT.java:460)
at clojure.lang.RT.load(RT.java:426)
at clojure.core$load$fn__6548.invoke(core.clj:6046)
at clojure.core$load.invokeStatic(core.clj:6045)
at clojure.core$load.doInvoke(core.clj:6029)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5848)
at clojure.core$load_one.invoke(core.clj:5843)
at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
at clojure.core$load_lib.invokeStatic(core.clj:5887)
at clojure.core$load_lib.doInvoke(core.clj:5868)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$load_libs.invokeStatic(core.clj:5929)
at clojure.core$load_libs.doInvoke(core.clj:5909)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$require.invokeStatic(core.clj:5947)
at clojure.core$require.doInvoke(core.clj:5947)
at clojure.lang.RestFn.invoke(RestFn.java:1289)
at metabase.driver.bigquery$eval65222$loading__6434__auto____65223.invoke(bigquery.clj:1)
at metabase.driver.bigquery$eval65222.invokeStatic(bigquery.clj:1)
at metabase.driver.bigquery$eval65222.invoke(bigquery.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:7062)
at clojure.lang.Compiler.eval(Compiler.java:7051)
at clojure.lang.Compiler.load(Compiler.java:7514)
at clojure.lang.RT.loadResourceScript(RT.java:379)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.load(RT.java:460)
at clojure.lang.RT.load(RT.java:426)
at clojure.core$load$fn__6548.invoke(core.clj:6046)
at clojure.core$load.invokeStatic(core.clj:6045)
at clojure.core$load.doInvoke(core.clj:6029)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5848)
at clojure.core$load_one.invoke(core.clj:5843)
at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
at clojure.core$load_lib.invokeStatic(core.clj:5887)
at clojure.core$load_lib.doInvoke(core.clj:5868)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$load_libs.invokeStatic(core.clj:5925)
at clojure.core$load_libs.doInvoke(core.clj:5909)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$require.invokeStatic(core.clj:5947)
at clojure.core$require.doInvoke(core.clj:5947)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at metabase.driver$init_driver_in_namespace_BANG_.invokeStatic(driver.clj:323)
at metabase.driver$init_driver_in_namespace_BANG_.invoke(driver.clj:322)
at metabase.driver$find_and_load_drivers_BANG_.invokeStatic(driver.clj:334)
at metabase.driver$find_and_load_drivers_BANG_.invoke(driver.clj:328)
at metabase.core$init_BANG_.invokeStatic(core.clj:156)
at metabase.core$init_BANG_.invoke(core.clj:138)
at clojure.lang.Var.invoke(Var.java:377)
at ring.server.standalone$serve.invokeStatic(standalone.clj:96)
at ring.server.standalone$serve.doInvoke(standalone.clj:75)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at ring.server.leiningen$serve.invokeStatic(leiningen.clj:19)
at ring.server.leiningen$serve.invoke(leiningen.clj:16)
at user$eval65026.invokeStatic(form-init2588511176082585470.clj:1)
at user$eval65026.invoke(form-init2588511176082585470.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:7062)
at clojure.lang.Compiler.eval(Compiler.java:7052)
at clojure.lang.Compiler.load(Compiler.java:7514)
at clojure.lang.Compiler.loadFile(Compiler.java:7452)
at clojure.main$load_script.invokeStatic(main.clj:278)
at clojure.main$init_opt.invokeStatic(main.clj:280)
at clojure.main$init_opt.invoke(main.clj:280)
at clojure.main$initialize.invokeStatic(main.clj:311)
at clojure.main$null_opt.invokeStatic(main.clj:345)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.invokeStatic(main.clj:424)
at clojure.main$main.doInvoke(main.clj:387)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:702)
at clojure.main.main(main.java:37)
Caused by: java.lang.NullPointerException
at metabase.driver.google$fn__65244.invokeStatic(google.clj:52)
at metabase.driver.google$fn__65244.invoke(google.clj:51)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3695)
... 82 more
08-21 10:28:19 INFO metabase.core :: Metabase Shutting Down ...
08-21 10:28:19 INFO metabase.core :: Metabase Shutdown COMPLETE
Subprocess failed

browser and the version: (Chrome 52.1)
operating system: ( OS X 10)
databases: (sample)
version: ( 0.30.1)
internal database: (e.x. H2 (default),)

I don't know what caused it. It was possible to run successfully before.

@Trap-only
Copy link
Author

Is it that I have executed the migration command before?

@Trap-only
Copy link
Author

Trap-only commented Aug 21, 2018

Before I run export MB_DB_TYPE=mysql
export MB_DB_DBNAME=metabase
export MB_DB_PORT=3306
export MB_DB_USER=
export MB_DB_PASS=
export MB_DB_HOST=localhost
java -jar metabase.jar load-from-h2

@jornh
Copy link
Contributor

jornh commented Aug 21, 2018

Is it that I have executed the migration command before?

Yes it’s possible, i have never tried doing that. It certainly complicates running for development a bit. I would just run it as default with H2 as application database.

08-21 10:27:17 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. 🔓
For more information, see https://www.metabase.com/docs/latest/operations-guide/start.html#encrypting-your-database-connection-details-at-rest

This is no problem or error. Just information that it’s running without encryption for credentials according to the link included there. Again, just fine for local development with H2 and test data.

@senior
Copy link
Contributor

senior commented Aug 21, 2018

On startup we create a string to identify ourselves (and our queries) to BigQuery. The string is "Metabase" + version info. When your Metabase instance starts up, for some reason it's finding no version information. When running from source, it will grab the git SHA from the repo, did your git metadata somehow get removed?

@jornh
Copy link
Contributor

jornh commented Aug 21, 2018

@senior if that’s what makes Metabase fail here I think I know the cause. If you just make a zip download from GitHub instead of doing a git clone you don’t have git metadata locally (yeah I know it’s an appalling thought, but it can happen 😜)

Sorry for not reporting this finding earlier!

@jornh
Copy link
Contributor

jornh commented Aug 22, 2018

@zhangdoudou make sure when you get the Metabase code from GitHub that you do it as a git clone and not just a zipped download.

When building Metabase the git SHA info is used to label the version - and normally puts it where you have null null in this log line:

08-21 10:28:18 INFO metabase.core :: Starting Metabase version v0.30.1 (null null) ...

@senior if those nulls breaks the build it would be nice(er) if the build could fail fast.

Also it seems https://github.com/metabase/metabase/blob/master/bin/version effectively puts git as a hard dependency for building Metabase and that the developers guide might mention it under
prerequisites. The other alternative, of course, is to loosen the requirements for the build and let it degrade gracefully, so e.g. missing metadata would only warn the developer during/after build.

@Trap-only
Copy link
Author

@jornh Ok,I see,I just make a zip download from GitHub ,not git clone ,I will amend this question,thank you very much.

@Trap-only
Copy link
Author

when i run git clone to get the Metabase code from GitHub ,run "lein ring server " and "yarn run build-hot" ,will happen the page in localhost:3000 is blank page.
image

@senior
Copy link
Contributor

senior commented Aug 22, 2018

It looks like the frontend code isn't running and/or you are having networking issues. Are you seeing any errors from the yarn run build-hot console? Here's the developer's guide if you haven't seen it. It talks about the prerequisites for running Metabase, running tests etc.

@senior senior added the Type:Bug Product defects label Aug 22, 2018
@senior senior self-assigned this Aug 22, 2018
senior pushed a commit that referenced this issue Aug 22, 2018
When connecting to a Google service, we identify ourselves with a
string that includes version, hash and branch information. If a user
downloads a Metabase tarball from Github, it won't have that Git
metadata and we will throw a NullPointerException on startup.

This commit just ensures we always have a value for that string, even
when there is no git metadata available.

Fixes #8368
@senior senior added this to the 0.30.2 milestone Aug 22, 2018
@Trap-only
Copy link
Author

when I run “yarn run build-hot”
yarn run v1.7.0
$ yarn && NODE_ENV=hot webpack-dev-server --progress
$ echo $npm_execpath | grep -q yarn || echo '\033[0;33mSorry, npm is not supported. Please use Yarn (https://yarnpkg.com/).\033[0m'
[1/5] 🔍 Validating package.json...
[2/5] 🔍 Resolving packages...
success Already up-to-date.
10% building modules 4/4 modules 0 active x Project is running at http://localhost:8080/
webpack output is served from http://localhost:8080/app/dist/
Content not from webpack is served from frontend
68% building modules 1463/1509 modules 46 active ...ct-element-to-jsx-string/dist/tree.jsNode#before is deprecated. Use Node#raws.before
Hash: b75da2b2ba01035968de s Version: webpack 3.10.0
Time: 52240ms
Asset Size Chunks Chunk Names
1.hot.bundle.js.map?b75da2b2ba01035968de 138 kB 1 [emitted]
0.hot.bundle.js?b75da2b2ba01035968de 14.8 kB 0 [emitted]
2.hot.bundle.js?b75da2b2ba01035968de 143 kB 2 [emitted]
app-main.hot.bundle.js?b75da2b2ba01035968de 7.85 MB 3 [emitted] [big] app-main
app-public.hot.bundle.js?b75da2b2ba01035968de 3.15 MB 4 [emitted] [big] app-public
app-embed.hot.bundle.js?b75da2b2ba01035968de 3.15 MB 5 [emitted] [big] app-embed
styles.hot.bundle.js?b75da2b2ba01035968de 130 kB 6 [emitted] styles
vendor.hot.bundle.js?b75da2b2ba01035968de 9.08 MB 7 [emitted] [big] vendor
0.hot.bundle.js.map?b75da2b2ba01035968de 15.3 kB 0 [emitted]
1.hot.bundle.js?b75da2b2ba01035968de 113 kB 1 [emitted]
2.hot.bundle.js.map?b75da2b2ba01035968de 95 kB 2 [emitted]
app-main.hot.bundle.js.map?b75da2b2ba01035968de 4.14 MB 3 [emitted] [big] app-main
app-public.hot.bundle.js.map?b75da2b2ba01035968de 1.93 MB 4 [emitted] [big] app-public
app-embed.hot.bundle.js.map?b75da2b2ba01035968de 1.93 MB 5 [emitted] [big] app-embed
styles.hot.bundle.js.map?b75da2b2ba01035968de 135 kB 6 [emitted] styles
vendor.hot.bundle.js.map?b75da2b2ba01035968de 9.57 MB 7 [emitted] [big] vendor
../../index.html 4.28 kB [emitted]
../../public.html 4.28 kB [emitted]
../../embed.html 4.28 kB [emitted]
[../../../node_modules/loglevel/lib/loglevel.js] ./node_modules/loglevel/lib/loglevel.js 7.86 kB {7} [built]
[../../../node_modules/webpack-dev-server/client/index.js?http://localhost:8080] (webpack)-dev-server/client?http://localhost:8080 7.63 kB {7} [built]
[../../../node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.61 kB {7} [built]
[./app-embed.js] ./frontend/src/metabase/app-embed.js 664 bytes {5} [built]
[./app-main.js] ./frontend/src/metabase/app-main.js 2.32 kB {3} [built]
[./app-public.js] ./frontend/src/metabase/app-public.js 395 bytes {4} [built]
[./app.js] ./frontend/src/metabase/app.js 3.85 kB {3} {4} {5} [built]
[./css/index.css] ./frontend/src/metabase/css/index.css 1.24 kB {6} [built]
[./lib/api.js] ./frontend/src/metabase/lib/api.js 7.32 kB {3} {4} {5} [built]
[./reducers-public.js] ./frontend/src/metabase/reducers-public.js 820 bytes {4} {5} [built]
[3] multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./app-main.js 52 bytes {3} [built]
[./redux/user.js] ./frontend/src/metabase/redux/user.js 3.57 kB {3} {4} {5} [built]
[4] multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./app-public.js 52 bytes {4} [built]
[5] multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./app-embed.js 52 bytes {5} [built]
[6] multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./css/index.css 52 bytes {6} [built]
+ 2837 hidden modules
Child html-webpack-plugin for "../../index.html":
1 asset
[../../../node_modules/html-webpack-plugin/lib/loader.js!../../../resources/frontend_client/index_template.html] ./node_modules/html-webpack-plugin/lib/loader.js!./resources/frontend_client/index_template.html 4.39 kB {0} [built]
[../../../node_modules/lodash/lodash.js] ./node_modules/lodash/lodash.js 540 kB {0} [built]
[../../../node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 509 bytes {0} [built]
[../../../node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 517 bytes {0} [built]
Child html-webpack-plugin for "../../public.html":
1 asset
[../../../node_modules/html-webpack-plugin/lib/loader.js!../../../resources/frontend_client/index_template.html] ./node_modules/html-webpack-plugin/lib/loader.js!./resources/frontend_client/index_template.html 4.39 kB {0} [built]
[../../../node_modules/lodash/lodash.js] ./node_modules/lodash/lodash.js 540 kB {0} [built]
[../../../node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 509 bytes {0} [built]
[../../../node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 517 bytes {0} [built]
Child html-webpack-plugin for "../../embed.html":
1 asset
[../../../node_modules/html-webpack-plugin/lib/loader.js!../../../resources/frontend_client/index_template.html] ./node_modules/html-webpack-plugin/lib/loader.js!./resources/frontend_client/index_template.html 4.39 kB {0} [built]
[../../../node_modules/lodash/lodash.js] ./node_modules/lodash/lodash.js 540 kB {0} [built]
[../../../node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 509 bytes {0} [built]
[../../../node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 517 bytes {0} [built]
webpack: Compiled successfully.

@jornh
Copy link
Contributor

jornh commented Aug 23, 2018

@zhangdoudou hmm, your “yarn run build-hot” output looks as far as I know good.

The only thing I can think of is that you must keep yarn run build-hot front-end code running in one console window while you then run the back-end with lein ring server in another window.

Maybe, that's already what you're doing - just wanted to be 100% sure.

Other than that one thing you can do is to fall back to do a full lein uberjar build. Then java -jar ./target/uberjar/metabase.jar ... of course that slows you down when doing development - but at least you can develop - just with more waiting ⏳ 😢

@Trap-only
Copy link
Author

yeah,I use two windows to run "yarn run build-hot" and "lein ring server",when I run "./bin/build",after
I run ./target/uberjar/metabase.jar ,everything will be ok.

@salsakran
Copy link
Contributor

closed via #8385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type:Bug Product defects
Projects
None yet
Development

No branches or pull requests

4 participants