This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
faq:general:client_only_works_on_server [2016/03/04 09:40] hermen created |
faq:general:client_only_works_on_server [2019/12/09 10:19] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Client works only on the server ====== | + | ====== Client works only on the Server ====== |
- | When Gecamed is installed under Ubuntu 9.04 or 9.10 (other distros not | + | **On some installations users might encounter the problem that the GECAMed Client is only working on the same machine the GECAMed server is installed on. When trying to start the client on an other machine, it will refuse to start or the login will not work.** |
- | 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:** | + | FIRST OF ALL: Make sure that you are able to reach the GECAMed website located on your GECAMed server by opening a browser and connecting to |
+ | |||
+ | http://192.168.x.x:8080/gecamed | ||
+ | |||
+ | Where 192.168.x.x is the IP address of your GECAMed server. | ||
- | make sure the server knows its own routable address under its own name. So: edit /etc/nsswitch.conf, in "hosts" line, | + | If this site is not showing up, either, |
- | put "dns" before "file" (with dhcp setup); | + | * the GECAMed server is not working -> Check if GECAMed works on the server itself |
+ | * the Firewall is blocking the access from another computer -> [[faq:technical:firewall_ports|configure your firewall]] | ||
+ | * You are trying with the wrong IP address -> make sure you have the right IP address for your server. | ||
- | **if it doesn't work** | + | If the Website is showing up, but the client refuses to start or login, please follow the instructions below. |
- | make the server's IP address static and declare it in its own /etc/hosts instead of 127.0.1.1. | + | The problem is caused by a wrong or not working DNS configuration of the GECAMed server. |
+ | Meaning, the server retrieves its own hostname configures in the operating system. It then does a DNS lookup for that hostname. The retrieved IP is then used to bind the JBoss Remoting Interface (RMI). | ||
- | edit the **/etc/hosts** file | + | If the hostname is resolved to to a local address like 127.0.x.x the RMI Interface will not be reachable from outside the server itself. The hostname needs to be resolved to the real, route-able IPv4 address of the machine (often like 192.168.x.x) |
- | xxx.xxx.xxx.xxx gecamed-server-name | + | ===== Diagnosis ===== |
- | Fix reported by Alain Louge | + | Please try the following steps to diagnose the problem and get the needed information: |
+ | - Open a command shell ON YOUR GECAMED SERVER (CMD.exe on windows, Terminal on OSX) | ||
+ | - Type hostname and press Enter, That will show you the hostname of your GECAMed Server. | ||
+ | - Type ping followed by the hostname, That will show you the IP address your hostname is resolved to. | ||
+ | - If that address is different from the real ip address of your server, you need to fix your DNS lookup. | ||
+ | |||
+ | |||
+ | ===== General Solution for all Operating Systems: ===== | ||
+ | |||
+ | |||
+ | Make the server's IP address static and declare it in its own hosts file instead of 127.0.1.1 | ||
+ | |||
+ | Remove or out-comment the following line if it exits | ||
+ | |||
+ | 127.0.1.1 gecamed-server-name | ||
+ | |||
+ | Add the following line | ||
+ | |||
+ | 192.168.x.x gecamed-server-name | ||
+ | |||
+ | Where 192.168.x.x is the real IP address of your GECAMed server and gecamed-server-name is the hostname of your machine. Do not remove the "127.0.0.1 localhost" line. | ||
+ | |||
+ | You can find the hosts file at: | ||
+ | * Windows: C:\Windows\System32\drivers\etc | ||
+ | * Linux/OSX: /etc/hosts | ||
+ | |||
+ | The hosts file needs to be edited with Admin/root rights, otherwise you can't save the changes. | ||
+ | |||
+ | Under Windows you may not see the \etc directory in the file explorer, because it usually is a hidden system folder. Either enter the complete path in the file explorer search line (C:\Windows\System32\drivers\etc), or change the folder options to "Show hidden files, folders and drives". | ||
+ | |||
+ | If even that is not working, you can try to manually bind JBoss to a specific IP address malually. | ||
+ | |||
+ | This is done by adding the following line to the run.conf file in GECAMed/jboss/bin on LINUX and MAC OSX installations. | ||
+ | |||
+ | JAVA_OPTS="$JAVA_OPTS -Djboss.bind.address=192.168.x.x" | ||
+ | |||
+ | For Windows Installations please add the following line to the run.bat file in GECAMed/jboss/bin | ||
+ | |||
+ | set JAVA_OPTS=%JAVA_OPTS% -Djboss.bind.address=192.168.x.x | ||
+ | | ||
+ | right below the line saying set JAVA_OPTS=%JAVA_OPTS% -Dname=gecamedserver |