Rockstar5645
Rockstar5645

Reputation: 4518

openshift application 'nodejs' failed to start (port 8080 not available)

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)

Upvotes: 0

Views: 1335

Answers (2)

nyumerics
nyumerics

Reputation: 6547

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.

Upvotes: 0

0xtvarun
0xtvarun

Reputation: 698

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

Upvotes: 1

Related Questions