0

I'm new to Ubuntu and I've problem with port 6703

i executed this command

ps -ef | grep 6703

and got this result

user 4378 4308 0 09:40 pts/2 00:00:00 grep --color=auto 6703

but can't understand what does that mean ?

user1
  • 163
  • 3
  • 11

1 Answers1

1

ps doesn't show network ports, at least not to my knowledge. The more appropriate command to use is netstat or lsof.

For instance, if I want to see whether or not my ssh server is listening on port 22, I can do this:

xieerqi@eagle:~$ sudo netstat -tulpan | grep ":22"
[sudo] password for xieerqi: 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1012/sshd       
tcp6       0      0 :::22                   :::*                    LISTEN      1012/sshd

Same for lsof, if I want to check a specific port, like 58732

xieerqi@eagle:~$ sudo lsof | grep ":58732"
[sudo] password for xieerqi: 
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
firefox    2491          xieerqi   65u     IPv4            1948841         0t0        TCP eagle:58732->104.16.113.188:http (ESTABLISHED)

As to why your command returned

user 4378 4308 0 09:40 pts/2 00:00:00 grep --color=auto 6703

That is the only string that was matched in the output of ps, in other words, grep command itself is the only one on that list. And again, there wouldn't be anything else, because you're looking for ports, and ps doesnt show ports

Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497
  • Thanks for replying, i tried both of commands (netstat , lsof) got nothing ! why ? – user1 Nov 14 '15 at 22:59
  • @Rcs How exactly were you trying ? Also , AFAIK port 6703 is one of those dynamic ports which are used by browsers to create temporary connection. If you have in any way closed the browser or that connection, it probably is gone now. It may be on another port now – Sergiy Kolodyazhnyy Nov 14 '15 at 23:01
  • i'm using storm which is open source that has worker,supervisor and nimbus both of them has own port to make a connection to upload data into storm ui , problem with me in supervisor connection that using ports 6700 or 6701 ..... and so on every time i used port of them got same problem that "Failed to bind to: 0.0.0.0/0.0.0.0:6703" ! – user1 Nov 14 '15 at 23:04
  • @Rcs well, I'm afraid I cannot help you with that one, as I am not familiar with Storm. Perhaps there are config files where you can redefine which port supervisor connects to – Sergiy Kolodyazhnyy Nov 14 '15 at 23:14
  • i appreciate that help really , that's right , there are config file i defined port there rigthly , every one i asked him said to me that there are another process in that port , now I'm trying to check that port is open or not then to know which process there – user1 Nov 14 '15 at 23:17
  • i can't +1 to your answer as a help to me but my reputation doesn't enough , but what is the reason of didn't get any result for that port ? – user1 Nov 14 '15 at 23:19
  • i've another notice that may be can help . i'm working on Ubuntu via vmware and internet connection in win8 is wireless but the connection in Ubuntu is Ethernet without any ip ! is that may be the reason or not ? – user1 Nov 14 '15 at 23:22
  • Well i'd say simply because there's no service running on that port or no program has requested to connect to that port. I cannot say anything about vmware as I am only familiar with virtualbox. But that's weird. Even if you have vmware it should have ip. In my virtual box , the VM get IP address. – Sergiy Kolodyazhnyy Nov 14 '15 at 23:27
  • yes i guess that this may be the reason , ok how can i know ip address of Ubuntu using terminal ? i used ipconfig and gave me correction for that command ! – user1 Nov 14 '15 at 23:29
  • @Rcs ipconfig is windows. In linux it is ifconfig – Sergiy Kolodyazhnyy Nov 14 '15 at 23:30