好吧,如果 网址 返回404,然后这是一个更好的标志,因为它可能只是路由表尚未更新。如果你可以从容器里面击中受体网址 receptor.192.168.11.11.xip.io ,然后打一个尤里卡服务器应该没有什么不同吧?
receptor.192.168.11.11.xip.io
解决方案实际上在部署时非常前进,因为它们将能够解析大脑的IP。您只需在您的主机中明确指定主机名即可 [bootstrap|application].yml 配置& ltc create 命令。
[bootstrap|application].yml
ltc create
eureka: instance: hostname: ${INSTANCE_HOST:localhost}
APPNAME="eureka1" TARGET=`ltc target | grep Target | cut -d':' -f2 | sed -e 's/[^0-9a-zA-Z\.]//g'` LATTICE_CLI_TIMEOUT=180 ltc create $APPNAME distributedspring/config-server --memory-mb=0 -e \ EUREKA_PEER=http://eureka2.$TARGET/eureka/ \ -e RABBIT_HOST=rabbit-5672.$TARGET \ -e INSTANCE_HOST=$APPNAME.$TARGET \ -e INSTANCE_ID=$APPNAME \ -e PREFER_IP=false \ --no-monitor
APPNAME=eureka2 TARGET=`ltc target | grep Target | cut -d':' -f2 | sed -e 's/[^0-9a-zA-Z\.]//g'` LATTICE_CLI_TIMEOUT=180 ltc create $APPNAME distributedspring/config-server --memory-mb=0 \ -e EUREKA_PEER=http://eureka1.$TARGET/eureka/ \ -e RABBIT_HOST=rabbit-5672.$TARGET \ -e INSTANCE_HOST=$APPNAME.$TARGET \ -e INSTANCE_ID=$APPNAME \ -e PREFER_IP=false \ --no-monitor