Unix Technical Forum

Re: cant telnet to port 81

This is a discussion on Re: cant telnet to port 81 within the Linux Operating System forums, part of the Unix Operating Systems category; --> On Sat, 19 Jul 2003 18:40:47 +0000, Michael C. Starkie wrote: > but when i telnet hostname 81 > ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-17-2008, 07:19 AM
Dave Uhring
 
Posts: n/a
Default Re: cant telnet to port 81

On Sat, 19 Jul 2003 18:40:47 +0000, Michael C. Starkie wrote:

> but when i telnet hostname 81
>
> i get
>
> Trying xxx.xxx.xxx.xxx...
> telnet: connect to address xxx.xxx.xxx.xxx: Connection refused
>
> I have an apache webserver running on port 81 (i think i set it up
> properly to do this)


On that server what is the output of

# lsof -i :81

or

# netstat -a | grep LISTEN | grep 81

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-17-2008, 07:19 AM
Michael C. Starkie
 
Posts: n/a
Default Re: cant telnet to port 81

Dave Uhring wrote:
> On Sat, 19 Jul 2003 18:40:47 +0000, Michael C. Starkie wrote:
>
>
>>but when i telnet hostname 81
>>
>>i get
>>
>>Trying xxx.xxx.xxx.xxx...
>>telnet: connect to address xxx.xxx.xxx.xxx: Connection refused
>>
>>I have an apache webserver running on port 81 (i think i set it up
>>properly to do this)

>
>
> On that server what is the output of
>
> # lsof -i :81
>
> or
>
> # netstat -a | grep LISTEN | grep 81
>



i dont have lsof but netstat shows:
> unix 2 [ ACC ] STREAM LISTENING 3812 /tmp/.X11-unix/X0
> unix 2 [ ACC ] STREAM LISTENING 4275 /tmp/.ICE-unix/dcop3688-1058636381


nothing on port 81

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-17-2008, 07:19 AM
Michael C. Starkie
 
Posts: n/a
Default Re: cant telnet to port 81

Dave Uhring wrote:
> On Sat, 19 Jul 2003 18:40:47 +0000, Michael C. Starkie wrote:
>
>
>>but when i telnet hostname 81
>>
>>i get
>>
>>Trying xxx.xxx.xxx.xxx...
>>telnet: connect to address xxx.xxx.xxx.xxx: Connection refused
>>
>>I have an apache webserver running on port 81 (i think i set it up
>>properly to do this)

>
>
> On that server what is the output of
>
> # lsof -i :81
>
> or
>
> # netstat -a | grep LISTEN | grep 81
>

i dont have lsof but netstat shows:
> unix 2 [ ACC ] STREAM LISTENING 3812 /tmp/.X11-unix/X0
> unix 2 [ ACC ] STREAM LISTENING 4275

/tmp/.ICE-unix/dcop3688-1058636381

nothing on port 81

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-17-2008, 07:19 AM
Michael C. Starkie
 
Posts: n/a
Default Re: cant telnet to port 81

Dave Uhring wrote:
> On Sun, 20 Jul 2003 04:26:06 +0000, Michael C. Starkie wrote:
>
>
>>>>I have an apache webserver running on port 81 (i think i set it up
>>>>to do this)

>
>
>>nothing on port 81

>
>
> You just proved that you did not "set it up properly" :-)
>
> Back to the man pages and HOWTO.
>


when I netstat -a | grep http I see the following:

tcp 0 0 *:http *:* LISTEN
tcp 0 0 *:https *:* LISTEN

but when I netstat -n | grep http I see no output.

when I type hostname, I see the value in /etc/hosts:

hostname.mydomain.com

what does this tell me? The OS can not resolve the canonical name of my
host? or it knows that I'm running http but it can't figure out which
port it's on? I'm confused...

when I ps aux | grep http, I see /usr/sbin/httpd so I know apache is
running. I looked at the config file it's listening on port 81.....

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-17-2008, 07:19 AM
Dave Uhring
 
Posts: n/a
Default Re: cant telnet to port 81

On Sun, 20 Jul 2003 14:30:49 +0000, Michael C. Starkie wrote:

> when I netstat -a | grep http I see the following:
>
> tcp 0 0 *:http *:* LISTEN
> tcp 0 0 *:https *:* LISTEN


> what does this tell me? The OS can not resolve the canonical name of my
> host? or it knows that I'm running http but it can't figure out which
> port it's on? I'm confused...
>
> when I ps aux | grep http, I see /usr/sbin/httpd so I know apache is
> running. I looked at the config file it's listening on port 81.....


