【发布时间】:2012-06-05 09:38:40
【问题描述】:
我在服务器上使用虚拟机。
我的VM本地IP是192.168.1.10
我正在尝试实现一些需要我编辑此链接中提供的/etc/hosts 的东西
http://www.thatisjava.com/java-tech/55200/
我遇到了类似的问题,我的控制台显示
RTP--- :DataAddress: /192.168.1.10
ControlAddress: /192.168.1.10
DataPort: 42050
ControlPort: 42051
java.io.IOException: Local Data AddressDoes not belong to any of this hosts local interfaces
java.io.IOException: Local Data AddressDoes not belong to any of this hosts local interfaces
at org.speechforge.cairo.rtp.RTPConsumer.init(RTPConsumer.java:181)
at org.speechforge.cairo.rtp.RTPConsumer.<init>(RTPConsumer.java:95)
at org.speechforge.cairo.rtp.server.RTPStreamReplicator.<init> (RTPStreamReplicator.java:69)
还有更多。
给出的问题的答案是
我解决了这个问题。问题是 JMF 似乎使用 InetAddress.getAllByName() 仅返回(至少在我的情况下) 单个 IP 地址,无论我在我的计算机上定义了多少个地址 接口。问题是通过放置我的 IP 地址来解决的 想要由会话管理器使用到 /etc/hosts 中。应该是第一个 在 /etc/hosts 中的行,否则使用匹配的另一行。
很遗憾,我无法理解他想要表达的意思。我的/etc/hosts阅读
127.0.0.1 localhost
127.0.1.1 SparkVM104
所以我应该用我的192.168.1.10 更改127.0.0.1
或者我应该创建一个像127.0.0.1/192.168.1.10这样的别名
或者我应该将192.168.1.10 粘贴到顶部作为
192.168.1.10
127.0.0.1 localhost
127.0.1.1 SparkVM104
感谢任何帮助。
问候。
【问题讨论】:
标签: java linux networking jmf