CMAK icon indicating copy to clipboard operation
CMAK copied to clipboard

ProvisionException: Unable to provision

Open peetasan opened this issue 10 years ago • 7 comments

starting the server with

sudo -u kafka-web /opt/kafka-manager-1.3.0.8/bin/kafka-manager -Dapplication.home=/opt/kafka-manager-1.3.0.8 -Dpidfile.path=/opt/kafka-manager-1.3.0.8/RUNNING_PID -Dconfig.file=/etc/kafka-manager/application.conf -Dhttp.port=9090

but it doesn't start due to the following error:

Oops, cannot start the server.
com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Could not find a suitable constructor in controllers.Application. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
  at controllers.Application.class(Application.scala:16)
  while locating controllers.Application
    for parameter 1 at router.Routes.<init>(Routes.scala:63)
  while locating router.Routes
  while locating play.api.inject.RoutesProvider
  while locating play.api.routing.Router

2) Could not find a suitable constructor in controllers.Cluster. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
  at controllers.Cluster.class(Cluster.scala:28)
  while locating controllers.Cluster
    for parameter 2 at router.Routes.<init>(Routes.scala:63)
  while locating router.Routes
  while locating play.api.inject.RoutesProvider
  while locating play.api.routing.Router

3) Could not find a suitable constructor in controllers.Consumer. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
  at controllers.Consumer.class(Consumer.scala:16)
  while locating controllers.Consumer
    for parameter 5 at router.Routes.<init>(Routes.scala:63)
  while locating router.Routes
  while locating play.api.inject.RoutesProvider
  while locating play.api.routing.Router

4) Could not find a suitable constructor in controllers.Logkafka. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
  at controllers.Logkafka.class(Logkafka.scala:33)
  while locating controllers.Logkafka
    for parameter 4 at router.Routes.<init>(Routes.scala:63)
  while locating router.Routes
  while locating play.api.inject.RoutesProvider
  while locating play.api.routing.Router

5) Could not find a suitable constructor in controllers.PreferredReplicaElection. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
  at controllers.PreferredReplicaElection.class(PreferredReplicaElection.scala:26)
  while locating controllers.PreferredReplicaElection
    for parameter 6 at router.Routes.<init>(Routes.scala:63)
  while locating router.Routes
  while locating play.api.inject.RoutesProvider
  while locating play.api.routing.Router

6) Could not find a suitable constructor in controllers.ReassignPartitions. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
  at controllers.ReassignPartitions.class(ReassignPartitions.scala:27)
  while locating controllers.ReassignPartitions
    for parameter 7 at router.Routes.<init>(Routes.scala:63)
  while locating router.Routes
  while locating play.api.inject.RoutesProvider
  while locating play.api.routing.Router

7) Could not find a suitable constructor in controllers.Topic. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
  at controllers.Topic.class(Topic.scala:33)
  while locating controllers.Topic
    for parameter 3 at router.Routes.<init>(Routes.scala:63)
  while locating router.Routes
  while locating play.api.inject.RoutesProvider
  while locating play.api.routing.Router

8) Could not find a suitable constructor in controllers.api.KafkaStateCheck. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.
  at controllers.api.KafkaStateCheck.class(KafkaStateCheck.scala:19)
  while locating controllers.api.KafkaStateCheck
    for parameter 8 at router.Routes.<init>(Routes.scala:63)
  while locating router.Routes
  while locating play.api.inject.RoutesProvider
  while locating play.api.routing.Router

8 errors
    at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025)
    at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
    at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:321)
    at play.api.inject.guice.GuiceInjector.instanceOf(GuiceInjectorBuilder.scala:316)
    at play.api.Application$class.routes(Application.scala:112)
    at play.api.DefaultApplication.routes(Application.scala:241)
    at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:90)
    at play.api.Play$$anonfun$start$1.apply(Play.scala:87)
    at play.api.Play$$anonfun$start$1.apply(Play.scala:87)
    at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
    at play.api.Play$.start(Play.scala:87)
    at play.core.server.ProdServerStart$.start(ProdServerStart.scala:54)
    at play.core.server.ProdServerStart$.main(ProdServerStart.scala:27)
    at play.core.server.ProdServerStart.main(ProdServerStart.scala)

Do you have an idea why this could happen? Thanks

peetasan avatar Jul 08 '16 15:07 peetasan

Running into the same issue ☝️

vmahedia avatar Aug 10 '16 23:08 vmahedia

Me too!

vgrivel avatar Aug 11 '16 14:08 vgrivel

The problem was the application.conf. I had an old version! Be sure you have the right version and you will be able to start.

vgrivel avatar Aug 12 '16 08:08 vgrivel

@vgrivel I got this working. Actually, I was using zkHosts with ZK namespace in configuration but then I found that it does not work, need to give the base zk path for manager using kafka-manager.base-zk-path. Now waiting for 0.10.0.0 support.

Thank you.

vmahedia avatar Aug 12 '16 18:08 vmahedia

I meet this error too!

DeeeFOX avatar Aug 16 '16 01:08 DeeeFOX

You can try unzip again,Maybe it's all right.

wangmingli avatar Nov 01 '16 09:11 wangmingli

what's the reason? who can tell me? thanks

wanbf avatar Aug 01 '18 03:08 wanbf