Skip to content
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

InetUtils throw Exception #12321

Closed
shalk opened this issue Jul 8, 2024 · 0 comments · Fixed by #12325
Closed

InetUtils throw Exception #12321

shalk opened this issue Jul 8, 2024 · 0 comments · Fixed by #12325

Comments

@shalk
Copy link
Contributor

shalk commented Jul 8, 2024

Describe the bug
nacos server have some error log, when the server have some special network interface.

java.net.SocketException: No such device (getFlags() failed)
        at java.net.NetworkInterface.isUp0(Native Method)
        at java.net.NetworkInterface.isUp(NetworkInterface.java:399)
        at com.alibaba.nacos.sys.utils.InetUtils.findFirstNonLoopbackAddress(InetUtils.java:195)
        at com.alibaba.nacos.sys.utils.InetUtils.refreshIp(InetUtils.java:107)
        at com.alibaba.nacos.sys.utils.InetUtils.lambda$static$0(InetUtils.java:88)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        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)

InetUtils should catch the exception and continue to check next network interface

Expected behavior
exception not throw from InetUtils.refreshIp()

Actually behavior
throw exception from InetUtils.refreshIp

How to Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See errors

Desktop (please complete the following information):

  • OS: [e.g. Centos]
  • Version [e.g. nacos-server 1.3.1, nacos-client 1.3.1]
  • Module [e.g. naming/config]
  • SDK [e.g. original, spring-cloud-alibaba-nacos, dubbo]

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant