0

I read the instructions here to configure my nodejs application to run on openshift. For

Step 2: Read Configuration Details from the System Environment

I basically copied and pasted the code replacing Server with http

// listening on the port

var server_port = process.env.OPENSHIFT_NODEJS_PORT || 8080;
var server_ip_address = process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1';

http.listen(server_port, server_ip_address, function () {
  console.log( "Listening on " + server_ip_address + ", port " + server_port );
});

But when I enter the command git push, I get the following errors on my command prompt.

enter image description here

What does it mean

Application 'nodejs' failed to start (port 8080 not available)
Rockstar5645
  • 4,376
  • 8
  • 37
  • 62

2 Answers2

1

It means that some other process using port 8080. 8080 is conventionally used for debugging trying using another port

0xtvarun
  • 698
  • 6
  • 18
  • it's trying to use port 8080 no matter what, how would I force it to use another port? – Rockstar5645 Nov 15 '15 at 06:22
  • Try checking out what's running on `http://localhost:8080` if nothing works change `server_port = 3000` – 0xtvarun Nov 15 '15 at 06:26
  • the application isn't meant to run on localhost, I haven't installed any of my modules here, I push the code to the openshift server and it's supposed to install all my dependencies during the buildphase – Rockstar5645 Nov 15 '15 at 06:29
  • 1
    This might help you http://stackoverflow.com/questions/31358992/application-appname-failed-to-start-port-8080-not-available-on-open-shift-no – 0xtvarun Nov 15 '15 at 06:32
0

Try this (considering from the snapshot you are on Windows),

netstat -anbo

This will show you all the ports currently in use on your system along with the executable and the process ID which has acquired that socket. Now simply check if your port 8080 is occupied by that process and kill it.

psiyumm
  • 6,437
  • 3
  • 29
  • 50