Logon authentication And Support for multiple users

Does Metabase support 100-200 simultaneous users? When I create 50 users and use the JMeter test (calling API/api/session), it returns“Too many attempts! You must wait 15 seconds before trying again.” What should I do to support 100-200 people using it at the same time?I’ve set the maximum number of threads for jetty to 450。
Version in use:v0.31.3
Running environment:linux

@zsk
Didn’t you get the answer in the issue you created?
https://github.com/metabase/metabase/issues/10019

Sorry, I didn’t get a valid answer from the connection you shared. If I open a maximum of 450 threads, and then 100 people use the software at the same time, can Metabase support it? By the way, how do I change the number of jetty threads from 50 to 450 in the source code

@zsk

But you’re making connections with JMeter from a single machine (IP), so I’m pretty sure that’s why you’re seeing the rate limit.
And you were testing the login, so unless you expect several hundred users to be logging in at the same time, then it shouldn’t be a problem.

You don’t have to change the source code to have more threads in Jetty.
Just set the environment variable MB_JETTY_MAXTHREADS=450
But note that it will use more RAM.

You should probably use a reverse proxy (like Nginx etc.) to take care of connections, since it’s usually better at handling thousands of connections compared to Jetty.

And if you expect high traffic, then you should consider running multiple instances of Metabase instead of one huge server.

Thank you very much for your reply. I think I can do it.
Finally, I want to ask why this error occurs when compiling and packaging Linux:Checking whether resources/modules/snowflake.metabase-driver.jar exists…
File does not exist. Driver verification failed.
No existing build, or existing build is invalid. (Re)building driver.
Deleting old versions of snowflake driver…

Finally appeared return -3
Looking forward to your reply

@zsk
Which branch/tag are you trying to build?
How are you trying to build?
What versions of java, leining, …?

branch:release-0.32.x

java version:
openjdk version “1.8.0_181”
OpenJDK Runtime Environment (build 1.8.0_181-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

nodejs ersion:v10.15.3

lein version: Leiningen 2.9.1 on Java 1.8.0_181 OpenJDK 64-Bit Server VM

yarn version:1.15.2

Compilation environment:linux 64

There is no problem compiling branch v0.31.3 in the same environment, but both release-0.32.x and tag v0.32.8 will have the same error.

So the entire build is failing?
And you’re just running ./bin/build to build?
Try running ./bin/build-drivers.sh clean to remove any old drivers.
Otherwise try another environment (like a VM or docker), just to see if something might be off with the current environment.

The final return of the entire build fails, but it generates metabase. jar, which he can use, of course. But I think he must have mouxiexieti.

You’re right. I built it directly through*. / bin / build*

I’m trying to use the command*. / bin / build-drivers clean*.
So far, the whole process is not over yet.But it’s already prompted for errors:
Checking whether resources/modules/googleanalytics.metabase-driver.jar exists…
File does not exist. Driver verification failed.
No existing build, or existing build is invalid. (Re)building driver.

Checking whether resources/modules/druid.metabase-driver.jar exists…
File does not exist. Driver verification failed.
No existing build, or existing build is invalid. (Re)building driver.

Those are not errors. They are information about the process.

Building parent drivers (if needed)…
Building sparksql driver…
WARNING: You have $CLASSPATH set, probably by accident.
It is strongly recommended to unset this before proceeding.
WARNING: You have $CLASSPATH set, probably by accident.
It is strongly recommended to unset this before proceeding.
Leiningen’s classpath: .:/usr/java/jdk1.8.0_131/lib:/usr/java/jdk1.8.0_131/jre/lib::/root/.lein/self-installs/leiningen-2.9.1-standalone.jar
Applying task uberjar to []
Could not find artifact jdk.tools:jdk.tools:jar:1.8 at specified path /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/jre/…/lib/tools.jar
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the ‘http_proxy’ environment variable.
clojure.lang.ExceptionInfo: Could not resolve dependencies {:suppress-msg true, :exit-code 1}
at leiningen.core.classpath$get_dependencies_STAR_.invokeStatic(classpath.clj:312)
at leiningen.core.classpath$get_dependencies_STAR_.invoke(classpath.clj:266)
at clojure.lang.AFn.applyToHelper(AFn.java:165)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:665)
at clojure.core$memoize$fn__6862.doInvoke(core.clj:6353)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at leiningen.core.classpath$get_dependencies$fn__6105.invoke(classpath.clj:333)
at leiningen.core.classpath$get_dependencies.invokeStatic(classpath.clj:331)
at leiningen.core.classpath$get_dependencies.doInvoke(classpath.clj:325)
at clojure.lang.RestFn.invoke(RestFn.java:445)
at clojure.lang.AFn.applyToHelper(AFn.java:160)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invokeStatic(core.clj:671)
at clojure.core$apply.invoke(core.clj:660)
at leiningen.core.classpath$resolve_managed_dependencies.invokeStatic(classpath.clj:444)
at leiningen.core.classpath$resolve_managed_dependencies.doInvoke(classpath.clj:431)
at clojure.lang.RestFn.invoke(RestFn.java:445)
at leiningen.core.eval$prep.invokeStatic(eval.clj:85)
at leiningen.core.eval$prep.invoke(eval.clj:73)
at leiningen.jar$build_jar.invokeStatic(jar.clj:286)
at leiningen.jar$build_jar.invoke(jar.clj:283)
at leiningen.jar$main_jar.invokeStatic(jar.clj:295)
at leiningen.jar$main_jar.invoke(jar.clj:291)
at leiningen.jar$jar.invokeStatic(jar.clj:346)
at leiningen.jar$jar.invoke(jar.clj:328)
at leiningen.uberjar$uberjar$fn__10301.invoke(uberjar.clj:167)
at leiningen.uberjar$uberjar.invokeStatic(uberjar.clj:167)
at leiningen.uberjar$uberjar.invoke(uberjar.clj:143)
at leiningen.uberjar$uberjar.invokeStatic(uberjar.clj:187)
at leiningen.uberjar$uberjar.invoke(uberjar.clj:143)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$apply.invoke(core.clj:660)
at leiningen.core.main$partial_task$fn__6592.doInvoke(main.clj:284)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.lang.AFunction$1.doInvoke(AFunction.java:31)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$apply.invoke(core.clj:660)
at leiningen.core.main$apply_task.invokeStatic(main.clj:334)
at leiningen.core.main$apply_task.invoke(main.clj:320)
at leiningen.core.main$resolve_and_apply.invokeStatic(main.clj:343)
at leiningen.core.main$resolve_and_apply.invoke(main.clj:336)
at leiningen.core.main$main$fn__6681.invoke(main.clj:452)
at leiningen.core.main$main.invokeStatic(main.clj:442)
at leiningen.core.main$main.doInvoke(main.clj:439)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.core$apply.invokeStatic(core.clj:665)
at clojure.main$main_opt.invokeStatic(main.clj:491)
at clojure.main$main_opt.invoke(main.clj:487)
at clojure.main$main.invokeStatic(main.clj:598)
at clojure.main$main.doInvoke(main.clj:561)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:37)
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact jdk.tools:jdk.tools:jar:1.8 at specified path /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/jre/…/lib/tools.jar
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:355)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:167)
at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:102)
at cemerick.pomegranate.aether$resolve_dependencies_STAR
.invokeStatic(aether.clj:806)
at cemerick.pomegranate.aether$resolve_dependencies_STAR
.doInvoke(aether.clj:707)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:665)
at clojure.core$apply.invoke(core.clj:660)
at cemerick.pomegranate.aether$resolve_dependencies.invokeStatic(aether.clj:815)
at cemerick.pomegranate.aether$resolve_dependencies.doInvoke(aether.clj:809)
at clojure.lang.RestFn.invoke(RestFn.java:2793)
at leiningen.core.classpath$get_dependencies_STAR
.invokeStatic(classpath.clj:274)
… 60 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact jdk.tools:jdk.tools:jar:1.8 at specified path /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/jre/…/lib/tools.jar
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:422)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:224)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:338)
… 75 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact jdk.tools:jdk.tools:jar:1.8 at specified path /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/jre/…/lib/tools.jar
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:264)
… 77 more
Uberjar aborting because jar failed: Could not resolve dependencies
Error: could not find /opt/metabase-release-0.32.x/modules/drivers/sparksql/target/uberjar/sparksql.metabase-driver.jar. Build failed.
./bin/build-driver.sh: 第 157 行:return: -3: 无效选项
return: 用法:return [n]
Failed to build driver sparksql.

