Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-04-2013, 03:31 PM   #1
LQ Newbie
Registered: Mar 2013
Posts: 2

Rep: Reputation: Disabled
"telnet: connect to address 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
telnet: connect to address 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


Last edited by bushwacker03; 03-04-2013 at 03:32 PM.
Old 03-04-2013, 05:18 PM   #2
Registered: Sep 2011
Posts: 254

Rep: Reputation: Disabled
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:

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.
Old 03-04-2013, 06:11 PM   #3
Registered: Mar 2008
Posts: 17,101

Rep: Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551Reputation: 2551
While the client telnet may be working, the host telnet.d may not be enabled or working.

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

Last edited by jefro; 03-04-2013 at 06:12 PM.
Old 03-04-2013, 06:17 PM   #4
Senior Member
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,117

Rep: Reputation: 549Reputation: 549Reputation: 549Reputation: 549Reputation: 549Reputation: 549
Connection refused doesn't necessarily mean exactly that. I'd say telnet is not running, so you can't connect.
Old 03-04-2013, 07:02 PM   #5
LQ Newbie
Registered: Mar 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
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
Old 03-04-2013, 07:44 PM   #6
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
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.
Old 03-04-2013, 09:42 PM   #7
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

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

~# ps -Af | grep slapd


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
[SOLVED] sendmail logging "connection refused" but telnet to port 25 works lrtward Linux - Server 2 08-08-2012 01:58 PM
telnet: connect to address ::1: Connection refused kahafil Linux - Enterprise 1 06-04-2012 01:14 PM
[SOLVED] Another one . . . . telnet: connect to address Connection refused verWire3619 Linux - Networking 2 09-02-2011 02:49 PM
Reuse socket fails "Address already in use" or "Connection refused" dec10 Programming 3 05-15-2010 01:14 PM
telnet:connect to address connection refused sdeven Linux - Networking 6 12-23-2002 01:38 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:41 AM.

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