|
|
|
linux suse + java.net.InetAddress.getLocalHost()
|
|||
|---|---|---|---|
|
#18+
Пробема: на всех рабочих местах (sun Solaris, Windows, RedHat linux) метод java.net.InetAddress.getLocalHost() возвращает адрес хоста. Но столкнулся с тем, что на компе, где стоит linux suse v11 java.net.InetAddress.getLocalHost() возвращает 127.0.0.2 (В принципе, так и прописано в /etc/hosts). Дело в том, что, видимо, данный метод используется при создании объектов типа UnicastRemoteObject. Вопрос: Можно ли как-то заставить suse + java.net.InetAddress.getLocalHost() отдавать правильный (внешний) адрес без изменения /etc/hosts ? - владелец компа боится трогать именно /etc/hosts - я читал, что мапирование 127.0.0.2 на имя хоста может восстановиться само: http://www.filibeto.org/sun/lib/nonsun/oracle/10.2.0.1.0/B19306_01/relnotes.102/b15659.pdf 5.11 Mapping of 127.0.0.2 to the Local Hostname By default, the hostname of a machine is mapped to the IP address 127.0.0.2 through an entry in the /etc/hosts similar to the following on SUSE Linux Enterprise Server 10 and SUSE Linux Enterprise Server 11: 127.0.0.2 test test.example.com YaST does this to provide compatibility with earlier versions of the applications that had problems running on desktops with dynamically assigned hostnames from DHCP. This mapping may cause certain Oracle networking libraries to encounter errors when they attempt to resolve the hostname of the machine. To avoid these problems, the entry should be removed from the /etc/hosts file. Note that several network related YaST utilities may add this entry back to the file. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.10.2010, 17:53 |
|
||
|
|

start [/forum/topic.php?fid=25&fpage=95&tid=1484680]: |
0ms |
get settings: |
8ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
30ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
21ms |
get tp. blocked users: |
1ms |
| others: | 201ms |
| total: | 293ms |

| 0 / 0 |
