Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to open port? 2

Status
Not open for further replies.

coolice

Technical User
Jul 19, 2000
13
SA
Hi!

i'm encountering error connecting from my server to a client on specific port. I issued "telnet <client_name> 13782" and gave me "could not open connection to host on port 13782", but connecting from client to server over the same port is ok. I would like to know how to open that port on the client side.

Appreciate your help. Thanks.
 
a tcp port is open if there is a service ( program ) listening on that port.
to listen to a port a program open a socket specifying that it will wait for incoming messages on that number .
if you want to know which port are open on your machine do netstat -a and look for port whith a LISTEN state.
for ports open on a remote machine you can use a port scan utiliti .
 
Coolice,

Apparently, your server has an application listening on port 13782 and your client does not.

When you attempt to connect to the server, the connection succeeds because, as raztaboule explained, there is a service (aka program or application) listening for connections on that port.

However, the connection to the client fails because the client does not have an application listening on port 13782.


Hope that helps,
Jason

 
Hi Raztaboule/Jason,

First, thanks for replying. Really appreciate that. Actually that port is being use by VERITAS Netbackup (bpcd port) and it is installed and setup on the client. I checked the Windows etc services file and it is defined there. Is there other way inside Windows where I can check whether that port is defined or not?

Here is what I extracted out of netstat output when I ran it on the client (kjo-smtp) side, server is kjo-backup,
kjo-smtp:bpcd kjo-smtp.kjo.com.sa:0 LISTENING
kjo-smtp:3556 kjo-backup:bpcd ESTABLISHED
kjo-smtp:3556 kjo-smtp.kjo.com.sa:0 LISTENING

Does this mean that that port is open on the client side?

Hope to receive our reply. Thanks again in advance.


 
i don't really knows Windows ( does anyone really knows windows ? ) , run :
netstat -an
it will give you the same output without translating port numbers <-> services , so you will really see which port number is open.

hope this help.
 
coolice said:
kjo-smtp:bpcd kjo-smtp.kjo.com.sa:0 LISTENING
Assuming bpcd is port 13782, then yes, there is a listen and you should be able to connect.

If that is a TCP port (as opposed to UDP), you can test it quickly by logging into kjo-smtp and connecting to that port with telnet: telnet localhost 13782

If you get a connection, but are still unable to connect from another machine, there may be a firewall issue or a configuration issue with the application trying to connect to kjo-smtp. If you don't get a connection (connection refused), but netstat indicates there is a listen on the bpcd port, bpcd is likely something other than 13782.

coolice said:
I checked the Windows etc services file and it is defined there.
I believe raztaboule wanted you to check for a related Windows service, although there's nothing wrong with the port being aliased in the etc services file. Since there is a listen on that port, we know some application has it opened. If some application other than Netbackup is using the port, Netbackup won't be able to listen on it.


Go into control panel and see if there is a Netbackup service and verify it is running (get a windows admin to help you if you cannot find the list of services). Also, check the event log to see if Netbackup is complaining about not being able to post a listen on that port.

 
Hi guys,

Thanks again for the reply. I'll try that and will update you for anything. One thing for sure is I don't have any firewalls in between. What is there in DNS that I need to check? Can you give me a hint?

Appreciate your replies.

Wish me luck. Cheers.
 
I think windows has it's own firewall buit-in.
so it's possible that it is activated ( check somewhere in the IP properties panel i think ) .

run :
nslookup kjo-smtp
will return the IP of kjo-smtp , if it's what it is supposed to be , it is OK.

But as JasonDeckar says : telnet localhost 13782 is the best starting point.



 
Hey guys..I have the same problem to get my port 13782 to listen. I have two client system running red hat AS2.1 and the other AS3. Both client system have veritas client installed and both have port 13782 listed on /etc/services. My AS2.1 box perform its backup remotely and port 13782 is listening without a hitch. But my AS3 is not working at all, I can not get port 13782 to connect, see output below. In my finding I cannot telnet via port from server to client by client to server no problem. Anybody know how to fix this issue on red hat AS3 to allow port 13782 to listen?

dvong

client to server
[root@Canada bin]# telnet usa 13782
Trying 199.33.101.13...
Connected to c130a (199.33.101.13).
Escape character is '^]'.

Connection closed by foreign host.

Client itself
[root@Canada bin]# telnet canada 13782
Trying 199.33.160.90...
telnet: Unable to connect to remote host: Connection refused

[root@Canada bin]# cat /etc/services |grep bpcd
bpcd 13782/tcp # VERITAS NetBackup
bpcd 13782/udp # VERITAS NetBackup
 
have you add some entrys in /etc/hosts.allow and/or /etc/hosts.deny ?
and with iptables ?

bye !
 
Thanks for the quick response. No, didn't edit any files. Any more clues to get this working?
 
You may not have any "firewalls" in between machines, but check with the network guys to make sure that any routers in between have their ACL's configured for that port to be open.



Unix IS user friendly... It's just selective about who its friends are.
 
Both machine are in the same vlan, no acl added to that vlan, no router is in between, both Linux box is plug into cisco 5500. My best guess its the client itself, not sure how to fix this or see this happen to anybody.
 
