开发者社区> 问答> 正文

安装轻量配置中心


轻量配置中心给开发者提供在开发、调试、测试的过程中的服务发现、注册和查询功能。此模块不属于 EDAS 正式环境中的服务,使用时请下载安装包进行安装。
在一个公司内部,通常只需要在一台机器上安装轻量配置中心服务,并在其他开发机器上绑定特定的 Host 即可。具体安装和使用的步骤请参见下文。

安装轻量配置中心


  1. 确认环境是否达到要求。

    • 正确配置环境变量 JAVA_HOME,指向一个 1.6 或 1.6 以上版本的 JDK。

    • 确认 8080 和 9600 端口未被使用。
      由于启动 EDAS 配置中心将会占用此台机器的 8080 和 9600 端口,因此推荐您找一台 [backcolor=transparent]专门的 机器启动 EDAS 配置中心,比如某台测试机器。如果您是在同一台机器上进行测试,请将 Web 项目的端口修改为其它未被占用的端口。

  • 启动 EDAS 配置中心。
    下载 EDAS 配置中心安装包 并解压。
    如有需要,可以下载历史版本:
    • 2017年07月版本
    • 2017年03月版本
    • 2016年12月版本

  • 进入 edas-config-center 目录启动配置中心:
    • Windows 操作系统:请双击 startup.bat。
    • Unix 操作系统:请在当前目录下执行 sh startup.sh 命令。


  • 轻量配置中心的使用


    对于需要使用轻量配置中心的开发机器,请在本地 DNS(hosts 文件)中,将 jmenv.tbsite.net 域名指向启动了 EDAS 配置中心的机器 IP。
    hosts 文件的路径如下:

    • Windows 操作系统:C:\Windows\System32\drivers\etc\hosts

    • Unix 操作系统:/etc/hosts

    [backcolor=transparent]示例:
    如果您在 IP 为 192.168.1.100 的机器上面启动了 EDAS 配置中心,则所有开发者只需要在机器的 hosts 文件里加入如下一行即可。
    192.168.1.100 jmenv.tbsite.net
    绑定 Host 解析后,HSF 服务将基于此注册中心进行服务注册与发现。

    展开
    收起
    猫饭先生 2017-10-26 10:38:38 3255 0
    1 条回答
    写回答
    取消 提交回答
    • 注册中心已经安装,但是注册不进去,请教可有解决方案?
      edas-config-center 注册中心在阿里云  centos_7_03 上已经安装并启动了,但是从我本地的windows电脑启动服务器注册不进去,139.224.236.48  jmenv.tbsite.net 也已经配置。报错:
      2018-06-25 12:29:01:957 - [http-bio-8089-exec-6] ERROR o.s.boot.web.support.ErrorPageFilter.handleCommittedResponse - Cannot forward to error page for request [/] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false
      org.apache.catalina.connector.ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
          at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:367)
          at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:331)
          at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:101)
          at com.fasterxml.jackson.core.json.UTF8JsonGenerator.flush(UTF8JsonGenerator.java:1054)
          at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:953)
          at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.writeInternal(AbstractJackson2HttpMessageConverter.java:286)
          at org.springframework.http.converter.AbstractGenericHttpMessageConverter.write(AbstractGenericHttpMessageConverter.java:106)
          at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:231)
          at org.springframework.web.servlet.mvc.method.annotation.HttpEntityMethodProcessor.handleReturnValue(HttpEntityMethodProcessor.java:208)
          at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:81)
          at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:113)
          at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
          at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
          at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
          at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
          at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
          at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
          at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
          at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at com.jackrain.nea.ResourcesFilter$Localfilter.doFilter(ResourcesFilter.java:62)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
          at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:110)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
          at org.springframework.boot.web.support.ErrorPageFilter.handleErrorStatus(ErrorPageFilter.java:151)
          at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:119)
          at org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:61)
          at org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:92)
          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
          at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:110)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
          at com.taobao.tomcat.valves.ContextLoadFilterValve$FilterChainAdapter.doFilter(ContextLoadFilterValve.java:191)
          at com.taobao.eagleeye.EagleEyeFilter.doFilter(EagleEyeFilter.java:81)
          at com.taobao.tomcat.valves.ContextLoadFilterValve.invoke(ContextLoadFilterValve.java:150)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1080)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.lang.Thread.run(Thread.java:748)
      Caused by: java.net.SocketException: Connection reset by peer: socket write error
          at java.net.SocketOutputStream.socketWrite0(Native Method)
          at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
          at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
          at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215)
          at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
          at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:119)
          at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:803)
          at org.apache.coyote.Response.action(Response.java:172)
          at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:363)
          ... 86 common frames omitted
      2018-06-25 12:32:32
      赞同 展开评论 打赏
    问答排行榜
    最热
    最新

    相关电子书

    更多
    基于ECS倚天实例的应用构建最佳实践 立即下载
    k8s自动伸缩那些事资料下载 立即下载
    弹性加速计算实例(EAIS)产品发布 立即下载