GithubHelp home page GithubHelp logo

deemopen / zkui Goto Github PK

View Code? Open in Web Editor NEW
2.3K 2.3K 971.0 493 KB

A UI dashboard that allows CRUD operations on Zookeeper.

Java 70.85% CSS 1.25% JavaScript 1.21% HTML 24.05% Makefile 0.33% Shell 1.51% Dockerfile 0.19% TSQL 0.61%

zkui's Introduction

zkui - Zookeeper UI Dashboard

A UI dashboard that allows CRUD operations on Zookeeper.

Requirements

Requires Java 7 to run.

Setup

  1. mvn clean install
  2. Copy the config.cfg to the folder with the jar file. Modify it to point to the zookeeper instance. Multiple zk instances are coma separated. eg: server1:2181,server2:2181. First server should always be the leader.
  3. Run the jar. ( nohup java -jar zkui-2.0-SNAPSHOT-jar-with-dependencies.jar & )
  4. http://localhost:9090

Login Info

username: admin, pwd: manager (Admin privileges, CRUD operations supported) username: appconfig, pwd: appconfig (Readonly privileges, Read operations supported)

You can change this in the config.cfg

Technology Stack

  1. Embedded Jetty Server.
  2. Freemarker template.
  3. H2 DB.
  4. Active JDBC.
  5. JSON.
  6. SLF4J.
  7. Zookeeper.
  8. Apache Commons File upload.
  9. Bootstrap.
  10. Jquery.
  11. Flyway DB migration.

Features

  1. CRUD operation on zookeeper properties.
  2. Export properties.
  3. Import properties via call back url.
  4. Import properties via file upload.
  5. History of changes + Path specific history of changes.
  6. Search feature.
  7. Rest API for accessing Zookeeper properties.
  8. Basic Role based authentication.
  9. LDAP authentication supported.
  10. Root node /zookeeper hidden for safety.
  11. ACL supported global level.

Import File Format

add property

/appconfig/path=property=value

remove a property

-/path/property

You can either upload a file or specify a http url of the version control system that way all your zookeeper changes will be in version control.

Export File Format

/appconfig/path=property=value

You can export a file and then use the same format to import.

SOPA/PIPA BLACKLISTED VALUE

All password will be displayed as SOPA/PIPA BLACKLISTED VALUE for a normal user. Admins will be able to view and edit the actual value upon login. Password will be not shown on search / export / view for normal user. For a property to be eligible for black listing it should have (PWD / pwd / PASSWORD / password) in the property name.

LDAP

If you want to use LDAP authentication provide the ldap url. This will take precedence over roleSet property file authentication. ldapUrl=ldap://<ldap_host>:<ldap_port>/dc=mycom,dc=com If you dont provide this then default roleSet file authentication will be used.

REST call

A lot of times you require your shell scripts to be able to read properties from zookeeper. This can now be achieved with a http call. Password are not exposed via rest api for security reasons. The rest call is a read only operation requiring no authentication.

Eg: http://localhost:9090/acd/appconfig?propNames=foo&host=myhost.com This will first lookup the host name under /appconfig/hosts and then find out which path the host point to. Then it will look for the property under that path.

There are 2 additional properties that can be added to give better control. cluster=cluster1 http://localhost:9090/acd/appconfig?propNames=foo&cluster=cluster1&host=myhost.com In this case the lookup will happen on lookup path + cluster1.

app=myapp http://localhost:9090/acd/appconfig?propNames=foo&app=myapp&host=myhost.com In this case the lookup will happen on lookup path + myapp.

A shell script will call this via MY_PROPERTY="$(curl -f -s -S -k "http://localhost:9090/acd/appconfig?propNames=foo&host=`hostname -f`" | cut -d '=' -f 2)" echo $MY_PROPERTY

Standardization

