建议使用以下浏览器,以获得最佳体验。 IE 9.0+以上版本 Chrome 31+ 谷歌浏览器 Firefox 30+ 火狐浏览器
请选择 进入手机版 | 继续访问电脑版
设置昵称

在此一键设置昵称,即可参与社区互动!

确定
我再想想
版块 产品交流应用服务微服务引擎 服务注册不成功

死啦死啦

发帖: 3|粉丝: 0

级别 : 新手上路

Rank: 1

+ 关注 发消息

发表于2018-3-18 15:23:20 3033 楼主 阅读模式| 显示全部楼层
[答疑求助] 服务注册不成功

参考该指导手册,porterwebsite能启动成功,但是cse控制台的服务目录里没看到
https://java.huaweicse.com/featu ... porter-website.html
microservice.yaml内容如下:
APPLICATION_ID: springmvc
service_description:
  name: porterwebsite
  version: 0.0.1
  properties:
    allowCrossApp: false
cse:
  service:
    registry:
      address: https://cse.cn-north-1.myhuaweicloud.com:443
      instance:
        watch: false
  config:
    client:
      serverUri: https://cse.cn-north-1.myhuaweicloud.com:443
      refreshMode: 1
      refresh_interval: 5000
  monitor:
    client:
      serverUri: https://cse.cn-north-1.myhuaweicloud.com:443
  rest:
    address: 0.0.0.0:9090
  credentials:
    accessKey: 7Oxxxx
    secretKey: zQxxxx
    akskCustomCipher: default
    project: cn-north-1
