Problem opening port 9998


 
Thread Tools Search this Thread
Operating Systems AIX Problem opening port 9998
# 1  
Old 09-19-2005
Problem opening port 9998

Hi there,

I have been trying to open port 9998 on an AIX 5.1 box to no avail. This machine is not connected to the internet and I have only been accessing it locally, so I know it's not a network firewall/proxy issue. I have tried editing /etc/services and inetd.conf, refreshing inetd.conf, and also starting the subsystem in smit. Still, the port is not open. Is there anything that I am missing? I've tried everything that I can think of (killing the inetd process and re-creating it, disabling IP security, etc.).

Thanks!
Erica

Last edited by erica057; 09-20-2005 at 12:26 PM..
# 2  
Old 09-20-2005
Quote:
Originally Posted by erica057
I have been trying to open port 9998 on an AIX 5.1
Hi Erica,

a "port" is a construct on layer 4 (where TCP, UDP, etc. are working) and doesn't need to be "opened".

If you want to use a specific port you just have to configure a daemon to listen (and react) to that port. Take for instance the "lpd" port 515: you can "use" this port for any arbitrary purpose, but by default (and because of historical tradition) the lpd daemon is listening there.

You could try to communicate with this daemon by issuing "telnet <printer.network.com> 515" and the daemon would still answer (of course it won't be able to handle telnet connections, but you should get a banner from the printer saying something like: 'HP JetDirect ...blah blah... can't handle your protocol'). In fact this is an easy way to find out if a network printer is still listening and ready to accept jobs without actually sending some printjob to it and waste paper.

Havig said this, the only thing you have to do is to configure your daemon to listen to port 9998. How this is done depends entirely on the daemon, Oracle listeners (for instance) are configured in a file listener.ora, other daemons are configured in inetd.conf, etc.

The next thing after configuring and starting the daemon is to check if it is running (ps) and if it is listening correctly. Again you can try "telnet localhost 9998" and see what comes up. You will get an error anways, but if the daemon is working correctly you might get something whereas you will get nothing if it doesn't.

I know, this answer is fairly general, but to analyze your problem more specific you will have to describe it in less general but more secific terms.

Hope this helps.

bakunin
# 3  
Old 09-20-2005
Thank you bakunin! I see that I was getting my terminology confused; thank you for the explanation. Yes, I was trying to create a daemon that listens on port 9998. Here is what I did:

First, I added this to /etc/services

Code:
tcpTest     9998/udp

Then, I added this to inetd.conf

Code:
tcpTest  stream  tcp  nowait  root  /path/to/a.out  a.out

(yes, I know that a.out is a generic name, this is the path to a specific binary).

tcpTest is present when I type "smit inetdconf".

I tried first refreshing inetd.conf, then killing inetd.conf and restarting it, and it did not work. It does not show up when I type ps, nor when I telnet into port 9998, nor when I scan it with nmap. When I type "startsrc -s tcpTest", it says "0513-085 the tcpTest Subsystem is not on file". It works when I try to start, say, tftpd, so I'm not sure what file it is pulling from.

Any thoughts?

Thanks in advance!
--Erica

EDIT: I also tried adding it to inittab to no avail.

Last edited by erica057; 09-20-2005 at 12:26 PM..
# 4  
Old 09-21-2005
Hi Erica,

the "startsrc"/"stopsrc"/"refresh"-mechanism works only for processes controlled by the SRC (System Resource Controller), a sort-of super daemon in AIX. To have a process be controlled by the SRC there are several requirements to be met, here is an article describing it in detail. Being a humble sytems administrator I'm sure you will understand that much better than me. ;-))

http://www.unet.univie.ac.at/aix/aix...nprogc/src.htm

Basically the SRC is started at system boot time (the srcmstr entry in inittab) and controls other daemons (aka "subsystems", consisting of "subservers") by special signals and a unique process management. The SRC relies in its operations on certain ODM entries (see the documentation of "mkssys" and related commands, it can be found in the given link too), which have to be there before a daemon can be controlled by the SRC. This is the reason for the "...is not on file" error.

