cjmamo / kafka-web-console

A web console for Apache Kafka (retired)
Apache License 2.0
762 stars 246 forks source link

Topics list #22

Closed talnicolas closed 10 years ago

talnicolas commented 10 years ago

Hi,

I managed to start the application after adapting a bit the evolutions scripts for the db, successfully registered one zookeepers but nothing appears in the on the Topics page. Here's what I have in the logs:

! @6ii9ko0jf - Internal server error, for (GET) [/topics.json] ->

play.api.Application$$anon$1: Execution exception[[UnsupportedOperationException: > empty.head]] at play.api.Application$class.handleError(Application.scala:293) ~[play_2.10-2.2.1.jar:2.2.1] at play.api.DefaultApplication.handleError(Application.scala:399) [play_2.10-2.2.1.jar:2.2.1] at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$12$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:165) [play_2.10-2.2.1.jar:2.2.1] at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$12$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:162) [play_2.10-2.2.1.jar:2.2.1] at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33) [scala-library-2.10.2.jar:na] at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:185) [scala-library-2.10.2.jar:na] Caused by: java.lang.UnsupportedOperationException: empty.head at scala.collection.immutable.Vector.head(Vector.scala:192) ~[scala-library-2.10.2.jar:na] at common.Util$$anonfun$getPartitionsLogSize$2$$anonfun$apply$16$$anonfun$5.apply(Util.scala:56) ~[classes/:na] at common.Util$$anonfun$getPartitionsLogSize$2$$anonfun$apply$16$$anonfun$5.apply(Util.scala:56) ~[classes/:na] at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:253) [scala-library-2.10.2.jar:na] at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:249) [scala-library-2.10.2.jar:na] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:29) [scala-library-2.10.2.jar:na]

Do you know where the problem could come from?

cjmamo commented 10 years ago

Which version of the console are you using Nicolas?

talnicolas commented 10 years ago

It's the 2.0.0-SNAPSHOT version.

cjmamo commented 10 years ago

Do you have existing topics on Zookeeper?

cjmamo commented 10 years ago

The exception happens when the console tries to retrieve the partition log sizes. Try running the console with the default DB and see if the same exception occurs.

talnicolas commented 10 years ago

Yes I do have topics. I ran it with the default DB but keep getting errors. When I click the staging tab (I registered a stageing Zookeeper) this is what I get:

! @6ijadhk52 - Internal server error, for (GET) [/zookeepers.json/staging] ->

play.api.Application$$anon$1: Execution exception[[JsonMappingException: The object is already closed [90007-172]]] at play.api.Application$class.handleError(Application.scala:293) ~[play_2.10-2.2.1.jar:2.2.1] ... Caused by: com.fasterxml.jackson.databind.JsonMappingException: The object is already closed [90007-172] at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:129) ~[jackson-databind.jar:2.2.2] ... Caused by: org.h2.jdbc.JdbcSQLException: The object is already closed [90007-172] at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) ~[h2.jar:1.3.172] ...

I am able to get my list of topics now.

(By the way, maybe the column "key" in the settings table should be renamed as it is a MySQL keyword).

cjmamo commented 10 years ago

Thanks for letting me know. I'll rename the key column. Regarding that last exception you're seeing, I get that when I use toSeq instead of toList in the model. It could be caused by Squeryl or H2. I'll have to investigate. In the meantime, I'll change the code to use toList.

gayathrisowmya commented 9 years ago

Can u let me know what was the fix to this issue. I am getting the same error now. Topics list is empty though I have topics and the error is as shown below

! @6mo1m620j - Internal server error, for (GET) [/topics.json] ->

play.api.Application$$anon$1: Execution exception[[UnsupportedOperationException: empty.head]] at play.api.Application$class.handleError(Application.scala:293) ~[play_2.10-2.2.1.jar:2.2.1] at play.api.DefaultApplication.handleError(Application.scala:399) [play_2.10-2.2.1.jar:2.2.1] at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$12$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:165) [play_2.10-2.2.1.jar:2.2.1] at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$12$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:162) [play_2.10-2.2.1.jar:2.2.1] at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33) [scala-library.jar:na] at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:185) [scala-library.jar:na] Caused by: java.lang.UnsupportedOperationException: empty.head at scala.collection.immutable.Vector.head(Vector.scala:192) ~[scala-library.jar:na] at controllers.Topic$$anonfun$controllers$Topic$$getPartitionsLogSize$2$$anonfun$apply$26$$anonfun$26.apply(Topic.scala:239) ~[classes/:na] at controllers.Topic$$anonfun$controllers$Topic$$getPartitionsLogSize$2$$anonfun$apply$26$$anonfun$26.apply(Topic.scala:239) ~[classes/:na] at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:253) [scala-library.jar:na] at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:249) [scala-library.jar:na] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:29) [scala-library.jar:na]