Questions tagged [port]

A port is a communication end-point in the context of network communications or an interaction point for inter-component interactions. Do not use this tag for software ports from one platform or language to another, but use the tag "porting" instead.

A port is a communication end-point in the context of network communications, or an interaction point for inter-component interactions.

Exclusion

  • Do not use this tag for software ports from one platform or language to another. Use the tag instead.

External references

  • Network ports as communication endpoint
  • Ports as interaction point between components in UML.
6733 questions
3215
votes
34 answers

How do I find out which process is listening on a TCP or UDP port on Windows?

How do I find out which process is listening on a TCP or UDP port on Windows?
readonly
  • 343,444
  • 107
  • 203
  • 205
1397
votes
34 answers

How to kill a process running on particular port in Linux?

I tried to close the tomcat using ./shutdown.sh from tomcat /bin directory. But found that the server was not closed properly. And thus I was unable to restartMy tomcat is running on port 8080. I want to kill the tomcat process running on 8080. I…
veer7
  • 20,074
  • 9
  • 46
  • 74
1288
votes
28 answers

How do I remove the process currently using a port on localhost in Windows?

How can I remove the current process/application which is already assigned to a port? For example: localhost:8080
KavinduWije
  • 39,451
  • 4
  • 14
  • 17
1114
votes
38 answers

What is the difference between a port and a socket?

This was a question raised by one of the software engineers in my organisation. I'm interested in the broadest definition.
Richard Dorman
  • 23,170
  • 16
  • 45
  • 49
1090
votes
14 answers

scp with port number specified

I'm trying to scp a file from a remote server to my local machine. Only port 80 is accessible. I tried: scp -p 80 username@www.myserver.com:/root/file.txt . but got this error: cp: 80: No such file or directory How do I specify the port number in a…
One Two Three
  • 22,327
  • 24
  • 73
  • 114
1046
votes
62 answers

How to configure port for a Spring Boot application

How do I configure the TCP/IP port listened on by a Spring Boot application, so it does not use the default port of 8080.
Paul Verest
  • 60,022
  • 51
  • 208
  • 332
867
votes
30 answers

How to kill a process on a port on ubuntu

I am trying to kill a process in the command line for a specific port in ubuntu. If I run this command I get the port: sudo lsof -t -i:9001 so...now I want to run: sudo kill 'sudo lsof -t -i:9001' I get this error message: ERROR: garbage process…
Tampa
  • 75,446
  • 119
  • 278
  • 425
733
votes
15 answers

How do I assign a port mapping to an existing Docker container?

I'm not sure if I've misunderstood something here, but it seems like it's only possible to set port mappings by creating a new container from an image. Is there a way to assign a port mapping to an existing Docker container?
thasmo
  • 9,159
  • 6
  • 27
  • 32
730
votes
8 answers

What is the difference between "expose" and "publish" in Docker?

I'm experimenting with Dockerfiles, and I think I understand most of the logic. However, I don't see the difference between "exposing" and "publishing" a port in this context. All the tutorials I have seen first include the EXPOSE command in the…
user1496984
  • 10,957
  • 8
  • 37
  • 46
522
votes
13 answers

How do I determine if a port is open on a Windows server?

I'm trying to install a site under an alternative port on a server, but the port may be closed by a firewall. Is there a way to ping out or in, on a specific port, to see if it is open?
Jason
  • 16,739
  • 23
  • 87
  • 137
458
votes
5 answers

How do multiple clients connect simultaneously to one port, say 80, on a server?

I understand the basics of how ports work. However, what I don't get is how multiple clients can simultaneously connect to say port 80. I know each client has a unique (for their machine) port. Does the server reply back from an available port to…
IamIC
  • 17,747
  • 20
  • 91
  • 154
435
votes
37 answers

Port 80 is being used by SYSTEM (PID 4), what is that?

I am trying to use port 80 for my application server, but when I perform netstat -aon I get: TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4 When I look up the process in task manager, it shows PID 4 is SYSTEM, that's it. No extension... nothing. Just…
GiH
  • 14,006
  • 13
  • 43
  • 56
411
votes
9 answers

git remote add with other SSH port

In Git, how can I add a remote origin server when my host uses a different SSH port? git remote add origin ssh://user@host/srv/git/example
JuanPablo
  • 23,792
  • 39
  • 118
  • 164
398
votes
19 answers

Get protocol, domain, and port from URL

I need to extract the full protocol, domain, and port from a given URL. For example: https://localhost:8181/ContactUs-1.0/contact?lang=it&report_type=consumer >>> https://localhost:8181
yelo3
  • 5,613
  • 5
  • 26
  • 23
377
votes
45 answers

Node.js Port 3000 already in use but it actually isn't?

I have been working with a node.js project for a few weeks and it has been working great. Usually, I use npm start to run my app and view it in a browser on localhost, port 3000. Today, I started to get the following error while using npm…
user2573690
  • 5,493
  • 9
  • 43
  • 61
1
2 3
99 100