LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-30-2012, 04:33 AM   #1
501607386
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Rep: Reputation: Disabled
Linux server doesnt listen on localhost even i have its entry in host.conf


This is what I have in host.conf file

###########################################
127.0.0.1 localhost localhost.localdomain
::1 localhost6 localhost6.localdomain6
173.37.171.2 myserver-qa-01 myserver-qa-01.mysite.com
###########################################


when I try to telnet as below, it doesnt allow.


$ telnet localhost 7001
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host: Connection refused


7001 port is open and my weblogic is listening on that port. Weblogic works fine on my server ip 173.37.171.2



$ telnet myserver-qa-01 7001
Trying 173.37.171.2...
Connected to myserver-qa-01.mysite.com (173.37.171.2).
Escape character is '^]'.
Connection closed by foreign host.


Please help me how I can make telnet connection over localhost:7001
I have certain functionality in weblogic, which uses localhost. It is failing because of this issue. I cant use server ip instead of localhost.


Thanks in advance,
Howard

Last edited by 501607386; 07-30-2012 at 04:35 AM.
 
Old 07-30-2012, 04:42 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
sounds like weblogic isn't being told to listen there. run "netstat -plnt" and see what the process is actually listening on.
 
Old 07-30-2012, 05:36 AM   #3
501607386
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thank you Chris for replying.
Here is the output.

$ netstat -plnt
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:610 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:740 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:199 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN 1289/Xvnc
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 1289/Xvnc
tcp 0 0 0.0.0.0:717 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 1289/Xvnc
tcp 0 0 0.0.0.0:27542 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
tcp 0 0 :::28965 :::* LISTEN 26964/java
tcp 0 0 :::8998 :::* LISTEN 26964/java
tcp 0 0 :::5001 :::* LISTEN 26964/java
tcp 0 0 :::27434 :::* LISTEN 24700/java
tcp 0 0 :::27790 :::* LISTEN 26964/java
tcp 0 0 :::2222 :::* LISTEN -
tcp 0 0 :::6001 :::* LISTEN 1289/Xvnc
tcp 0 0 :::2099 :::* LISTEN 24700/java
tcp 0 0 :::22 :::* LISTEN -
tcp 0 0 :::32983 :::* LISTEN 7144/java
tcp 0 0 ::ffff:173.37.171.2:7001 :::* LISTEN 24637/java
tcp 0 0 ::ffff:173.37.171.2:7002 :::* LISTEN 12459/java
tcp 0 0 ::ffff:173.37.171.2:7003 :::* LISTEN 26964/java


My weblogic listens on 7001,7002 & 7003. When I tried to make it listen on localhost, It failed. It gave below error.


java.net.ConnectException: t3://localhost:7001: Destination unreachable; nested exception is:
java.net.ConnectException: Connection refused; No available router to destination
 
Old 07-30-2012, 12:51 PM   #4
501607386
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Can anybody help me on this?
 
Old 07-31-2012, 01:47 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
well this is a weblogic issue, so there's littel reason to think we'll know much about an expensive proprietary product. But clearly you can't get a t3 connection to a service that isn't listening on that address.

If you're running weblogic then why aren't you referring to your weblogic docs and oracle support? Either way, 10 seconds on google suggests you can change the config.xml file https://forums.oracle.com/forums/thr...readID=2182280
 
Old 08-01-2012, 01:53 AM   #6
501607386
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hello acid_kewpie,

Thanks for the reply.

Well, We have a typical requirement of making the weblogic listen on Localhost. If i replace the localhost with my server IP, it works. I had already checked this. But my application demands the use of localhost. Moreover the same weblogic configuration with localhost in it is working on my Dev & prod servers, but failing on qa. Struggling to resolve this.

Regards,
Howard
 
Old 08-01-2012, 01:59 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
well i just gave you a link with a solution. Not that "localhost" doesn't resolve to the eth0 IP, so I hope it's clear why one scenario works and one doesn't.
 
Old 08-01-2012, 03:12 AM   #8
ilesterg
Member
 
Registered: Jul 2012
Distribution: CentOS, Debian, Oracle Linux, AIX
Posts: 289

Rep: Reputation: 22
From the link above, paste these lines on your config.xml file:
Code:
<server>
  <name>AdminServer</name>
  <listen-port>7010</listen-port>
  <listen-address>localhost</listen-address>
</server>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
entry in /etc/hosts file for localhost localhost.localdomain sureshpanchanathan Linux - Newbie 6 02-09-2012 08:10 PM
Adding Host entry in Dns Server winxandlinx Linux - Networking 4 12-12-2006 03:08 AM
localhost error /etc/host.conf Burian Fedora 2 02-21-2005 06:03 PM


All times are GMT -5. The time now is 12:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration