Open awaemmanuel opened 8 years ago
@awaemmanuel
You can edit file /etc/kafka-manager/application.ini
and replace path /var/run/${{app_name}}.pid
.
And you can put -Dconfig.file=/usr/local/kafka-manager/conf/application.conf -Dhttp.port=9001
into this file.
Hello @alexshadow007,
Thanks for your response.
What should I replace -Dpidfile.path=/var/run/{{app_name}}.pid
with please?
This is what my application.ini file looks like now.
-Dpidfile.path=/var/run/kafka-manager.pid
-Dconfig.file=/usr/local/kafka-manager/conf/application.conf -Dhttp.port=9001
Is it accurate?
I have the above configuration and then when I run it I get file not found exception. I think create it and I still get this errors
ubuntu@ip-172-31-2-43:/usr/local/kafka-manager$ kafka-manager
Oops, cannot start the server.
java.io.FileNotFoundException: /var/run/kafka-manager.pid (Permission denied)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at play.core.server.ProdServerStart$.createPidFile(ProdServerStart.scala:131)
at play.core.server.ProdServerStart$.start(ProdServerStart.scala:45)
at play.core.server.ProdServerStart$.main(ProdServerStart.scala:27)
at play.core.server.ProdServerStart.main(ProdServerStart.scala)
ubuntu@ip-172-31-2-43:/usr/local/kafka-manager$ sudo touch /var/run/kafka-manager.pid
ubuntu@ip-172-31-2-43:/usr/local/kafka-manager$ kafka-manager
This application is already running (Or delete /var/run/kafka-manager.pid file).
@awaemmanuel
You don't have permissions to write into /var/run/
.
You must use folder which you have write permissions.
For example: -Dpidfile.path=/tmp/kafka-manager.pid
.
Thanks that works, just have another error that seems related to RequireJS
[warn] o.w.RequireJS - Could not read WebJar RequireJS config for: json 20121008
Please file a bug at: http://github.com/webjars/json/issues/new
[warn] o.w.RequireJS - Could not read WebJar RequireJS config for: dustjs-linkedin 2.6.1
Please file a bug at: http://github.com/webjars/dustjs-linkedin/issues/new
I contacted the developer and he says it's fixed in 2.6.1-1. Where can I update this library..
@awaemmanuel https://github.com/yahoo/kafka-manager/pull/185
@alexshadow007 :I've changed the dependencies of dustjs and json. Recompiled. The warning disappears, but nothing shows on the UI. Blank page. All my brokers are all up and running.
@alexshadow007 - I get the following error when starting kafka-manager...
my application.ini as follows, -Dpidfile.path=kafka-manager.pid -Dconfig.file=application.conf -Dhttp.port=9077
$ ./kafka-manager
21:58:32,654 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
21:58:32,654 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
21:58:32,655 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/C:/GIT-workspace/kafka/kafka-manager/target/universal/kafka-manager-1.3.0.4/conf/logback.xml]
21:58:32,859 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
21:58:32,861 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word coloredLevel with class [play.api.Logger$ColoredLevel]
21:58:32,861 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
21:58:32,871 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
21:58:32,924 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
21:58:33,011 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No compression will be used
21:58:33,013 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern application.%d{yyyy-MM-dd}.log for the active file
21:58:33,020 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'application.%d{yyyy-MM-dd}.log'.
21:58:33,020 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
21:58:33,025 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Tue Feb 02 21:58:33 MST 2016
21:58:33,031 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: application.home_IS_UNDEFINED/logs/application.log
21:58:33,032 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [application.home_IS_UNDEFINED/logs/application.log]
21:58:33,039 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [C:\GIT-workspace\kafka\kafka-manager\target\universal\kafka-manager-1.3.0.4\application.home_IS_UNDEFINED\logs\application.log]
21:58:33,040 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(application.home_IS_UNDEFINED/logs/application.log,true) call failed. java.io.FileNotFoundException: application.home_IS_UNDEFINED\logs\application.log (The system cannot find the path specified)
at java.io.FileNotFoundException: application.home_IS_UNDEFINED\logs\application.log (The system cannot find the path specified)
at at java.io.FileOutputStream.open0(Native Method)
at at java.io.FileOutputStream.open(FileOutputStream.java:270)
at at java.io.FileOutputStream.
21:58:32,654 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
21:58:32,654 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
21:58:32,655 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/C:/GIT-workspace/kafka/kafka-manager/target/universal/kafka-manager-1.3.0.4/conf/logback.xml]
21:58:32,859 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
21:58:32,861 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word coloredLevel with class [play.api.Logger$ColoredLevel]
21:58:32,861 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
21:58:32,871 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
21:58:32,924 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
21:58:33,011 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No compression will be used
21:58:33,013 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern application.%d{yyyy-MM-dd}.log for the active file
21:58:33,020 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'application.%d{yyyy-MM-dd}.log'.
21:58:33,020 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
21:58:33,025 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Tue Feb 02 21:58:33 MST 2016
21:58:33,031 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: application.home_IS_UNDEFINED/logs/application.log
21:58:33,032 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [application.home_IS_UNDEFINED/logs/application.log]
21:58:33,039 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [C:\GIT-workspace\kafka\kafka-manager\target\universal\kafka-manager-1.3.0.4\application.home_IS_UNDEFINED\logs\application.log]
21:58:33,040 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(application.home_IS_UNDEFINED/logs/application.log,true) call failed. java.io.FileNotFoundException: application.home_IS_UNDEFINED\logs\application.log (The system cannot find the path specified)
at java.io.FileNotFoundException: application.home_IS_UNDEFINED\logs\application.log (The system cannot find the path specified)
at at java.io.FileOutputStream.open0(Native Method)
at at java.io.FileOutputStream.open(FileOutputStream.java:270)
at at java.io.FileOutputStream.
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.
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.
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.
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.
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.
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.
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.
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.
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)
You can try setting it to put it under the /var/log/kafka-manager
directory. I build an RPM from the project and part of that it created a system user kafka-manager
which when I tried to start the service it created /var/log/kafka-manager
My application.ini
-Dconfig.file=/usr/share/kafka-manager/conf/application.conf
-Dpidfile.path=/var/run/kafka-manager/kafka-manager.pid
-Dhttp.host=0.0.0.0
-Dhttp.port=9001
Is this still an open issue? The pid file path can be controlled by the application.ini file as haydenk noted about.
@venkates77 I've got the same error, have you got any solutions for this?
If you are making a rpm package you must edit src/templates/etc-default and change the JAVA_OPTS (and probably PIDFILE even though it doesn't appear to get read): -/var/run/${{app_name}}/.pid +/var/run/${{app_name}}/running.pid
Before making the package. If you already made the package. You can just edit /etc/default/kafka-manager and change the pid on the JAVA_OPTS line.
At least that is what worked for me.
Did anyone resolve this problem - https://github.com/yahoo/kafka-manager/issues/192#issuecomment-179010987 ? I am seeing the same error.
I have a pull request to resolve this issue, see: https://github.com/yahoo/kafka-manager/pull/321
kafka-manager -Dconfig.file=/usr/local/kafka-manager/conf/application.conf -Dhttp.port=9001 Oops, cannot start the server. java.io.FileNotFoundException: /var/run/${{app_name}}.pid (Permission denied) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(FileOutputStream.java:270) at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:162)
at play.core.server.ProdServerStart$.createPidFile(ProdServerStart.scala:131)
at play.core.server.ProdServerStart$.start(ProdServerStart.scala:45)
at play.core.server.ProdServerStart$.main(ProdServerStart.scala:27)
at play.core.server.ProdServerStart.main(ProdServerStart.scala)