These are the returned errors. Are you sure that these errors are only information about the process? Can the resulting metabase. jar be used stably?

Okay, that’s completely different. It clearly says Error and aborting.
That’s not the same as the driver building process as you posted before.

It seems to fail because of a missing artifact:

Could not find artifact jdk.tools:jdk.tools:jar:1.8 at specified path /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/jre/…/lib/tools.jar
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the ‘http_proxy’ environment variable.
clojure.lang.ExceptionInfo: Could not resolve dependencies {:suppress-msg true, :exit-code 1}

Again, try another environment (like a VM or docker), just to see if something might be off with the current environment.

I don’t quite understand what you mean. Why the same environment v0.31.3, v0.32.2 can be, but release-0-32-x, v0.32.8 can not. I’m currently using Centos 64

I use the latest version of metabase.Com. This will happen in the course of use.

He will mention it in console:
Uncaught (in promise) TypeError: Cannot read property 'type' of undefined
at Function.value (app-main.bundle.js:5)
at e.value (app-main.bundle.js:5)
at app-main.bundle.js:5
at a (app-main.bundle.js:5)
at e.n.value (app-main.bundle.js:5)
at e.value (app-main.bundle.js:5)
at app-main.bundle.js:5
at vendor.bundle.js:1
at vendor.bundle.js:1
at vendor.bundle.js:1

It looks like you’ve already created an issue about the compiling error:
https://github.com/metabase/metabase/issues/9941
I’ve just compiled release-0.32.x (commit 16be46d3cbd5cfa6ddf54953db1108782f3aa22a) without any errors, so I think there’s something wrong with your environment.
When you’ve tested with a new environment, then please close the issue.

I cannot reproduce the javascript error on 0.32.8 with Sample Dataset - it shows the drill-through menu as it should.

您能提供一下您的编译环境么?


I used the new environment to compile it. Although the number of errors was reduced, the above error still occurred in the end.

Can you provide me with your compilation environment? I tried to change the compilation environment, but there were still mistakes.

As I wrote earlier, you’re getting an error about a missing artifact:
Could not find artifact jdk.tools:jdk.tools:jar:1.8 at specified path /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/jre/…/lib/tools.jar
That looks to be what’s causing the Spark driver build.

I would think it might be something to do with OpenJDK vs OracleJDK.

My test build environment:

:~$ java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
:~$ nodejs --version
v10.15.3
:~$ lein --version
Leiningen 2.9.1 on Java 1.8.0_201 Java HotSpot(TM) 64-Bit Server VM
:~$ yarn --version
1.16.0
:~$ lsb_release -d
Ubuntu 18.10