Zookeeper admin server Port
Asked Answered
L

1

20

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.

Liaoning answered 28/1, 2020 at 6:30 Comment(0)
I
50

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

Idealist answered 30/1, 2020 at 8:38 Comment(6)
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.Liaoning
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.Idealist
This works - the documentation has some confusion though.Liaoning
zkserver start or stop don't work ?? Just using zkserver and Ctrl-CLiaoning
This got me one time. I had another service running on port 8080. And ZK didn't start.Brasilein
I was facing same issue and after adding admin.serverPort=9876 it has fixed my issue. Thank you so much !Worldweary

© 2022 - 2024 — McMap. All rights reserved.