LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   "telnet: connect to address 127.0.0.1: Connection refused" (https://www.linuxquestions.org/questions/linux-newbie-8/telnet-connect-to-address-127-0-0-1-connection-refused-4175452681/)

bushwacker03 03-04-2013 02:31 PM

"telnet: connect to address 127.0.0.1: Connection refused"
 
Hello Everyone,

I am running Suse enterprise linux 11. I created a new LDAP instance but it fails to start, and is complaining about the port.

Nothing is listening on the specified port. So I tried to telnet the port on localhost and I get the following error:

>telnet localhost 389
Trying 127.0.0.1
telnet: connect to address 127.0.0.1: Connection refused

I can't telnet to any port on the local machine. I checked in Yast that the firewall is disabled, and I am pretty sure that Selinux is not enabled.

I have seen other threads similar to this but none of them quite answer my question.

Does anyone have any ideas? Any advice would be greatly appreciated

Thanks!

rigor 03-04-2013 04:18 PM

Hi bushwacker03 !

To show us what ports are active, and what is using them, could you post the output of this command run as root:

Code:

netstat -A inet -vepa
It would be helpful if you could post the command output inside "code" tags. If you've never used "code" tags before, you can make them available for your use by clicking on the "Go Advanced" button below the area where you type the text of your comment. Then click the "hash"/"pound"/"#" symbol which appears above the text area, and paste the output of the command between the "code" tags that clicking that symbol produces in the text area.

jefro 03-04-2013 05:11 PM

While the client telnet may be working, the host telnet.d may not be enabled or working.

http://tr.opensuse.org/Telnet_Server_HOWTO


Also consider the local actual ip address instead of 127.0.0.0 or localhost by name.

AwesomeMachine 03-04-2013 05:17 PM

Connection refused doesn't necessarily mean exactly that. I'd say telnet is not running, so you can't connect.

bushwacker03 03-04-2013 06:02 PM

Hi Rigor, Jefro, and AwesomeMachine,

I really appreciate all 3 of you getting back to me so quickly. After double checking I think you are right about Telnet not being installed, but I don't want to get sidetracked because that is not really the issue.

This machine is running as a VM on my laptop. If I try to telnet to it from outside of the VM to a port which I know is listening the connection is refused. But, I am able to telnet to a listening port on any of my other VM's with no problem. That's why I think this has to do with one of Linux's extra security features like iptables or selinux.

I know that that the firewall is disabled, but I am not sure about selinux or anything similar. Thanks again for your input as all of it is greatly appreciated

chrism01 03-04-2013 06:44 PM

It likely is that nothing is listening on that port on that VM.
Login to it and run the netstat cmd to check.
Check the log files; maybe resort to tcpdump/wireshark if you are sure it is listening.

shivaa 03-04-2013 08:42 PM

In addition, check that LDAP instance is running or not, because it's calling on a non-secure LDAP connection with port #389.

Code:

~# ps -Af | grep slapd


All times are GMT -5. The time now is 05:42 AM.