Zookeeper unable to start AdminServer, exiting abnormally when pseudo-cluster test on a single machine

Source: Internet
Author: User

Zookeeper unable to start AdminServer, exiting abnormally when pseudo-cluster test on a single machine

The cause of this problem is known to everyone because after starting a zookeeper server, the default zkserver.cmd does not have a corresponding non-boot adminserver mask.

The code in Adminserverfactory.java is as follows

 public static AdminServer Createadminserver () {if (!) False ". Equals (System.getproperty (" Zookeeper.admin.enableServer "))) {try {class<?> Jettya                Dminserverc = Class.forName ("Org.apache.zookeeper.server.admin.JettyAdminServer");                Object adminserver = Jettyadminserverc.getconstructor (). newinstance ();            Return (AdminServer) AdminServer;            } catch (ClassNotFoundException e) {Log.warn ("Unable to start Jettyadminserver", E);            } catch (Instantiationexception e) {Log.warn ("Unable to start Jettyadminserver", E);            } catch (Illegalaccessexception e) {Log.warn ("Unable to start Jettyadminserver", E);            } catch (InvocationTargetException e) {Log.warn ("Unable to start Jettyadminserver", E);            } catch (Nosuchmethodexception e) {Log.warn ("Unable to start Jettyadminserver", E); } catch (NoclassdeffoundeRror e) {Log.warn ("Unable to load jetty, not starting Jettyadminserver", e);    }} return new Dummyadminserver (); }

Because the first boot of zookeeper server has taken 8080 ports to occupy the

The code under Create Jettyadminserver is as follows:

    Public Jettyadminserver () throws Adminserverexception {This        (Integer.getinteger ("Zookeeper.admin.serverPort", Default_port),             system.getproperty ("Zookeeper.admin.commandURL", Default_command_url));    }

So you can add "-dzookeeper.admin.enableserver=false" to the last call parameter in the Zkserver.cmd


Or

"-dzookeeper.admin.serverport= your port number."  

Change the port number before starting it, so configure the cluster test in a standalone environment OK



Zookeeper a pseudo-cluster test on a single machine, unable to start AdminServer appears, exiting abnormally

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.