[etc]# grep http /etc/services
# http://www.iana.org/assignments/port-numbers
http 80/tcp www www-http #World Wide Web HTTP
http 80/udp www www-http #World Wide Web HTTP
http-mgmt 280/tcp
http-mgmt 280/udp
https 443/tcp
https 443/udp
.....

Unless you changed that your server is running on ports 80 and 443. And
it is listening to -all- the internet.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-17-2008, 07:19 AM
Timo Voipio
 
Posts: n/a
Default Re: cant telnet to port 81

Michael C. Starkie wrote:
> when I netstat -a | grep http I see the following:
>
> tcp 0 0 *:http *:* LISTEN
> tcp 0 0 *:https *:* LISTEN


i.e. something is listening in ports 80 (http) and 443 (https).

> but when I netstat -n | grep http I see no output.


No wonder. Try:

'netstat -n -a | grep 81'


> what does this tell me? The OS can not resolve the canonical name of my
> host? or it knows that I'm running http but it can't figure out which
> port it's on? I'm confused...


The OS knows that process httpd is bound to port 80. No more, no less.

--
Timo Voipio | Helsinki, Finland | ICBM at: 60 11.800 N 024 52.760 E
GeekCode ver 3: GU>CC d s-: a--- C++ UL(+)$>+++$ P+>+++ L++(+) E- W++ N++
o? K? w O M- V- PS PE Y+ PGP+ t 5++ X R tv- b++(++++) DI+ D G e- h! r !y

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-17-2008, 07:20 AM
Lew Pitcher
 
Posts: n/a
Default Re: cant telnet to port 81

Without hesitation, Michael C. Starkie asserted (on or about 07/20/03
00:26) that:
> Dave Uhring wrote:
>
>> On Sat, 19 Jul 2003 18:40:47 +0000, Michael C. Starkie wrote:
>>
>>
>>> but when i telnet hostname 81
>>>
>>> i get
>>>
>>> Trying xxx.xxx.xxx.xxx...
>>> telnet: connect to address xxx.xxx.xxx.xxx: Connection refused


That's the standard message you get back when there's no server at the other
end. Implication: you don't have anything servicing TCP port 81.

>>> I have an apache webserver running on port 81 (i think i set it up
>>> properly to do this)

[snip]
> i dont have lsof but netstat shows:

[snip]
> nothing on port 81


So, you don't have anything servicing port 81.

Apparently, your Apache setup is incorrect, or Apache is not started.



--
Lew Pitcher

Master Codewright and JOAT-in-training
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-17-2008, 07:20 AM
Xyerp
 
Posts: n/a
Default Re: cant telnet to port 81

Certainly looks like an Apache configuration problem.

All I had to do to get Apache2 listening on port 81 was to change the
"Listen" directive to 81 and restart Apache.

Maybe you didn't restart Apache?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-17-2008, 07:21 AM
Michael C. Starkie
 
Posts: n/a
Default Re: cant telnet to port 81

This thread has been very useful in helping me with this problem.

The problem was that I had installed apache 2.0 over an earlier version
that got installed with the OS. The original version gets started
automatically when the system reboots so I was trying to run two servers
at the same time. Stopping the default server and starting apache 2.0
solved the problem.

How do I disable a service from starting automatically? I now forget
the utility I ran from the command line to check off services I wish to
run at start-up.


Xyerp wrote:
> Certainly looks like an Apache configuration problem.
>
> All I had to do to get Apache2 listening on port 81 was to change the
> "Listen" directive to 81 and restart Apache.
>
> Maybe you didn't restart Apache?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-17-2008, 07:22 AM
Michael C. Starkie
 
Posts: n/a
Default Re: cant telnet to port 81

Xyerp wrote:
> Certainly looks like an Apache configuration problem.
>
> All I had to do to get Apache2 listening on port 81 was to change the
> "Listen" directive to 81 and restart Apache.
>
> Maybe you didn't restart Apache?


This thread has been very useful in helping me with this problem.

The problem was that I had installed apache 2.0 over an earlier version
that got installed with the OS. The original version gets started
automatically when the system reboots so I was trying to run two servers
at the same time. Stopping the default server and starting apache 2.0
solved the problem.

How do I disable a service from starting automatically? I now forget
the utility I ran from the command line to check off services I wish to
run at start-up.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:44 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com