OpenShift: Failed to execute control start on node application
For an OpenShift Node app you need to specify the start script as: main: "server.js"
instead of using scripts
. This is due to the way Node applications are started on OpenShift using node-supervisor.
nodejs/postgresql on openshift: Failed to execute: 'control restart'
Problem resolved by Openshift already :) @developercorey
Openshift node app error when restarting
If you're creating a new Node project, start with npm init
to create the package.json
file. You can add the --auto
option to give it safe defaults.
Remember, the JSON file must be valid JSON, so test it with jsonlint
or a tool like an online validator.
Any dependencies your project has should be spelled out in the package file. This is done automatically with things like npm install express --save
.
Node Js Application host in openshift
Can you show me your code how you are setting ip and port for listening.
Please use below code if you are using express framework:
var ipaddress = process.env.OPENSHIFT_NODEJS_IP || "127.0.0.1";
var port = process.env.OPENSHIFT_NODEJS_PORT || 8080;
app.listen(port, ipaddress, function() {
// Do your stuff
});
You need to use IP and Port, defined by OpenShift and Specified in its Enviorment Variable.
process.env.OPENSHIFT_NODEJS_IP
process.env.OPENSHIFT_NODEJS_PORT
https://developers.openshift.com/en/node-js-environment-variables.html
Related Topics
Memory Limit to a 32-Bit Process Running on a 64-Bit Linux Os
Linux Removing Folders Older Than 1 Year and More Than 3 Files
How to Set Memory Limit for Oom Killer for Chrome
How to Convert Yyyymmddhhmmss to a Date Readable by 'Date'
Remove a Symlink to a Directory
How to Get the Start Time of a Long-Running Linux Process
How to Automatically Add User Account and Password with a Bash Script
How to Pass a Wildcard Parameter to a Bash File
Extract Lines Between Two Patterns from a File
Using "$Random" to Generate a Random String in Bash
How Does Bash Deal with Nested Quotes
How to Trim White Space from a Variable in Awk
How to Remove the Bom from a Utf-8 File
Creating a Bootable Iso Image with Custom Bootloader
What Do These Kernel Panic Errors Mean
Linux Time Command Microseconds or Better Accuracy