Guiserver connection

Started by newdep, April 01, 2008, 03:37:21 PM

Previous topic - Next topic

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

#1
QuoteWhy 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.


QuoteA 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/guide/management/faq.html">http://java.sun.com/j2se/1.5.0/docs/gui ... t/faq.html">http://java.sun.com/j2se/1.5.0/docs/guide/management/faq.html

newdep

#2
QuoteIt 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...
Quote
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/guide/management/faq.html">http://java.sun.com/j2se/1.5.0/docs/gui ... t/faq.html">http://java.sun.com/j2se/1.5.0/docs/guide/management/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))