Zookeeper doesnt enforce any order in which properties are stored and retrieved. ZKUI however organizes properties in the following manner for easy lookup. Each server/box has its hostname listed under /appconfig/hosts and that points to the path where properties reside for that path. So when the lookup for a property occurs over a rest call it first finds the hostname entry under /appconfig/hosts and then looks for that property in the location mentioned. eg: /appconfig/hosts/myserver.com=/appconfig/dev/app1 This means that when myserver.com tries to lookup the propery it looks under /appconfig/dev/app1

You can also append app name to make lookup easy. eg: /appconfig/hosts/myserver.com:testapp=/appconfig/dev/test/app1 eg: /appconfig/hosts/myserver.com:prodapp=/appconfig/dev/prod/app1

Lookup can be done by grouping of app and cluster. A cluster can have many apps under it. When the bootloader entry looks like this /appconfig/hosts/myserver.com=/appconfig/dev the rest lookup happens on the following paths. /appconfig/dev/.. /appconfig/dev/hostname.. /appconfig/dev/app.. /appconfig/dev/cluster.. /appconfig/dev/cluster/app..

This standardization is only needed if you choose to use the rest lookup. You can use zkui to update properties in general without worry about this organizing structure.

HTTPS

You can enable https if needed. keytool -keystore keystore -alias jetty -genkey -keyalg RSA

Limitations

  1. ACLs are fully supported but at a global level.

Screenshots

Basic Role Based Authentication

Dashboard Console

CRUD Operations

Import Feature

Track History of changes

Status of Zookeeper Servers

License & Contribution

ZKUI is released under the Apache 2.0 license. Comments, bugs, pull requests, and other contributions are all welcomed!

Thanks to Jozef Krajčovič for creating the logo which has been used in the project. https://www.iconfinder.com/iconsets/origami-birds

zkui's People

Contributors

bryant1410 avatar daimaqiao avatar dependabot[bot] avatar gitorko avatar premprakashp avatar roman-yepishev-enoc avatar vipwangtian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zkui's Issues

Disable login function without password

修改WEB不要密码就能访问的功能
cd ~/App/zkui/src/main/java/com/deem/zkui/filter/
cp AuthFilter.java AuthFilter.java.bak
vi AuthFilter.java

public void doFilter
这个函数改成
@OverRide
public void doFilter(ServletRequest req, ServletResponse res, FilterChain fc) throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;

    fc.doFilter(req, res);
}

保存退出

pkill -9 -f "zkui-2.0-SNAPSHOT-jar-with-dependencies.jar"
cd ~/App/zkui/
mvn clean install

Monitor page is empty

Hi,

I installed Zookeeper UI on AWS and I have a problem. The Monitor web page is empty, it shows the IPs of all servers but not the servers status.

I investigated a little and I think I found the problem. I noticed that the "status" and "envi" commands are sent trough netcat. The problem is that it's using the -q option which is not supported on RedHat based distributions.

E.g.
/bin/sh -c 'echo stat' | nc -q5 127.0.0.1 2181
returns
nc: invalid option -- 'q'

The -q option should be used only when supported.

appconfig/hosts should add/update upon startup

First of all--great project! Just forked this and am gonna contribute.

First issue--appconfig/hosts does not get created upon initial zkui and does not update upon subsequent startups. Should do both.

Getting more done in GitHub with ZenHub

Hola! @sguclu has created a ZenHub account for the DeemOpen organization. ZenHub is the leading team collaboration and project management solution built for GitHub.


How do I use ZenHub?

To get set up with ZenHub, all you have to do is download the browser extension and log in with your GitHub account. Once you do, you’ll get access to ZenHub’s complete feature-set immediately.

What can ZenHub do?

ZenHub adds a series of enhancements directly inside the GitHub UI:

  • Real-time, customizable task boards for GitHub issues;
  • Burndown charts, estimates, and velocity tracking based on GitHub Milestones;
  • Personal to-do lists and task prioritization;
  • “+1” button for GitHub issues and comments;
  • Drag-and-drop file sharing;
  • Time-saving shortcuts like a quick repo switcher.

