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.
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.
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 -
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.
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.
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 byadmin.enableServer=false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With