Still, the inetd is already on file, so you can restart it easily (now that we're hitting my area of half-competence i can become less general) by issuing

refresh -s inetd

to restart the inetd or, to restart the whole group of tcpip daemons,

refresh -g tcpip

Issue a "lssrc -a | grep -v inoperative" to see all the subsystems (left column) running at to which group they belong (middle column). To start/stop one such subsystem issue:

startsrc -s <subsystem>
stopsrc -s <subsystem>

to start/stop whole groups use

startsrc -g <subsysgroup>
stopsrc -g <subsysgroup>

If you have configured your daemon in inetd.conf it should be running now as a refresh of inetd should have started it by now.

Hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with grep opening a file

Hello All, Here is my silly question on grep.. Here is my code.. DAY=$(date --date="yesterday" +%y.%m.%d) check "grep -h ' 404 ' /home/sathya/SystemOut.log /home/sathya/SystemOut_${DAY}*.log " Where check is alias which makes to run this command in all my Servers. When I execute... (3 Replies)
Discussion started by: sathyaonnuix
3 Replies

2. Programming

Problem in opening a file!

Hello All, I am new to programming in unix. I am trying to create a file by using open command. The entire file is : #include<fcntl.h> main(void){ int fd; fd = open("File1", O_CREAT|O_WRONLY, S_IRUSR|S_IWUSR|S_IRWXO); printf("%d ", fd); } The problem I am facing a strange problem.... (2 Replies)
Discussion started by: vkn_1985
2 Replies

3. Solaris

Please help with opening a port??

Hello all, I need assistance... I need to open a port # 36677 and have it remain open even after a power cycle. I thought all I needed to do was add it to /etc/services. That was not it... Can someone please tell me how to do this. Thank you. (6 Replies)
Discussion started by: komputersman
6 Replies

4. IP Networking

problem opening TCP ports

Please can somebody help me. I'm trying to open ports 999, 1982 and 1983 but am not having much luck. I used iptables -A INPUT -i eth0 -p tcp --sport 999 -m state --state NEW,ESTABLISHED -j ACCEPT iptables -A INPUT -i eth0 -p tcp --sport 1982 -m state --state NEW,ESTABLISHED -j ACCEPT iptables... (5 Replies)
Discussion started by: thehaapyappy
5 Replies

5. Programming

Opening a TCPIP Port with UNIX C

i am new to UNIX and C (primarilly a JDE and AS400/RPG developer). However, I need to find a way to send data to and from a web service from within a UNIX C program. What i would like to be able to do is to receive in a block of XML (from a non C application), wrap it, and then open a TCPIP... (3 Replies)
Discussion started by: DaveBarber
3 Replies

6. UNIX for Advanced & Expert Users

Problem Opening X-Clients in Solaris

Hi, I use hummingbird exceed9.0 to open active X-Server Sessions to Solaris(Sol9 SPARC) machines. I m able to open "Solaris desktops(CDE)" for all Solaris machines except a specific machine. Initially the XDMCP display manager chooser did not display (that) server in the list. I had to... (2 Replies)
Discussion started by: mahatma
2 Replies

7. UNIX for Dummies Questions & Answers

Opening a port on HPUX 11

7 I need to connect to a Unidata database using rpc on a HPUX 11 unix machine. The rpc software on Unidata uses port 31438 which does not appear to be available. How can I check the status of this port and activate it for tcp use? (0 Replies)
Discussion started by: SkyBlue
0 Replies

8. UNIX for Dummies Questions & Answers

opening ssh port

I've got openssh installed but when i try to ssh to my machine i get a "port 22: connection refused" message. Do I need to add something to the hosts.allow file to allow ssh access in? I'm running Mandrake 8.1 (5 Replies)
Discussion started by: gasaraki99
5 Replies

9. UNIX for Dummies Questions & Answers

opening port

i need to open port 1470. how do i do this. whats the command. This is on a solaris box. Thanks (1 Reply)
Discussion started by: ollyparkhouse
1 Replies

10. UNIX for Dummies Questions & Answers

OPening A Port

My mail went down and the company told me to open port 110 on my server. How do I do this? (2 Replies)
Discussion started by: djatwork
2 Replies
Login or Register to Ask a Question