seata 注册到 nacos , 在 seata 时报如下错误:

2020-04-26 10:55:14.530 ERROR[main]io.seata.server.Server.main:95 -rpcServer init error:ErrCode:500, ErrMsg:failed to req API:/api//nacos/v1/ns/instance after all servers([http://nacos.puppy.com:8089/]) tried: <html><body><h1>Whitelabel Error Page</h1><p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p><div id='created'>Sun Apr 26 10:55:14 CST 2020</div><div>There was an unexpected error (type=Internal Server Error, status=500).</div><div>The request was rejected because the URL was not normalized.</div></body></html>
java.lang.RuntimeException: ErrCode:500, ErrMsg:failed to req API:/api//nacos/v1/ns/instance after all servers([http://nacos.puppy.com:8089/]) tried: <html><body><h1>Whitelabel Error Page</h1><p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p><div id='created'>Sun Apr 26 10:55:14 CST 2020</div><div>There was an unexpected error (type=Internal Server Error, status=500).</div><div>The request was rejected because the URL was not normalized.</div></body></html>
	at io.seata.core.rpc.netty.RpcServerBootstrap.start(RpcServerBootstrap.java:160)
	at io.seata.core.rpc.netty.AbstractRpcRemotingServer.init(AbstractRpcRemotingServer.java:140)
	at io.seata.core.rpc.netty.RpcServer.init(RpcServer.java:59)
	at io.seata.server.Server.main(Server.java:93)
Caused by: com.alibaba.nacos.api.exception.NacosException: failed to req API:/api//nacos/v1/ns/instance after all servers([http://nacos.puppy.com:8089/]) tried: <html><body><h1>Whitelabel Error Page</h1><p>This application has no explicit mapping for /error, so you are seeing this as a fallback.</p><div id='created'>Sun Apr 26 10:55:14 CST 2020</div><div>There was an unexpected error (type=Internal Server Error, status=500).</div><div>The request was rejected because the URL was not normalized.</div></body></html>
	at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:490)
	at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:395)
	at com.alibaba.nacos.client.naming.net.NamingProxy.reqAPI(NamingProxy.java:391)
	at com.alibaba.nacos.client.naming.net.NamingProxy.registerService(NamingProxy.java:210)
	at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:207)
	at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:182)
	at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:170)
	at io.seata.discovery.registry.nacos.NacosRegistryServiceImpl.register(NacosRegistryServiceImpl.java:84)
	at io.seata.core.rpc.netty.RpcServerBootstrap.start(RpcServerBootstrap.java:156)
	... 3 common frames omitted
2020-04-26 10:55:14.533 INFO [ShutdownHook]io.seata.core.rpc.netty.RpcServer.destroy:69 -destroyed rpcServer

 

原因是因为配置 nacos 地址时, 在后面多加了一个

报错的配置

留意 端口后的

 nacos {
    application = "seata-server"
    serverAddr = "http://nacos.xxxxxxxx.com:8089/"
    namespace = ""
    cluster = "default"
    username = "nacos"
    password = "nacos"
  }

 

修正后:

留意 端口后的

nacos {
    application = "seata-server"
    serverAddr = "http://nacos.puppy.com:8089"
    namespace = ""
    cluster = "default"
    username = "nacos"
    password = "nacos"
  }

 

Logo

加入社区!打开量化的大门,首批课程上线啦!

更多推荐