Guiserver connection

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Guiserver connection

Post by newdep »

Hi Lutz,

Just a 5 cent remark.. ;-)


Why does the guiserver.java determine the host ip-address by a
lookup of the host name?

host = ssocket.getInetAddress().getHostAddress();

This defines a lookup by hostname of the local ip address, which is
on itself oke, but strange iif gui-server always connects to "127.0.0.1".

I.e. is it not said that a DNS entry must exists or a /etc/host file entry of
the hostname must exists. If it does not exist Guiserver cant find the host.
(which is actualy localhost). A machine works perfectly without DNS entry's
of a hostname entry inside the /etc/host file for local connections.


Why this all? ;-) Well It took me a day to figure out why Gui-server did
not pass the connection stage with java... Reason.. there was no hostname inside the /etc/host file ,
so all lookups done by guiserver.java failed.

host = '127.0.0.1' always works , is more secure and is even quicker...



This report from java, (below) is officially incorrect.
..
accepted from 0.0.0.0
connecting to 0.0.0.0 47012
..
A routing/gateway address 0.0.0.0 is not for use in socket connections.
-- (define? (Cornflakes))

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Why does the guiserver.java determine the host ip-address by a
lookup of the host name?
It does not, you must run an older version. Since version 9.2.5 (last year) newLISP tries to connect on 127.0.0.1. This was changed when some people had problems connecting because of missing host file definitions.
A routing/gateway address 0.0.0.0 is not for use in socket connection
this is the address Java libraries report for local the connections accepted from newLISP Java -> socket.getInetAddress().getHostAddress()

ps: 0.0.0.0 seems to be a special sw interface used by sun, see also here:
http://java.sun.com/j2se/1.5.0/docs/gui ... t/faq.html

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

It does not, you must run an older version. Since version 9.2.5 (last year) newLISP tries to connect on 127.0.0.1. This was changed when some people had problems connecting because of missing host file definitions.
When I look inside 9.3.6 guiserver.java source the
"host = ssocket.getInetAddress().getHostAddress(); " is there though...
this is the address Java libraries report for local the connections accepted from newLISP Java -> socket.getInetAddress().getHostAddress()

ps: 0.0.0.0 seems to be a special sw interface used by sun, see also here:
http://java.sun.com/j2se/1.5.0/docs/gui ... t/faq.html
Aaa SUN did it again, they are bending the rules, its not wrong what they do though as long as they describe it, i didn't see that note... ;-)
-- (define? (Cornflakes))

Locked