Add ZenHub to GitHub

Still curious? See more ZenHub features or read user reviews. This issue was written by your friendly ZenHub bot, posted by request from @sguclu.

ZenHub Board

Unable to locate the Javac Compiler in.

I want install zkui on centos 7.1, But I have this error.

[root@server-1 zkui]# mvn clean install
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building zkui 2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ zkui ---
[INFO] Deleting /root/zkui/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ zkui ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 29 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ zkui ---
[INFO] Compiling 20 source files to /root/zkui/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] Unable to locate the Javac Compiler in:
  /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64/jre/../lib/tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.680 s
[INFO] Finished at: 2018-01-02T08:17:00-05:00
[INFO] Final Memory: 11M/102M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project zkui: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR]   /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64/jre/../lib/tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Mvn version:

[root@server-1 zkui]# mvn -v
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T03:58:13-04:00)
Maven home: /usr/local/maven3
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-229.el7.x86_64", arch: "amd64", family: "unix"

Also my JAVA_HOME :

[root@server-1 zkui]# echo $JAVA_HOME  
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64/jre

NoSuchMethodError org.slf4j.spi.LocationAwareLogger.log

I pulled the project and did a mvn clean install and then I wanted to start the container.
The code fails with following exception.

java -jar target/zkui-2.0-SNAPSHOT-jar-with-dependencies.jar
Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
        at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:120)
        at com.googlecode.flyway.core.util.logging.apachecommons.ApacheCommonsLog.debug(ApacheCommonsLog.java:39)
        at com.googlecode.flyway.core.dbsupport.DbSupportFactory.createDbSupport(DbSupportFactory.java:59)
        at com.googlecode.flyway.core.Flyway.execute(Flyway.java:1177)
        at com.googlecode.flyway.core.Flyway.migrate(Flyway.java:819)
        at com.deem.zkui.dao.Dao.checkNCreate(Dao.java:56)
        at com.deem.zkui.Main.main(Main.java:61)

Have you encountered this error before?

DNS problem

When I use domain name inside my company to connect to the zookeeper server, error showed below in /home page

HTTP ERROR 500

Problem accessing /home. Reason:

    Server Error
Caused by:

java.lang.NullPointerException
	at com.deem.zkui.utils.ZooKeeperUtil.listNodeEntries(ZooKeeperUtil.java:255)
	at com.deem.zkui.controller.Home.doGet(Home.java:71)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1564)
	at com.deem.zkui.filter.AuthFilter.doFilter(AuthFilter.java:63)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1544)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1105)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1039)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:445)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:277)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:216)
	at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532)
	at java.lang.Thread.run(Thread.java:748)

Error building the zkui

Getting the following error when building the Project

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.830 s
[INFO] Finished at: 2017-01-26T16:54:31-05:00
[INFO] Final Memory: 28M/342M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:single (make-assembly) on project zkui: Failed to create assembly: Failed to retrieve OS environment variables. Reason: Cannot run program "env": error=2, No such file or directory -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:single (make-assembly) on project zkui: Failed to create assembly: Failed to retrieve OS environment variables. Reason: Cannot run program "env": error=2, No such file or directory
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
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 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create assembly: Failed to retrieve OS environment variables. Reason: Cannot run program "env": error=2, No such file or directory
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:433)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)

Exception in thread "main" java.net.BindException: Address already in use

Hi ,
Am new to zookeeper Ui , am trying to just install it my Mac system , I followed the steps which are mentioned but it shows "address already in use" again and again .
I tried changing the port number , still not working .
I verified using netsat command , no other process is running with 9090 .
Has anyone faced this issue ?

docker support

Could you please upload the image to docker hub and provide the install guide for docker in readme?

exception on startup