servicecomb:
  rest:
    servlet:
      urlPattern: /servicecomb/rest/*


报错如下:
.   ____          _            __ _ _
/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot ::        (v1.4.5.RELEASE)

2018-03-18 15:14:37.047  INFO 8456 --- [           main] c.s.p.PorterwebsiteApplication           : Starting PorterwebsiteApplication on SZA150829097H with PID 8456 (D:\version\eclipseworkspace-spike\porter-website-master\target\classes started by l00303542 in D:\version\eclipseworkspace-spike\porter-website-master)
2018-03-18 15:14:37.050  INFO 8456 --- [           main] c.s.p.PorterwebsiteApplication           : No active profile set, falling back to default profiles: default
2018-03-18 15:14:37.120  INFO 8456 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3c0be339: startup date [Sun Mar 18 15:14:37 CST 2018]; root of context hierarchy
2018-03-18 15:14:37.966  INFO 8456 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from file [D:\version\eclipseworkspace-spike\porter-website-master\target\classes\META-INF\spring\cse.porterwebsite.bean.xml]
2018-03-18 15:14:38.232  INFO 8456 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from URL [jar:file:/C:/Users/l00303542/.m2/repository/org/apache/servicecomb/java-chassis-core/0.5.0.B019/java-chassis-core-0.5.0.B019.jar!/META-INF/spring/cse.bean.xml]
2018-03-18 15:14:38.640  INFO 8456 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from URL [jar:file:/C:/Users/l00303542/.m2/repository/org/apache/servicecomb/foundation-config/0.5.0.B019/foundation-config-0.5.0.B019.jar!/META-INF/spring/cse.bean.xml]
2018-03-18 15:14:38.656  INFO 8456 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from URL [jar:file:/C:/Users/l00303542/.m2/repository/org/apache/servicecomb/handler-bizkeeper/0.5.0.B019/handler-bizkeeper-0.5.0.B019.jar!/META-INF/spring/cse.bean.xml]
2018-03-18 15:14:38.667  INFO 8456 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from URL [jar:file:/C:/Users/l00303542/.m2/repository/org/apache/servicecomb/foundation-metrics/0.5.0.B019/foundation-metrics-0.5.0.B019.jar!/META-INF/spring/metrics.bean.xml]
2018-03-18 15:14:38.677  INFO 8456 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from URL [jar:file:/C:/Users/l00303542/.m2/repository/org/apache/servicecomb/foundation-common/0.5.0.B019/foundation-common-0.5.0.B019.jar!/META-INF/spring/common.bean.xml]
2018-03-18 15:14:38.689  INFO 8456 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from URL [jar:file:/C:/Users/l00303542/.m2/repository/org/apache/servicecomb/handler-loadbalance/0.5.0.B019/handler-loadbalance-0.5.0.B019.jar!/META-INF/spring/cse.bean.xml]
2018-03-18 15:14:38.702  INFO 8456 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from URL [jar:file:/C:/Users/l00303542/.m2/repository/org/apache/servicecomb/foundation-vertx/0.5.0.B019/foundation-vertx-0.5.0.B019.jar!/META-INF/spring/cse.bean.xml]
2018-03-18 15:14:38.747  INFO 8456 --- [           main] o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions from URL [jar:file:/C:/Users/l00303542/.m2/repository/org/apache/servicecomb/transport-rest-client/0.5.0.B019/transport-rest-client-0.5.0.B019.jar!/META-INF/spring/cse.transport.rest.bean.xml]
2018-03-18 15:14:39.396  WARN 8456 --- [           main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2018-03-18 15:14:39.397  INFO 8456 --- [           main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2018-03-18 15:14:39.404  INFO 8456 --- [           main] o.apache.servicecomb.config.ConfigUtil   : create dynamic config:
2018-03-18 15:14:39.436  INFO 8456 --- [           main] o.apache.servicecomb.config.ConfigUtil   : create local config:
2018-03-18 15:14:39.437  INFO 8456 --- [           main] o.apache.servicecomb.config.ConfigUtil   :  file:/D:/version/eclipseworkspace-spike/porter-website-master/target/classes/microservice.yaml.
2018-03-18 15:14:39.479  INFO 8456 --- [           main] o.a.s.f.common.utils.SPIServiceUtils     : Can not get the SPI service, the inte**ce type is: inte**ce org.apache.servicecomb.config.spi.ConfigCenterConfigurationSource
2018-03-18 15:14:39.480  INFO 8456 --- [           main] o.apache.servicecomb.config.ConfigUtil   : config center SPI service can not find, skip to load configuration from config center
2018-03-18 15:14:39.676  INFO 8456 --- [           main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2018-03-18 15:14:40.706  INFO 8456 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 9090 (http)
2018-03-18 15:14:40.727  INFO 8456 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2018-03-18 15:14:40.729  INFO 8456 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.11
2018-03-18 15:14:40.929  INFO 8456 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2018-03-18 15:14:40.930  INFO 8456 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3813 ms
2018-03-18 15:14:41.410  INFO 8456 --- [ost-startStop-1] o.a.s.foundation.common.net.NetUtils     : add network inte**ce name:wlan0,host address:192.168.75.98
2018-03-18 15:14:41.435  INFO 8456 --- [ost-startStop-1] o.a.s.foundation.common.net.NetUtils     : add host name from localhost:SZA150829097H,host address:192.168.75.98
2018-03-18 15:14:41.438  INFO 8456 --- [ost-startStop-1] o.a.s.t.r.servlet.RestServletInjector    : RESTful servlet url pattern: [/*].
2018-03-18 15:14:41.444  INFO 8456 --- [ost-startStop-1] o.a.s.t.rest.servlet.ServletUtils        : UrlPrefix of this instance is "".
2018-03-18 15:14:41.444  INFO 8456 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2018-03-18 15:14:41.448  INFO 8456 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-03-18 15:14:41.449  INFO 8456 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-03-18 15:14:41.449  INFO 8456 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-03-18 15:14:41.449  INFO 8456 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2018-03-18 15:14:41.614  INFO 8456 --- [           main] s.s.g.c.CompositeSwaggerGeneratorContext : Found swagger generator context: org.apache.servicecomb.swagger.generator.springmvc.SpringmvcSwaggerGeneratorContext
2018-03-18 15:14:41.614  INFO 8456 --- [           main] s.s.g.c.CompositeSwaggerGeneratorContext : Found swagger generator context: org.apache.servicecomb.swagger.generator.jaxrs.JaxrsSwaggerGeneratorContext
2018-03-18 15:14:41.614  INFO 8456 --- [           main] s.s.g.c.CompositeSwaggerGeneratorContext : Found swagger generator context: org.apache.servicecomb.swagger.generator.pojo.PojoSwaggerGeneratorContext
2018-03-18 15:14:41.629  INFO 8456 --- [           main] o.a.s.s.i.r.ResponseMappe**ctorys       : found factory org.apache.servicecomb.swagger.invocation.springmvc.response.SpringmvcProducerResponseMappe**ctory of org.apache.servicecomb.swagger.invocation.response.producer.ProducerResponseMappe**ctory:
2018-03-18 15:14:41.629  INFO 8456 --- [           main] o.a.s.s.i.r.ResponseMappe**ctorys       : found factory org.apache.servicecomb.swagger.invocation.response.producer.CseResponseProducerResponseMappe**ctory of org.apache.servicecomb.swagger.invocation.response.producer.ProducerResponseMappe**ctory:
2018-03-18 15:14:41.629  INFO 8456 --- [           main] o.a.s.s.i.r.ResponseMappe**ctorys       : found factory org.apache.servicecomb.swagger.invocation.response.producer.CompletableFutureProducerResponseMappe**ctory of org.apache.servicecomb.swagger.invocation.response.producer.ProducerResponseMappe**ctory:
2018-03-18 15:14:41.629  INFO 8456 --- [           main] o.a.s.s.i.r.ResponseMappe**ctorys       : found factory org.apache.servicecomb.swagger.invocation.jaxrs.response.JaxrsProducerResponseMappe**ctory of org.apache.servicecomb.swagger.invocation.response.producer.ProducerResponseMappe**ctory:
2018-03-18 15:14:41.629  INFO 8456 --- [           main] o.a.s.s.i.r.ResponseMappe**ctorys       : found factory org.apache.servicecomb.swagger.invocation.response.producer.DefaultProducerResponseMappe**ctory of org.apache.servicecomb.swagger.invocation.response.producer.ProducerResponseMappe**ctory:
2018-03-18 15:14:41.635  INFO 8456 --- [           main] o.a.s.s.i.r.ResponseMappe**ctorys       : found factory org.apache.servicecomb.swagger.invocation.springmvc.response.SpringmvcConsumerResponseMappe**ctory of org.apache.servicecomb.swagger.invocation.response.consumer.ConsumerResponseMappe**ctory:
2018-03-18 15:14:41.635  INFO 8456 --- [           main] o.a.s.s.i.r.ResponseMappe**ctorys       : found factory org.apache.servicecomb.swagger.invocation.response.consumer.CseResponseConsumerResponseMappe**ctory of org.apache.servicecomb.swagger.invocation.response.consumer.ConsumerResponseMappe**ctory:
2018-03-18 15:14:41.635  INFO 8456 --- [           main] o.a.s.s.i.r.ResponseMappe**ctorys       : found factory org.apache.servicecomb.swagger.invocation.response.consumer.CompletableFutureConsumerResponseMappe**ctory of org.apache.servicecomb.swagger.invocation.response.consumer.ConsumerResponseMappe**ctory:
2018-03-18 15:14:41.635  INFO 8456 --- [           main] o.a.s.s.i.r.ResponseMappe**ctorys       : found factory org.apache.servicecomb.swagger.invocation.jaxrs.response.JaxrsConsumerResponseMappe**ctory of org.apache.servicecomb.swagger.invocation.response.consumer.ConsumerResponseMappe**ctory:
2018-03-18 15:14:41.635  INFO 8456 --- [           main] o.a.s.s.i.r.ResponseMappe**ctorys       : found factory org.apache.servicecomb.swagger.invocation.response.consumer.DefaultConsumerResponseMappe**ctory of org.apache.servicecomb.swagger.invocation.response.consumer.ConsumerResponseMappe**ctory:
2018-03-18 15:14:42.024  INFO 8456 --- [           main] o.a.s.s.d.MicroserviceDefinition         : load microservice config, name=porterwebsite, paths=[file:/D:/version/eclipseworkspace-spike/porter-website-master/target/classes/microservice.yaml]
2018-03-18 15:14:42.057  INFO 8456 --- [           main] o.a.s.s.registry.ServiceRegistryFactory  : It is running in the normal mode, a separated service registry is required
2018-03-18 15:14:42.171  INFO 8456 --- [           main] o.a.s.core.executor.FixedThreadExecutor  : executor group 2, thread per group 4.
2018-03-18 15:14:42.579  INFO 8456 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@3c0be339: startup date [Sun Mar 18 15:14:37 CST 2018]; root of context hierarchy
2018-03-18 15:14:42.683  INFO 8456 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-03-18 15:14:42.684  INFO 8456 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-03-18 15:14:42.730  INFO 8456 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-03-18 15:14:42.731  INFO 8456 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-03-18 15:14:42.803  INFO 8456 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-03-18 15:14:42.847  INFO 8456 --- [           main] oConfiguration$WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
2018-03-18 15:14:43.084  INFO 8456 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-03-18 15:14:43.174  INFO 8456 --- [           main] o.a.s.t.rest.servlet.RestServlet         : Rest Servlet inited
2018-03-18 15:14:43.182  INFO 8456 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 9090 (http)
2018-03-18 15:14:43.264  INFO 8456 --- [           main] o.a.s.core.transport.TransportManager    : choose org.apache.servicecomb.transport.rest.servlet.ServletRestTransport for rest.
2018-03-18 15:14:43.265  INFO 8456 --- [           main] o.a.s.core.transport.TransportManager    : choose org.apache.servicecomb.transport.highway.HighwayTransport for highway.
2018-03-18 15:14:43.269  WARN 8456 --- [           main] o.a.s.serviceregistry.RegistryUtils      : address /0.0.0.0:9090, auto select a host address to publish 192.168.75.98:9090, maybe not the correct one
2018-03-18 15:14:43.997  INFO 8456 --- [           main] o.a.s.core.transport.TransportManager    : endpoint to publish: rest://192.168.75.98:9090/
2018-03-18 15:14:44.017  WARN 8456 --- [ntloop-thread-4] o.a.s.t.highway.HighwayServerVerticle    : highway listen address is not configured, will not listen.
2018-03-18 15:14:44.020  INFO 8456 --- [           main] o.a.s.s.task.MicroserviceRegisterTask    : running microservice register task.
2018-03-18 15:14:44.877  WARN 8456 --- [ntloop-thread-0] o.a.s.s.c.h.ServiceRegistryClientImpl    : get response for org.apache.servicecomb.serviceregistry.api.response.GetExistenceResponse failed, 400:Bad Request, {"errorCode":"401002","errorMessage":"Request unauthorized","detail":"Invalid request, header is invalid, ak sk or project is empty."}

2018-03-18 15:14:44.991  WARN 8456 --- [ntloop-thread-0] o.a.s.s.c.h.ServiceRegistryClientImpl    : get response for org.apache.servicecomb.serviceregistry.api.response.CreateServiceResponse failed, 400:Bad Request, {"errorCode":"401002","errorMessage":"Request unauthorized","detail":"Invalid request, header is invalid, ak sk or project is empty."}

2018-03-18 15:14:44.991 ERROR 8456 --- [           main] o.a.s.s.task.MicroserviceRegisterTask    : Registry microservice failed. appId=springmvc, name=porterwebsite, version=0.0.1
2018-03-18 15:14:44.992  INFO 8456 --- [           main] o.a.s.s.task.ServiceCenterTask           : read MicroserviceRegisterTask status is READY
2018-03-18 15:14:44.994  INFO 8456 --- [           main] c.s.p.PorterwebsiteApplication           : Started PorterwebsiteApplication in 8.478 seconds (JVM running for 9.025)

回复 举报
分享

分享文章到朋友圈

分享文章到微博

liubao68

发帖: 11|粉丝: 1

级别 : 注册会员

Rank: 2

+ 关注 发消息

发表于2018-3-27 11:04:56 沙发 显示全部楼层
本帖最后由 liubao68 于 2018-3-29 14:17 编辑

看下这个修改是否已经解决你的问题:
https://github.com/huawei-micros ... 7ee30097d0a732484c4


需要引入foundation-auth模块,增加认证功能。或者直接引用封装好的cse-solution-service-engine。
点赞 回复 举报

高超

发帖: 0|粉丝: 0

级别 : 新手上路

Rank: 1

+ 关注 发消息

发表于2018-6-7 10:05:09 板凳 显示全部楼层

点赞 回复 举报

高超

发帖: 0|粉丝: 0

级别 : 新手上路

Rank: 1

+ 关注 发消息

发表于2018-6-7 10:05:41 地板 显示全部楼层

点赞 回复 举报

游客

您需要登录后才可以回帖 登录 | 立即注册