You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "cwt9562 (via GitHub)" <gi...@apache.org> on 2025/11/07 02:42:33 UTC

[D] [Q/A][Java SDK (Component)] how to disable ipv6 [dubbo]

GitHub user cwt9562 created a discussion: [Q/A][Java SDK (Component)] how to disable ipv6

### Pre-check

- [X] I am sure that all the content I provide is in English.


### Apache Dubbo Component

Java SDK (apache/dubbo)

### Details

my version is 3.3.4,with org.apache.dubbo:dubbo-spring-boot-starter
but i found this error:
```
io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: getsockopt: /[240e:xxxxxxx:e66]:20880
Caused by: java.net.ConnectException: Connection refused: getsockopt
```
i use nacos as registry. in nacos, service ip was ipv4,but i found a "ipv6=" in matedata

the configration was:
```
dubbo:
  protocols:
    dubbo:
      host: ${spring.cloud.client.ip-address}
      name: dubbo
      port: -1
  registry:
    address: nacos://${spring.cloud.nacos.discovery.server-addr}/serviceManagement?namespace=${spring.cloud.nacos.discovery.namespace}&username=${spring.cloud.nacos.username}&password=${spring.cloud.nacos.password}
  consumer:
    check: false
  application:
    name: dubbo-${spring.application.name}
    logger: slf4j
```

so, my question is, how to disable ipv6?
add -Djava.net.preferIPv4Stack=true was useful, but i want to use yaml configration 

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)


GitHub link: https://github.com/apache/dubbo/discussions/15760

----
This is an automatically sent email for notifications@dubbo.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@dubbo.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [D] [Q/A][Java SDK (Component)] how to disable ipv6 [dubbo]

Posted by "cwt9562 (via GitHub)" <gi...@apache.org>.
GitHub user cwt9562 added a comment to the discussion: [Q/A][Java SDK (Component)] how to disable ipv6

<img width="1410" height="464" alt="ScreenShot_2025-11-07_104341_935" src="https://github.com/user-attachments/assets/eb65b57c-50f8-4bfb-9883-af47b2b26fde" />


GitHub link: https://github.com/apache/dubbo/discussions/15760#discussioncomment-14897965

----
This is an automatically sent email for notifications@dubbo.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@dubbo.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org