Mar 21, 2018 7:31:49 AM com.googlecode.flyway.core.command.DbMigrate migrate
INFO: Current version of schema "PUBLIC": 1
Mar 21, 2018 7:31:49 AM com.googlecode.flyway.core.command.DbMigrate logSummary
INFO: Schema "PUBLIC" is up to date. No migration necessary.
log4j:WARN No appenders could be found for logger (org.eclipse.jetty.util.log).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" java.lang.NullPointerException
	at com.deem.zkui.Main.main(Main.java:103)

running by docker command:

docker run -d --name zkui -p 9090:9090 -e ZKUI_ZK_SERVER=127.0.0.1:2181 qnib/zkui

Am I missing something?

New to git, but I cloned this and do not see the file zkui-2.0-SNAPSHOT-jar-with-dependencies.jar that is supposed to run it...?

thanks

How do I run this behind an nginx proxy?

nginx is configured as,

        location /zkui {
                proxy_pass http://localhost:8090;
        }

But zkui will reference from /. Is there a config I can force it referencing to /zkui?

import special characters not displayed properly

import file content is

/=测试名字=测试值hahaha

image
image

Change Import.java

uploadFileName = item.getName();
//this cause error
//sbFile.append(item.getString()); 

//this can work well
sbFile.append(item.getString("UTF-8"));

docker build

Step 4 : ADD zkui-*.jar /var/app/zkui.jar
No source files were specified

zkui-*.jar 在那个地方?

ldap authentication - DN is not constructed correctly

The pattern for building the value of Context.SECURITY_PRINCIPAL is defined to be domain\user.
This is not generally correct.

The "Context.SECURITY_PRINCIPAL" should be the DN of the user. The definition of the mapping from
the username provided on the login screen to the DN should be freely configurable, as the DN can be virtually anything.

Fix: Provide a property "userDNPattern"
(maybe like spring ldap does via "uid={0},ou=whatiwant", where {0} is replaced by the username from the login screen)
Use this inside the class "LdapAuth" instead of the hard wired "domain\user".

Hint: Newly added properties in config.cfg should have a reasonable default value in the java-code if they
are not found in config.cfg! Some container builds grab the latest version from here, but provide their own config file. They will fail if they have missing values in their config otherwise.

500 Error on monitor page

HTTP ERROR 500
Problem accessing /monitor. Reason:
Server Error
Caused by:
java.lang.ArrayIndexOutOfBoundsException: 1
at com.deem.zkui.controller.Monitor.doGet(Monitor.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1564)
at com.deem.zkui.filter.AuthFilter.doFilter(AuthFilter.java:63)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1544)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1105)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1039)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:445)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:277)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:216)
at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532)
at java.lang.Thread.run(Thread.java:745)

Did not wait for the zk session caused every operation become very slow

I can not commit or push code, so, just point out what the problem is and how to fix it.

The gui is very slow while we do any action on it, that's because every time it start up a new connection to zk server.

The problem exists in the com.deem.zkui.utils.ServletUtil.java's getZookeeper function.

It did not wait for the zk to establish connection to zk server.
'''
zk = ZooKeeperUtil.INSTANCE.createZKConnection(zkServer, zkSessionTimeout);
ZooKeeperUtil.INSTANCE.setDefaultAcl(globalProps.getProperty("defaultAcl"));
if (zk.getState() != ZooKeeper.States.CONNECTED) {
session.setAttribute("zk", null);
} else {
session.setAttribute("zk", zk);
}
'''

fix, add a sleep before check the connection status:
'''
zk = ZooKeeperUtil.INSTANCE.createZKConnection(zkServer, zkSessionTimeout);
ZooKeeperUtil.INSTANCE.setDefaultAcl(globalProps.getProperty("defaultAcl"));
while (zk.getState() == ZooKeeper.States.CONNECTING){
Thread.sleep(100);
}
if (zk.getState() != ZooKeeper.States.CONNECTED) {
session.setAttribute("zk", null);
} else {
session.setAttribute("zk", zk);
}
'''

All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead

问题描述:
在 mysql Ver 15.1 Distrib 10.1.28-MariaDB 上执行V1__Core.sql 正常.
在 mysql Ver 14.14 Distrib 5.7.18 上执行报All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead. (需要将堆栈打印到日志才能看到, 否则可能看到Error trying to migrate db! Not severe hence proceeding forward.)

解决方法:
修改文件V1__Core.sql ,
将 id bigint default null auto_increment primary key 改为 id bigint not null auto_increment primary key 即可.
重新启动之前把库中表schema_version删掉, 以免出现其它问题.

bootstrap.sh can't support Unix.

I think docker/bootstrap.sh is written in Windows.
I build it then run it:

docker build -t zkui:2.0 .
docker-compose up -d zkui

then run it, it report errors. /bin/sh^M: bad interpreter: No such file or directory
this is my docker-compose.yaml

version: "3"
services:
  zookeeper:
    image: zookeeper:3.4.13
    restart: always
    ports:
      - "2181:2181"
  zkui:
    image: zkui:2.0
    ports:
      - "9090:9090"
    environment:
      - ZK_SERVER=zookeeper:2181
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    depends_on:
      - zookeeper

I have solve this problem, I rewrote bootstrap.sh in Linux.

LDAP 认证失败

配置如下:不用通过admin登陆。
ldapAuth=true
ldapDomain=voice.com
#ldap authentication url. Ignore if using file based authentication.
ldapUrl=ldap://Win2008.voice.com:389/dc=voice,dc=com
#Specific roles for ldap authenticated users. Ignore if using file based authentication.
ldapRoleSet={"users": [{ "username":"voice\admin" , "role": "ADMIN" }]}

Cant add property values with special chars

Hi,

i cant insert propertys with special chars like "ß" or "é". Zookeeper it self allow these chars.

Propertyname: test
Propertyvalue: testß

Result: Error 500
Caused by:
java.lang.NullPointerException
at com.deem.zkui.controller.Home.doPost(Home.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1564)
at com.deem.zkui.filter.AuthFilter.doFilter(AuthFilter.java:63)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1544)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1105)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1039)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:445)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:277)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:216)
at org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532)
at java.lang.Thread.run(Unknown Source)

Best regards

Stefan

KeeperErrorCode = NoNode for /appconfig/hosts

2018-08-03 15:21:09 ERROR Home:103 - [org.apache.zookeeper.KeeperException.create(KeeperException.java:111), org.apache.zookeeper.KeeperException.create(KeeperException.java:51), org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1468), org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1496), com.deem.zkui.utils.ZooKeeperUtil.listNodeEntries(ZooKeeperUtil.java:255), com.deem.zkui.controller.Home.doGet(Home.java:79), javax.servlet.http.HttpServlet.service(HttpServlet.java:687), javax.servlet.http.HttpServlet.service(HttpServlet.java:790), org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698), org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1564), com.deem.zkui.filter.AuthFilter.doFilter(AuthFilter.java:63), org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1544), org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524), org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138), org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568), org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221), org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1105), org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453), org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183), org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1039), org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136), org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52), org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97), org.eclipse.jetty.server.Server.handle(Server.java:445), org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:277), org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:216), org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505), org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601), org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532), java.lang.Thread.run(Thread.java:745)]
2018-08-03 15:21:09 ERROR ServletUtil:76 - Error :KeeperErrorCode = NoNode for /appconfig/hosts

Error :KeeperErrorCode = ConnectionLoss for / after Login

when login then zkui error

