16

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.

Sam-T
  • 1,877
  • 6
  • 23
  • 51

1 Answers1

45

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

Kamal Kumar
  • 474
  • 5
  • 9
  • That easy- I will try and report. Somehow, as mentioned, the documentation does not say which file to put this config in. The zoo.cfg- has default values for everything, but not these. You think there is some other config file, but cant find. – Sam-T Jan 30 '20 at 19:45
  • I faced same problem as you, and solved by adding `admin.serverPort` property in `zoo.cfg` file only. You can also verify admin server running on given port in logs. – Kamal Kumar Jan 31 '20 at 10:19
  • This works - the documentation has some confusion though. – Sam-T Feb 04 '20 at 17:46
  • `zkserver start` or stop don't work ?? Just using `zkserver` and `Ctrl-C` – Sam-T Feb 04 '20 at 17:55
  • This got me one time. I had another service running on port 8080. And ZK didn't start. – Vijay Kumar Apr 23 '20 at 19:35