-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apollo.meta; nested exception is java.net.UnknownHostException: apollo.meta #5117
Comments
Hey @starsky20, back for more Apollo adventures, I see! 🚀 Based on the error log you provided, it seems that the Apollo service is trying to resolve a hostname ( In the Apollo codebase, the To resolve this issue, you have a couple of options:
Without more specific details on where I also found a similar issue in the Apollo repository: apollo客户端无法获取项目下apollo-env.properties中的dev.meta地址. The suggested solution there is to ensure that the If the issue persists, consider debugging the I hope this helps! If you need further assistance, please provide more details about your configuration and where Sources
|
按照您提供的解决办法,分别验证了以下几种办法: 2.在C:\opt\settings\server.properties 文件中添加env=DEV 3.启动增加jvm参数 -Dapollo_profile=github -Denv=dev -Dapollo.meta=http://192.168.3.174:8080 以上三种方式都不可以,还是提示无法java.net.UnknownHostException: apollo.meta。调试代码后发现是env环境没有生效导致。 |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions. |
1.我是基于最新的 master 分支 build 编译的,未改动服务端口地址。
2.根据官网说明,分别修改了configservice、adminservice数据库application-github.properties配置。通过idea 分别启动服务指定了激活环境 -Dapollo_profile=github,auth,configservice、adminservice启动正常,通过访问8080测试,eureka正常,两个服务健康状态正常。
3.修改了protal数据库serverconfig 配置 apollo.portal.envs=dev。apollo.portal.meta.servers={"dev":"http://192.168.3.174:8080"}
4.修改protalservice服务配置文件apollo-env.properties,只是配置了dev.meta=http://192.168.3.174:8080, 其他的全部注释了。
修改application-github.properties的数据库连接。启动服务时指定了激活环境-Dapollo_profile=github,auth,dev。
启动报错内容如下:
6912 --- [ main] .f.a.p.e.DefaultPortalMetaServerProvider : Loaded meta server addresses from system property, os environment and properties file: {DEV=http://192.168.3.174:8080}
2024-03-31 21:59:57.482 WARN 16912 --- [erviceLocator-1] c.c.f.a.p.e.PortalMetaDomainService : Meta server address fallback to [http://apollo.meta] for env [FAT], because it is not available in MetaServerProvider
2024-03-31 21:59:57.611 ERROR 16912 --- [erviceLocator-1] c.c.f.a.p.c.AdminServiceAddressLocator : Get admin server address from meta server failed. env: FAT, meta server address:http://apollo.meta
org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://apollo.meta/services/admin": apollo.meta; nested exception is java.net.UnknownHostException: apollo.meta
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:791)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:717)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:340)
at com.ctrip.framework.apollo.portal.component.AdminServiceAddressLocator.getAdminServerAddress(AdminServiceAddressLocator.java:141)
at com.ctrip.framework.apollo.portal.component.AdminServiceAddressLocator.refreshServerAddressCache(AdminServiceAddressLocator.java:121)
at com.ctrip.framework.apollo.portal.component.AdminServiceAddressLocator.access$200(AdminServiceAddressLocator.java:43)
at com.ctrip.framework.apollo.portal.component.AdminServiceAddressLocator$RefreshAdminServerAddressTask.run(AdminServiceAddressLocator.java:102)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.UnknownHostException: apollo.meta
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
请问异常apollo.meta时什么原因?
The text was updated successfully, but these errors were encountered: