I'm using aws ec2 to run a Linux server. I'm running perforce on it which listens on port 1666 by default, but I want it to listen to port 80.

If I set p4d to listen on port 80, it fails saying it's in use by tcp/ip something. I don't access the server from the web, only via ssh so I don't mind losing http connection.

I used

./p4d -p 80

to set my port

  • Make sure you don't have apache/ngix or other web HTTP service running – tachomi Feb 5 '16 at 0:22

According to the error message, some other process (probably Apache, but maybe some other HTTP server) is running, and is listening on TCP port 80.

The first step is to identify that process and stop it.

The second step is to either sudo to run perforce, or to su to root, and then run perfoce, configured to listen on TCP port 80. You have to do this because ports 1024 and below are considered "special" and only the root user ID can open sockets bound to those port numbers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.