Localhost Connection Problems
Hello,
I'm new to this list. I have been using Linux for just under a year and
have found it to be a very rewarding experiance. This week I made the
switch from Fedora Core 2 to Suse 9.1 Personal as I did not like the
direction that it was taking or the difeculty in configuring it.
I have a Java application that I have created. It is a text chat client
and server. Using Fedora I set up the firewall to allow port 80 through.
(The server listens on that port. Non standard I know), started the
server as root (only root is allowed to start apps on that port).
Clients could then connect to the server fine whether the client was
running on a different computer or via localhost on the same machine.
With Suse though I am not able to connect via localhost. I am unsure as
to why this is though. The firewall lets external connections though
fine. Java returns an unknown host exception.
Nothing has changed in the app so I am thinking that it is something to
do with how the host is set on the machine. Though I don't know enough
to confirm or deny this. The machine is auto-configured via dhcp.
Could someone please suggest some pointers as to what I can do. Where I
can look etc.
Thanks very much for any help you can give.
--
Adam Cooper
Ok, I know it's bad practice to reply to ones own messages but I've
discovered the problem and remedied it to my needs. I just thought I'd
better ask why I had to.
The program was failing when requesting "localhost" from it's networking
components. I investigated and found that localhost was not being
returned properly. When running fedora my hostname was automatically set
by dhcp and was:
lion-196.d
and my domain was:
@port.ac.uk
The program ran fine and discovered the hostname as above. Under Suse
though the hostname was truncated to:
lion-196
That missing ".d" seems to make all the difference. As the app could not
discover it. I tried setting the correct name using YaST but the GUI
would not let me enter the correct one. It would not permit "."
(period). Is this a bug? Or are "." (periods) not allowed?
If they are not allowed that is something I'll have to take up with the
Uni admins.
Long story short. I set my host name to something completely different
with the same domain and now it seems to work fine. Wierd.
Any pointers would be apprieciated.
--
Adam Cooper
On Fri, 2004-07-16 at 10:40, Adam Cooper wrote:
Ok, I know it's bad practice to reply to ones own messages but I've discovered the problem and remedied it to my needs. I just thought I'd better ask why I had to.
The program was failing when requesting "localhost" from it's networking components. I investigated and found that localhost was not being returned properly. When running fedora my hostname was automatically set by dhcp and was:
lion-196.d
and my domain was:
@port.ac.uk
The program ran fine and discovered the hostname as above. Under Suse though the hostname was truncated to:
lion-196
That missing ".d" seems to make all the difference. As the app could not discover it. I tried setting the correct name using YaST but the GUI would not let me enter the correct one. It would not permit "." (period). Is this a bug? Or are "." (periods) not allowed?
If they are not allowed that is something I'll have to take up with the Uni admins.
Long story short. I set my host name to something completely different with the same domain and now it seems to work fine. Wierd.
Any pointers would be apprieciated.
"." is not a valid part of the "host" name but a seperator between parts of the entire domain name and should be avoided. The underscore "_" is also no longer a usable character as well. What you were trying to do is create a host with FQDN as lion-196.d.port.ac.uk which would make the "host" name "lion-196" and the domain "d.port.ac.uk". I hope this helps a little. -- Ken Schneider unix user since 1989 linux user since 1994 SuSE user since 1998 (5.2)
On Fri, 2004-07-16 at 15:58, Ken Schneider wrote:
"." is not a valid part of the "host" name but a seperator between parts of the entire domain name and should be avoided. The underscore "_" is also no longer a usable character as well. What you were trying to do is create a host with FQDN as lion-196.d.port.ac.uk which would make the "host" name "lion-196" and the domain "d.port.ac.uk". I hope this helps a little.
Ah that makes more sense. Thanks for clearing that up.
Could you please explain why "susebox" works as a host whilst the dhcp
assigned "lion-196" does not? Thats bugging me.
Thanks
--
Adam Cooper
On Fri, 2004-07-16 at 11:08, Adam Cooper wrote:
On Fri, 2004-07-16 at 15:58, Ken Schneider wrote:
"." is not a valid part of the "host" name but a seperator between parts of the entire domain name and should be avoided. The underscore "_" is also no longer a usable character as well. What you were trying to do is create a host with FQDN as lion-196.d.port.ac.uk which would make the "host" name "lion-196" and the domain "d.port.ac.uk". I hope this helps a little.
Ah that makes more sense. Thanks for clearing that up.
Could you please explain why "susebox" works as a host whilst the dhcp assigned "lion-196" does not? Thats bugging me.
Thanks
Look at all of the parts you have configured for the domain name and host name and remove the "d". That is my best guess at this point. And PLEASE do not reply to the poster AND the list. People that send you an answer don't need two copies your response. Only reply to the list unless asked otherwise. -- Ken Schneider unix user since 1989 linux user since 1994 SuSE user since 1998 (5.2) * PLEASE only reply to the list *
On Fri, 2004-07-16 at 16:23, Ken Schneider wrote:
And PLEASE do not reply to the poster AND the list. People that send you an answer don't need two copies your response. Only reply to the list unless asked otherwise.
Sorry, Used to munged headers on the fedora-list. Won't happen again
;-).
--
Adam Cooper
participants (2)
-
Adam Cooper
-
Ken Schneider