apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.5k stars 26.43k forks source link

dubbo使用元数据中心,zookeeper地址如果太长,会报错Failed to save service store file #12302

Open yeeeee7 opened 1 year ago

yeeeee7 commented 1 year ago

dubbo:3.2.0版本 zookeeper地址使用k8s headless地址:data-zookeeper-0.zookeepers.platform.svc.cluster.local:2181,data-zookeeper- 1.zookeepers.platform.svc.cluster.local:2181,data-zookeeper-2.zookeepers.platform.svc.cluster.local:2181

报错日志 2023-05-15 14:41:14.311 [TID:N/A] [DubboSaveMetadataReport-thread-1] WARN o.a.d.m.s.z.ZookeeperMetadataReport:? - [DUBBO] Failed to save service store file, cause: File name too long, dubbo version: 3.2.0, current host: 100.64.0.4, error code: 0-12. This may be caused by , go to https://dubbo.apache.org/faq/0/12 to find instructions. java.io.IOException: File name too long at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method) at java.base/java.io.File.createNewFile(File.java:1035) at org.apache.dubbo.metadata.report.support.AbstractMetadataReport.doSaveProperties(AbstractMetadataReport.java:171) at org.apache.dubbo.metadata.report.support.AbstractMetadataReport.access$100(AbstractMetadataReport.java:83) at org.apache.dubbo.metadata.report.support.AbstractMetadataReport$SaveProperties.run(AbstractMetadataReport.java:267) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 2023-05-15 14:41:14.311 [TID:N/A] [DubboSaveMetadataReport-thread-1] WARN o.a.d.m.s.z.ZookeeperMetadataReport:? - [DUBBO] Failed to save service store file, cause: File name too long, dubbo version: 3.2.0, current host: 100.64.0.4, error code: 0-12. This may be caused by , go to https://dubbo.apache.org/faq/0/12 to find instructions. java.io.IOException: File name too long at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method) at java.base/java.io.File.createNewFile(File.java:1035) at org.apache.dubbo.metadata.report.support.AbstractMetadataReport.doSaveProperties(AbstractMetadataReport.java:171) at org.apache.dubbo.metadata.report.support.AbstractMetadataReport.access$100(AbstractMetadataReport.java:83) at org.apache.dubbo.metadata.report.support.AbstractMetadataReport$SaveProperties.run(AbstractMetadataReport.java:267) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) 2023-05-15 14:41:14.311 [TID:N/A] [DubboSaveMetadataReport-thread-1] WARN o.a.d.m.s.z.ZookeeperMetadataReport:? - [DUBBO] Failed to save service store file, cause: File name too long, dubbo version: 3.2.0, current host: 100.64.0.4, error code: 0-12. This may be caused by , go to https://dubbo.apache.org/faq/0/12 to find instructions. java.io.IOException: File name too long at java.base/java.io.UnixFileSystem.createFileExclusively(Native Method) at java.base/java.io.File.createNewFile(File.java:1035) at org.apache.dubbo.metadata.report.support.AbstractMetadataReport.doSaveProperties(AbstractMetadataReport.java:171) at org.apache.dubbo.metadata.report.support.AbstractMetadataReport.access$100(AbstractMetadataReport.java:83) at org.apache.dubbo.metadata.report.support.AbstractMetadataReport$SaveProperties.run(AbstractMetadataReport.java:267) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)

AlbumenJ commented 1 year ago

@aamingaa PTAL

aamingaa commented 1 year ago

前缀太长了,windows会把地址前缀也算进去

yeeeee7 commented 1 year ago

如何解决?是linux报错,不是windows @aamingaa

ShenFeng312 commented 8 months ago

@yeeeee7 不太严格的说 在k8s 中xxx.svc.cluster.local 和xxx 是相同的 其实你可以直接去掉svc.cluster.local 后缀