Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zookeeper admin server Port

Installed zookeeper 3.5.6 bin on windows. Getting error: Unable to start AdminServer, exiting abnormally org.apache.zookeeper.server.admin.AdminServer$AdminServerException: Problem starting AdminServer on address 0.0.0.0, port 8080 and command URL /commands

Where do I find the AdminServer configuration properties to fix this. In my conf directory the .cfg does not have anything, and I cant find anything anywhere else either?? The documentation is referring to zookeeper.admin.serverPort properties etc.

like image 641
Sam-T Avatar asked Jan 28 '20 06:01

Sam-T


People also ask

How do I disable the admin server in CP-zookeeper?

The Admin Server is enabled by default in the cp-zookeeper image version 5.4.0. This means that zookeeper spawns up a web server on port 8080 by default. You can disable it, or change the port using zookeepers conf file, but this is not possible using environment variables.

How to expose the zookeeper port to Docker host?

If you want to expose the port to docker host you should assign different port mappings to both of your zookeeper container. In this case, you are trying to change the container's internal admin server port which is not required. You can take the example of following docker-compose file -

What is the zookeeper configuration file?

The configuration file lists the contact information for each server identified by its server id. When a ZooKeeper server instance starts, it reads its id from the myid file and then, using that id, reads from the configuration file, looking up the port on which it should listen.

Should I Turn on leader selection in Zookeeper?

Turning on leader selection is highly recommended when you have more than three ZooKeeper servers in an ensemble. servers making up the ZooKeeper ensemble. When the server starts up, it determines which server it is by looking for the file myid in the data directory.


1 Answers

By default, Admin Server binds to port 8080, in case port 8080 already in use this exception will be thrown.

Add below property to conf/zoo.cfg file and restart zk server.
admin.serverPort=9876 (other port than 8080)

Or you could disable admin server altogether by
admin.enableServer=false

like image 76
Kamal Kumar Avatar answered Sep 21 '22 20:09

Kamal Kumar