Node.js 无法将nodejs micro服务与spring引导应用程序(zuul服务器)连接

Node.js 无法将nodejs micro服务与spring引导应用程序(zuul服务器)连接,node.js,spring,spring-boot,netflix-eureka,netflix-zuul,Node.js,Spring,Spring Boot,Netflix Eureka,Netflix Zuul,我正在尝试使用zuul服务器(api网关)将node.js微服务与spring引导应用程序连接起来 zuul application.properties: spring.application.name=api-gateway hystrix.shareSecurityContext=true eureka.client.service-url.default-zone=http://localhost:8761/eureka zuul.routes.node-simple.service

我正在尝试使用zuul服务器(api网关)将node.js微服务与spring引导应用程序连接起来

zuul application.properties:

spring.application.name=api-gateway
hystrix.shareSecurityContext=true
eureka.client.service-url.default-zone=http://localhost:8761/eureka


zuul.routes.node-simple.serviceId=node-simple
zuul.routes.node-simple.path=/node-simple/**

zuul.routes.home.path=/home
zuul.routes.home.url=http://localhost:8080
zuul.sensitive-headers=Cookie,Set-Cookie
server.port=8080
节点js eureka配置

const client = new Eureka({
  instance: {
    id: appName,    
    instanceId: 'node',
    app: appName,
    hostName: 'localhost',
    ipAddr: '127.0.0.1',
    statusPageUrl: 'http://localhost:8200',
    port: {
      '$': PORT,
      '@enabled': 'true',
    },
    vipAddress: appName,
    dataCenterInfo: {
      '@class': 'com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo',
      name: 'MyOwn',
    }
  },
  eureka: {
    host: 'localhost',
    port: 8761,
    servicePath: '/eureka/apps/'
  }
});
当我尝试转到eureka上zuul(api网关)的URL时,我遇到以下错误:

负载平衡器没有可用于客户端的服务器:简单节点


这是我在zuul设置中的配置。zuul安装程序从Eureka服务器获取路由信息

zuul.sensitive-headers= Cookie,Set-Cookie
zuul.strip-prefix=false
zuul.debug.request=true

spring.application.name= zuul-server
eureka.instance.preferIpAddress=true
eureka.client.registerWithEureka=true
eureka.client.fetchRegistry=true
eureka.client.serviceUrl.defaultZone=${EUREKA_URI:http://localhost:8761/eureka}
下面是我的Eureka配置

eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
eureka.server.enable-self-preservation=false

为了能够注册nodejs应用程序并在路由请求时找到它,我遵循了。实现与Eureka服务器的连接并维护Netflix的通信

Zuul正在维护选择另一种方法

你看到node js应用程序在Eureka注册了吗?是的,这让我很困惑!作为AppNd您传递的是什么值?这没有什么帮助,请考虑添加注释。