Client works only on the server

When Gecamed is installed under Ubuntu 9.04 or 9.10 (other distros not tested), a client cannot work on another machine on the same network. This is because of a wrong hostname resolution by Jboss, probably from standard glibc behavior: in recent Ubuntu setups, /etc/hosts defines two loopbacks (127.0.0.1 as localhost, 127.0.1.1 as <hostname>). Then /etc/nsswitch.conf defines host lookup order as “files” before “dns”, so whatever the real network config is (defined by dhcp or avahi or anything), when Jboss wants to find out its own IP address, glibc reads from /etc/hosts and answers “127.0.1.1”, and that (obviously wrong) address is encoded into the jnlp applet on the client machine. So a client will work on the server but from no other machine.

Quick and dirty solution:

make sure the server knows its own routable address under its own name. So: edit /etc/nsswitch.conf, in “hosts” line, put “dns” before “file” (with dhcp setup);

if it doesn't work

make the server's IP address static and declare it in its own /etc/hosts instead of 127.0.1.1.

Fix reported by Alain Louge

project/gecamed/faq/linux/network_config_in_linux.txt · Last modified: 2012/01/25 09:31 by Guido Bosch
© Centre de Recherche Public Henri Tudor | Legal Notice