1

I am using a virtual machine on a server. My local IP of the VM is 192.168.1.10

I am trying to achieve something which requires me to edit my /etc/hosts as provided in this link

http://www.thatisjava.com/java-tech/55200/

I am having similar problems, My console reads

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)

And some more.

The answer to the problem given is

I solved this one. The problem is JMF seems to use InetAddress.getAllByName() which returns (at least in my case) only single IP address no matter how many addresses I have defined on my interfaces. The problem was solved by placing my IP address that I wanted to use by session manager into /etc/hosts. It must be the first line in /etc/hosts otherwise the other row that matches is used.

Unfortunately, I cant make out what He is trying to state. My /etc/hosts read

127.0.0.1    localhost
127.0.1.1       SparkVM104

So am I supposed to change 127.0.0.1 with my 192.168.1.10

or am I supposed to create an alias like 127.0.0.1/192.168.1.10

or Shall I just paste 192.168.1.10 in the top as

192.168.1.10
127.0.0.1    localhost
127.0.1.1       SparkVM104

Any help is appreciated.

Regards.

4

2 回答 2

0

的格式/etc/hosts

IP_address canonical_hostname [aliases...]

(见http://linux.die.net/man/5/hosts),所以要首先列出 192.168.1.10,/etc/hosts文件必须如下所示:

192.168.1.10    SomeHostName    SomeOtherHostName
127.0.0.1       localhost    
于 2012-06-05T10:15:14.310 回答
0

在 /etc/hosts 中,localhost 应该映射到 127.0.0.1 而不是其他任何东西,而您的外部主机名应该映射到您的外部 IP 地址而不是其他任何东西。一些 Linux 发行版被声明违反了这条规则,它破坏了一切。

于 2012-06-05T11:55:14.787 回答