Nacos启动报错:java.net.UnknownHostException: jmenv.tbsite.net

当首次接触Nacos并启动时遇到`java.net.UnknownHostException:jmenv.tbsite.net`错误,可以通过将启动模式改为单机(standalone)来解决。Windows下使用`startup.cmd -m standalone`,Linux下使用`startup.sh -m standalone`。如果需要集群启动,则需配置集群相关设置。
摘要由CSDN通过智能技术生成

第一次接触Nacos,启动时报错(java.net.UnknownHostException: jmenv.tbsite.net)解决方案。

错误信息:

Caused by: java.net.UnknownHostException: jmenv.tbsite.net
        at java.net.InetAddress.getAllByName0(InetAddress.java:1280)
        at java.net.InetAddress.getAllByName(InetAddress.java:1192)
        at java.net.InetAddress.getAllByName(InetAddress.java:1126)
        at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
        at com.alibaba.nacos.common.http.BaseHttpClient.execute(BaseHttpClient.java:45)
        at com.alibaba.nacos.common.http.NacosSyncHttpClient.get(NacosSyncHttpClient.java:46)
        at com.alibaba.nacos.core.cluster.lookup.AddressServerMemberLookup.syncFromAddressUrl(AddressServerMemberLookup.java:155)
        at com.alibaba.nacos.core.cluster.lookup.AddressServerMemberLookup.run(AddressServerMemberLookup.java:101)
        ... 123 common frames omitted

解决方案:

Nacos默认是集群(cluster)启动,将其设置为单机(standalone)启动则不会报这个错。若需要集群启动则需要进行相关的集群配置。

windows启动:

startup.cmd -m standalone

linux启动:

startup.sh -m standalone

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值