Another thing, I cannot telnet into its own ip address with port 13782... "telnet canada 13782". So I can say this is not networking related.
 
i supposed you have check the state of the port with : netstat -an ( or lsof -i ) | grep LISTEN .
with lsof it will be better cause you can check that the program using the port 13782 is the one you expect to.

what happends with : telnet localhost 13782 ??
if it works well , can be that host canada is not resolved.
 
yeah, i try that. DNS is setup on this client, resolv.conf. I cannot telnet localhost on my AS3 but AS2.1 works.

[root@Canada root]# telnet localhost 13782
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

AS2.1
# telnet localhost 13782
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
 
Post output from 'netstat -an |grep 13782' so we can see if its listening or not.
 
I am new to this forum, so if I am in the wrong thread,
please let me know.

I am able to Telnet into our router directly using command:
telnet 64.145.111.1. But when I try to telnet to a specific port I get a connection failure message of: could not open a connection to host on port 25...connection failed. It's like this on all ports.

Our router is a Seimens 5940 and it appears that all ports are open. How can I configure the router to open port 25?
 
Heres the output....

[root@Canada root]# netstat -an |grep 13782
[root@Canada root]# lsof -i |grep listen
[root@Canada root]# lsof -i |grep LISTEN
portmap 474 rpc 4u IPv4 987 TCP *:sunrpc (LISTEN)
rpc.statd 493 rpcuser 6u IPv4 1031 TCP *:32768 (LISTEN)
cupsd 593 root 0u IPv4 1269 TCP localhost.localdomain:ipp (LISTEN)
sshd 649 root 3u IPv4 1288 TCP *:ssh (LISTEN)
xinetd 663 root 5u IPv4 1355 TCP *:bpjava-msvc (LISTEN)
xinetd 663 root 6u IPv4 1356 TCP *:klogin (LISTEN)
xinetd 663 root 8u IPv4 1357 TCP *:kshell (LISTEN)
xinetd 663 root 9u IPv4 1358 TCP *:exec (LISTEN)
xinetd 663 root 10u IPv4 1359 TCP *:login (LISTEN)
xinetd 663 root 11u IPv4 1360 TCP *:shell (LISTEN)
xinetd 663 root 12u IPv4 1361 TCP *:9098 (LISTEN)
xinetd 663 root 13u IPv4 1362 TCP localhost.localdomain:32769 (LISTEN)
xinetd 663 root 14u IPv4 1684 TCP *:telnet (LISTEN)
rpc.rquot 696 root 4u IPv4 1540 TCP *:876 (LISTEN)
rpc.mount 715 root 4u IPv4 1585 TCP *:894 (LISTEN)
vsftpd 725 root 3u IPv4 1657 TCP *:ftp (LISTEN)
sendmail 746 root 4u IPv4 1702 TCP localhost.localdomain:smtp (LISTEN)
httpd 775 root 3u IPv4 1751 TCP *:http (LISTEN)
httpd 775 root 4u IPv4 1753 TCP *:https (LISTEN)
httpd 823 apache 3u IPv4 1751 TCP *:http (LISTEN)
httpd 823 apache 4u IPv4 1753 TCP *:https (LISTEN)
httpd 824 apache 3u IPv4 1751 TCP *:http (LISTEN)
httpd 824 apache 4u IPv4 1753 TCP *:https (LISTEN)
httpd 825 apache 3u IPv4 1751 TCP *:http (LISTEN)
httpd 825 apache 4u IPv4 1753 TCP *:https (LISTEN)
httpd 826 apache 3u IPv4 1751 TCP *:http (LISTEN)
httpd 826 apache 4u IPv4 1753 TCP *:https (LISTEN)
httpd 827 apache 3u IPv4 1751 TCP *:http (LISTEN)
httpd 827 apache 4u IPv4 1753 TCP *:https (LISTEN)
httpd 828 apache 3u IPv4 1751 TCP *:http (LISTEN)
httpd 828 apache 4u IPv4 1753 TCP *:https (LISTEN)
httpd 829 apache 3u IPv4 1751 TCP *:http (LISTEN)
httpd 829 apache 4u IPv4 1753 TCP *:https (LISTEN)
httpd 830 apache 3u IPv4 1751 TCP *:http (LISTEN)
httpd 830 apache 4u IPv4 1753 TCP *:https (LISTEN)
smbd 831 root 12u IPv4 1849 TCP *:microsoft-ds (LISTEN)
smbd 831 root 13u IPv4 1850 TCP *:netbios-ssn (LISTEN)
appxd 893 root 3u IPv4 1943 TCP *:8060 (LISTEN)
appxd 896 root 3u IPv4 1949 TCP *:8065 (LISTEN)
X 924 root 1u IPv4 1989 TCP *:x11 (LISTEN)
fam 1020 root 0u IPv4 1362 TCP localhost.localdomain:32769 (LISTEN)
fam 1020 root 1u IPv4 1362 TCP localhost.localdomain:32769 (LISTEN)
fam 1020 root 2u IPv4 1362 TCP localhost.localdomain:32769 (LISTEN)
[root@Canada root]#
 
It doesn't look like its listening. Problem with the Veritas client. Call them for support.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top