2017-05-08 15:04:52 INFO  Login:108 - Login successful: admin
2017-05-08 15:05:11 ERROR Home:103 - [org.apache.zookeeper.KeeperException.create(KeeperException.java:99), org.apache.zookeeper.KeeperException.create(KeeperException.java:51), org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1468), org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1496), com.deem.zkui.utils.ZooKeeperUtil.listNodeEntries(ZooKeeperUtil.java:255), com.deem.zkui.controller.Home.doGet(Home.java:71), javax.servlet.http.HttpServlet.service(HttpServlet.java:687), javax.servlet.http.HttpServlet.service(HttpServlet.java:790), org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698), org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1564), com.deem.zkui.filter.AuthFilter.doFilter(AuthFilter.java:63), org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1544), org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524), org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138), org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568), org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221), org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1105), org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453), org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183), org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1039), org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136), org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52), org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97), org.eclipse.jetty.server.Server.handle(Server.java:445), org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:277), org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:216), org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505), org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601), org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532), java.lang.Thread.run(Thread.java:745)]
2017-05-08 15:05:11 ERROR ServletUtil:75 - Error :KeeperErrorCode = ConnectionLoss for /

but I can use Monitor

Kerberos implementation

Hi,

Just test it, and have a kerberos based issue:
KeeperErrorCode = NoAuth for /hadoop-ha

Is it possible to filter zk spaces out? i don't like that anyone could tinker around in our HA config.

thanks,
--alex

Bind zkui on 127.0.0.1

I need to run the application on 127.0.0.1:9090 but I do not see the necessary options in the config file, and also in the source code (eg, serverHost = 127.0.0.1). Please tell me how to do it and is it possible?

Can not work in JDK1.9 environment

In JDK1.9 environment, it can be started via "java -jar ......" command, but when access the url localhost:9090, it shows /home 404 not found error. Change the java environment to JDK1.8, then it works.

KeeperErrorCode = ConnectionLoss for /

when connent to 3 zkServer using zookeeper 3.4.10 get error like this

2016-04-07 16:30:27 ERROR Home:103 - [org.apache.zookeeper.KeeperException.create(KeeperException.java:99), org.apache.zookeeper.KeeperException.create(KeeperException.java:51), org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1468), org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:1496), com.deem.zkui.utils.ZooKeeperUtil.listNodeEntries(ZooKeeperUtil.java:255), com.deem.zkui.controller.Home.doGet(Home.java:71), javax.servlet.http.HttpServlet.service(HttpServlet.java:687), javax.servlet.http.HttpServlet.service(HttpServlet.java:790), org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698), org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1564), com.deem.zkui.filter.AuthFilter.doFilter(AuthFilter.java:63), org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1544), org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:524), org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138), org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568), org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221), org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1105), org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:453), org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183), org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1039), org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136), org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52), org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97), org.eclipse.jetty.server.Server.handle(Server.java:445), org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:277), org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:216), org.eclipse.jetty.io.AbstractConnection$1.run(AbstractConnection.java:505), org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601), org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532), java.lang.Thread.run(Thread.java:722)]
2016-04-07 16:30:27 ERROR ServletUtil:75 - Error :KeeperErrorCode = ConnectionLoss for /

HTTP ERROR 404

After running $ nvm clean install and $ cp config.cfg target/ and $ java -jar zkui-2.0-SNAPSHOT-jar-with-dependencies.jar, the browser shows:

image

build error--`Plugin execution not covered by lifecycle configuration: org.javalite:activejdbc-instrumentation

Hi, when I import the project,I found the build error,like:
Plugin execution not covered by lifecycle configuration: org.javalite:activejdbc-instrumentation:1.4.1:instrument (execution: default, phase: process- classes)
Error occurs in pom.xml:
<plugin> <groupId>org.javalite</groupId> <artifactId>activejdbc-instrumentation</artifactId> <version>1.4.1</version> <executions> <execution> <phase>process-classes</phase> <goals> <goal>instrument</goal> </goals> </execution> </executions> </plugin>

Could you give me some tips to fix it?

Thank you for your help.

Add Property | Value textarea is too small

I like your program the only issue is that the Value TEXTAREA is too small. I am using the Value as not just a single-line entry but to store an entire file (multi-line). It would be nice if the modal dialog was larger in general and the value area was larger.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.